Bug 1053426 - [GSS] (6.2.x) Remote Naming throws the same exception for different causes
Summary: [GSS] (6.2.x) Remote Naming throws the same exception for different causes
Keywords:
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: CR2
: EAP 6.2.2
Assignee: Brad Maxwell
QA Contact:
URL:
Whiteboard:
Depends On: 1014414
Blocks: eap62-cp02-blockers 1053427
TreeView+ depends on / blocked
 
Reported: 2014-01-15 08:52 UTC by Brad Maxwell
Modified: 2019-11-14 06:24 UTC (History)
7 users (show)

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.
Clone Of: 1014414
Environment:
Last Closed: 2014-06-02 12:50:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker WFLY-2198 0 Major Closed Remote Naming throws the same exception for different causes 2017-12-19 02:24:12 UTC
Red Hat Knowledge Base (Solution) 1353403 0 None None None 2016-01-25 20:29:02 UTC

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.


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