Bug 1014414 - [GSS] (6.3.0) Remote Naming throws the same exception for different causes
Summary: [GSS] (6.3.0) Remote Naming throws the same exception for different causes
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Naming
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: DR1
: EAP 6.3.0
Assignee: Brad Maxwell
QA Contact:
URL:
Whiteboard:
Keywords:
: 1014413 (view as bug list)
Depends On:
Blocks: 1024153 1053426
TreeView+ depends on / blocked
 
Reported: 2013-10-01 23:27 UTC by Brad Maxwell
Modified: 2018-12-04 15:57 UTC (History)
5 users (show)

(edit)
In previous versions of JBoss EAP 6 the same exception was thrown in response to a number of connection errors that could arise when a Remote Naming client failed to connect to any host. This behavior was sub-optimal as it gave users no indication of the actual error encountered for any given server.

The exception thrown in all cases was:
----
javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://localhost:4447]
----

In this release the exceptions thrown align more closely to the actual cause of the failure.

If the host or port details are incorrect, the following +CommunicationException+ will be thrown, indicating the connection timed-out:

----
javax.naming.CommunicationException: Failed to connect to
any server. Servers tried: [remote://localhost:4447 (Operation failed
with status WAITING after 5000 MILLISECONDS), remote://localhost2:4321
(Operation failed with status WAITING after 5000 MILLISECONDS)] [Root
exception is java.net.ConnectException: Operation failed with status
WAITING after 5000 MILLISECONDS]
----

If one of the available servers responds, but the subsequent authentication fails, the following +AuthenticationException+ will be thrown:

----
javax.naming.AuthenticationException: Failed to connect to
any server. Servers tried: [remote://localhost:4447 (Authentication
failed: all available authentication mechanisms failed),
remote://localhost2:4321 (Operation failed with status WAITING after
5000 MILLISECONDS)] [Root exception is
javax.security.sasl.SaslException: Authentication failed: all available
authentication mechanisms failed]
----

An appropriate message will be given for failures connecting to each server in the list.
Clone Of:
: 1053426 (view as bug list)
(edit)
Last Closed: 2014-06-28 15:37:17 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1353403 None None None 2016-01-25 20:29 UTC
JBoss Issue Tracker WFLY-2198 Major Closed Remote Naming throws the same exception for different causes 2018-01-22 05:36 UTC

Description Brad Maxwell 2013-10-01 23:27:07 UTC
A generic NamingException are thrown if all of the servers specified are unreachable as well as if the user/pass are invalid and a security exception is thrown up, they both are converted into a RuntimeException and a message listing the servers it was unable to call is reported.

We should be throwing a different exception in the cases we know the cause, such as connection timeout or authentication exception.

If all the the servers specified are not not running:
--------------------------------------------------------------------------------------------
javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://localhost:4447]
at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:213)

If one of the servers is running, but the client's username/password are incorrect
--------------------------------------------------------------------------------------------
javax.naming.NamingException: Failed to connect to any server. Servers tried: [remote://localhost:4447]
at org.jboss.naming.remote.client.HaRemoteNamingStore.failOverSequence(HaRemoteNamingStore.java:213)

Comment 4 JBoss JIRA Server 2014-01-29 15:32:15 UTC
Brad Maxwell <bmaxwell@redhat.com> updated the status of jira WFLY-2198 to Coding In Progress

Comment 5 Kabir Khan 2014-04-04 15:16:36 UTC
Setting to ON_QA since fixed by upgrade

Comment 6 Jan Martiska 2014-04-09 12:58:14 UTC
Verified with EAP 6.3.0.ER1 / jboss-remote-naming 1.0.8.Final-redhat-1

Comment 7 Scott Mumford 2014-04-24 03:55:31 UTC
Included release note from bug 1053426 (duplicate) that was written for EAP 6.2.2 Release Notes.

Marking for inclusion in the documentation.

Comment 8 Brad Maxwell 2014-11-05 20:52:29 UTC
*** Bug 1014413 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.