Bug 1014414

Summary: [GSS] (6.3.0) Remote Naming throws the same exception for different causes
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brad Maxwell <bmaxwell>
Component: NamingAssignee: Brad Maxwell <bmaxwell>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.1CC: jkudrnac, jmartisk, kkhan, smumford, wfink
Target Milestone: DR1   
Target Release: EAP 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 15:37:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1024153, 1053426    

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> 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. ***