Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-4054

AbstractServerConfig#setWebServiceHost uses local hostname, then fails on verification

    XMLWordPrintable

Details

    • Hide

      Using Linux and Wildfly 10.1.0:

      $ hostnamectl set-hostname my_desktop
      $ hostname
      my_desktop
      $ bin/standalone.sh -b 0.0.0.0
      ...
      13:05:45,378 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 56) WFLYCTL0013: Operation ("add") failed - 
      address: ([("subsystem" => "webservices")]): java.lang.IllegalArgumentException: JBWS022117: Invalid address provided: my_desktop
      
      
      Show
      Using Linux and Wildfly 10.1.0: $ hostnamectl set-hostname my_desktop $ hostname my_desktop $ bin/standalone.sh -b 0.0.0.0 ... 13:05:45,378 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 56) WFLYCTL0013: Operation ("add") failed - address: ([("subsystem" => "webservices")]): java.lang.IllegalArgumentException: JBWS022117: Invalid address provided: my_desktop
    • Compatibility/Configuration

    Description

      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.

      Attachments

        Activity

          People

            rsearls r searls
            dlichtenberger Daniel Lichtenberger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: