Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1177423

Summary: [GSS](6.4.z) Error message improvement while jboss-cli fails to connect with hostname containing 'underscore'
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Pankaj Degave <pdegave>
Component: CLIAssignee: Panagiotis Sotiropoulos <psotirop>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Kremensky <pkremens>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: bmaxwell, brian.stansberry, cdewolf, ihradek, msochure, ppalaga, psotirop
Target Milestone: CR1   
Target Release: EAP 6.4.12   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/jbossas/jboss-eap/pull/2369
Whiteboard: eap6412-proposed
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 13:12:00 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: 1375585    

Description Pankaj Degave 2014-12-27 09:27:46 UTC
Description of problem:

The jboss-cli fails to connect when host name contains `underscore` characher.Getting below error message :
~~~
$jboss-cli.sh -c --controller=abc_01:10001
org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
        at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:280)
        at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:258)
        at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.jboss.modules.Module.run(Module.java:270)
        at org.jboss.modules.Main.main(Main.java:411)
Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at abc_01:10001
        at org.jboss.as.cli.impl.CommandContextImpl.tryConnection(CommandContextImpl.java:951)
        at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:790)
        at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:766)
        at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:278)
        ... 8 more
Caused by: java.io.IOException: java.lang.IllegalArgumentException: destination address may not be null
~~~

- Since underscore is not an valid character in hostname,So we should improve the error message saying the same.

Version-Release number of selected component (if applicable):
NA

How reproducible:

Connect to jboss-cli.sh with hostname containing 'underscore' character.

Steps to Reproduce:
1.$ ./jboss-cli.sh -c --controller=abc_10:9999

Comment 1 Panagiotis Sotiropoulos 2015-03-25 14:58:29 UTC
PR sent : https://github.com/jbossas/jboss-eap/pull/2369

Comment 3 Mike McCune 2016-03-28 23:23:30 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 4 Panagiotis Sotiropoulos 2016-10-20 08:12:40 UTC
6.4.x PR : https://github.com/jbossas/jboss-eap/pull/2864

Comment 5 Peter Palaga 2016-10-27 08:15:31 UTC
No upstream required, because https://github.com/jbossas/jboss-eap/pull/2369#issuecomment-86097573 

> In Wildfly, it is handled producing the message : Failed to resolve host 'xxxxxx': Failed to create URI: Illegal character in hostname...

Comment 6 Ivo Hradek 2016-11-15 08:37:35 UTC
Verified with EAP 6.4.12.CP.CR1;

Comment 7 Petr Penicka 2017-01-17 13:12:00 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.