Bug 1014414 - [GSS] (6.3.0) Remote Naming throws the same exception for different causes
[GSS] (6.3.0) Remote Naming throws the same exception for different causes
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Naming (Show other bugs)
6.1.1
Unspecified Unspecified
unspecified Severity unspecified
: DR1
: EAP 6.3.0
Assigned To: Brad Maxwell
:
: 1014413 (view as bug list)
Depends On:
Blocks: 1024153 1053426
  Show dependency treegraph
 
Reported: 2013-10-01 19:27 EDT by Brad Maxwell
Modified: 2016-01-25 15:29 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
: 1053426 (view as bug list)
Environment:
Last Closed: 2014-06-28 11:37:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-2198 Major Resolved Remote Naming throws the same exception for different causes 2017-07-10 02:28 EDT
Red Hat Knowledge Base (Solution) 1353403 None None None 2016-01-25 15:29 EST

  None (edit)
Description Brad Maxwell 2013-10-01 19:27:07 EDT
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 10:32:15 EST
Brad Maxwell <bmaxwell@redhat.com> updated the status of jira WFLY-2198 to Coding In Progress
Comment 5 Kabir Khan 2014-04-04 11:16:36 EDT
Setting to ON_QA since fixed by upgrade
Comment 6 Jan Martiska 2014-04-09 08:58:14 EDT
Verified with EAP 6.3.0.ER1 / jboss-remote-naming 1.0.8.Final-redhat-1
Comment 7 Scott Mumford 2014-04-23 23:55:31 EDT
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 15:52:29 EST
*** 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.