[JBoss JIRA] (JBWS-4054) AbstractServerConfig#setWebServiceHost uses local hostname, then fails on verification
by R Searls (JIRA)
[ https://issues.jboss.org/browse/JBWS-4054?page=com.atlassian.jira.plugin.... ]
R Searls commented on JBWS-4054:
--------------------------------
The testcase had to be adjusted for the following reason.
On Fedora if one sets the hostname with cmd:
hostnamectl set-hostname my_desktop
the hostname is changed but the hostAddress of the previous hostname
is not associated with the new name. A different hostAddress is assigned.
On my machine the value is '10.0.0.14'.
If one includes the domain in the new name,
hostnamectl set-hostname my_desktop.localdomain
then the previous hostAddress is assigned as expected.
On my machine the value is 127.0.0.1.
So to enable the testcase to handle this possible scenario the
test of "0.0.0.0" was changed to be this.
String tHost = InetAddress.getLocalHost().getHostAddress();
String expectedResult = "127.0.0.1".equals(tHost) ? "localhost" : tHost;
//test 0.0.0.0
conf.setWebServiceHost("0.0.0.0");
assertEquals(expectedResult, conf.getWebServiceHost());
> AbstractServerConfig#setWebServiceHost uses local hostname, then fails on verification
> --------------------------------------------------------------------------------------
>
> Key: JBWS-4054
> URL: https://issues.jboss.org/browse/JBWS-4054
> Project: JBoss Web Services
> Issue Type: Bug
> Components: jbossws-integration
> Environment: Wildfly 10.1.0
> Reporter: Daniel Lichtenberger
> Assignee: R Searls
>
> If "0.0.0.0" is passed to AbstractServerConfig#setWebServiceHost, it uses InetAddress.getLocalHost().getHostName() as the server host. This hostname is then verified using AddressUtils#isValidAddress, which uses the strict requirements for public hostnames.
> However, it's quite possible to use characters like "_" in local hostnames, so something like "my_desktop" as a hostname (or even non-ASCII characters) will cause this to fail.
> For Wildfly, our workaround is to use a specific IP address (like 127.0.0.1) in the "wsdl-host" of standalone.xml.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 9 months
[JBoss JIRA] (JBWS-4054) AbstractServerConfig#setWebServiceHost uses local hostname, then fails on verification
by R Searls (JIRA)
[ https://issues.jboss.org/browse/JBWS-4054?page=com.atlassian.jira.plugin.... ]
R Searls updated JBWS-4054:
---------------------------
Assignee: R Searls
> AbstractServerConfig#setWebServiceHost uses local hostname, then fails on verification
> --------------------------------------------------------------------------------------
>
> Key: JBWS-4054
> URL: https://issues.jboss.org/browse/JBWS-4054
> Project: JBoss Web Services
> Issue Type: Bug
> Components: jbossws-integration
> Environment: Wildfly 10.1.0
> Reporter: Daniel Lichtenberger
> Assignee: R Searls
>
> If "0.0.0.0" is passed to AbstractServerConfig#setWebServiceHost, it uses InetAddress.getLocalHost().getHostName() as the server host. This hostname is then verified using AddressUtils#isValidAddress, which uses the strict requirements for public hostnames.
> However, it's quite possible to use characters like "_" in local hostnames, so something like "my_desktop" as a hostname (or even non-ASCII characters) will cause this to fail.
> For Wildfly, our workaround is to use a specific IP address (like 127.0.0.1) in the "wsdl-host" of standalone.xml.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 9 months