Bug 1053426

Summary: [GSS] (6.2.x) 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: bmaxwell, jkudrnac, jmartisk, rdickens, smumford, vtunka, wfink
Target Milestone: CR2   
Target Release: EAP 6.2.2   
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: 1014414 Environment:
Last Closed: 2014-06-02 12:50:05 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: 1014414    
Bug Blocks: 1049365, 1053427    

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

Comment 3 Jan Martiska 2014-03-05 13:54:30 UTC
Verified in 6.2.2.CR2.

Comment 4 Russell Dickenson 2014-03-06 13:18:36 UTC
Attention: Brad

Please provide draft release notes text in the 'doc_text' field.

Comment 5 Scott Mumford 2014-03-21 03:27:53 UTC
Thanks for the draft text, Brad.

Redrafted for clarity. Including the original below for reference.

Original draft:
> When a Remote Naming client tries to connect to a host with a
> username/password and it fails for one of many causes such as the host/port 
> was wrong, user/pass was wrong, etc, it always threw this exception, which 
> does not indicate what the actual cause was: 

> javax.naming.NamingException: Failed to connect to any server. Servers tried: 
> [remote://localhost:4447]

> After this fix:  It will throw a sub class of NamingException, if it failed to 
> connect to all of the possible hosts, it will throw a CommunicationException 
> and it will list the message of each server tried (which is the WAITING below, 
> meaning it waited until the connection timeout and the host didn't respond)

> When host/port is wrong

> 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 servers in the possible servers responds but then authentication 
> fails, it will throw a AuthenticationException which is again a sub class of 
> NamingException and tell you that the user/pass was wrong, again it will 
> include in the message why the other servers in the list failed also.

> When authentication issue occured
> 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]

Marking for inclusion in 6.2.2 Release Notes document.

Comment 6 Scott Mumford 2014-03-21 03:31:02 UTC
Not sure why BZ is showing that I edited the Environment field. AFAIK, I didn't touch that field.

Comment 7 Scott Mumford 2014-03-21 03:33:05 UTC
Huh, somehow the text from most of this ticket got copied into the Environment field. I've removed it again.