glassfish
  1. glassfish
  2. GLASSFISH-19391

server will not start after download and domain cannot be created due to unresolvable hostname

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.1.2.2, 4.0_b86_RC2, 4.0
    • Fix Version/s: 4.0_b87_RC3
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Fedora 17

      Description

      Fresh after download I unzip glassfish and do:

      ./asadmin start-domain

      and I get

      There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.

      there is nothing running on port 4848 for sure, I even changed the port in glassfish config and I still get

      There is a process already using the admin port 114849 -- it probably is another instance of a GlassFish server.

      Many other ppl are having the same issue:
      http://www.javaprogrammingforums.com/web-frameworks/19238-glassfish-error-process-already-using-port-4848-a.html
      http://www.java.net/forum/topic/glassfish/glassfish/glassfish-wont-start-because-port-4848-use-however-nothing-listening-port-4848
      http://www.java.net/forum/topic/glassfish/glassfish/glassfish-error-process-already-using-port-4848

        Issue Links

          Activity

          Hide
          Byron Nevins added a comment -

          1) hostname bogusname.xyz.com

          2) create-domain d2

          3) start-domain d2

          Results:
          ~/dev/main/nucleus/common/common-util> asadmin start-domain d2
          Bad Network Configuration. DNS can not resolve the hostname:
          java.net.UnknownHostException: bogusname.xyz.com: bogusname.xyz.com: nodename nor servname provided, or not known
          Waiting for d2 to start .....
          Successfully started the domain : d2
          domain Location: /Users/wnevins/glassfish4/glassfish/domains/d2
          Log File: /Users/wnevins/glassfish4/glassfish/domains/d2/logs/server.log
          Admin Port: 4848
          Command start-domain executed successfully.

          Show
          Byron Nevins added a comment - 1) hostname bogusname.xyz.com 2) create-domain d2 3) start-domain d2 Results: ~/dev/main/nucleus/common/common-util> asadmin start-domain d2 Bad Network Configuration. DNS can not resolve the hostname: java.net.UnknownHostException: bogusname.xyz.com: bogusname.xyz.com: nodename nor servname provided, or not known Waiting for d2 to start ..... Successfully started the domain : d2 domain Location: /Users/wnevins/glassfish4/glassfish/domains/d2 Log File: /Users/wnevins/glassfish4/glassfish/domains/d2/logs/server.log Admin Port: 4848 Command start-domain executed successfully.
          Hide
          Byron Nevins added a comment -

          This is an annoying issue if the user has his hostname set wrong. It is NOT catastrophic if that is the case. But we currently treat it that way. Instead, it should be logged as a WARNING.

          Specifically, whether or not the hostname is setup correctly has nothing to do with whether or not a given port is free.

          This has a big impact on customers. The error says that, say, port 4848 is in use. The user checks and finds that nothing is using port 4848. Confusion sets in at that point.

          It is unlikely that the customer will bump into this issue. He would have to have a bad hostname. I.e. a hostname that can't be resolved by DNS. With the fix we emit a warning with the exact problem so that he can now fix it permanently.

          The cost to fix it is minimal, in fact it is already fixed and waiting to go in. If it doesn't go into 4.0 it'll go into 4.0.1

          The fix is not too complicated. The main complication is setting it up to emit only one warning message, then fine messages after that.
          The actual fix itself is simply catching the right exception at the exact right place and swallowing it rather than turning it into a fatal error.

          There is little risk. Automated tests, including QuickLook test this area all the time.

          No doc impact.

          QA need only run their usual standard tests

          Show
          Byron Nevins added a comment - This is an annoying issue if the user has his hostname set wrong. It is NOT catastrophic if that is the case. But we currently treat it that way. Instead, it should be logged as a WARNING. Specifically, whether or not the hostname is setup correctly has nothing to do with whether or not a given port is free. This has a big impact on customers. The error says that, say, port 4848 is in use. The user checks and finds that nothing is using port 4848. Confusion sets in at that point. It is unlikely that the customer will bump into this issue. He would have to have a bad hostname. I.e. a hostname that can't be resolved by DNS. With the fix we emit a warning with the exact problem so that he can now fix it permanently. The cost to fix it is minimal, in fact it is already fixed and waiting to go in. If it doesn't go into 4.0 it'll go into 4.0.1 The fix is not too complicated. The main complication is setting it up to emit only one warning message, then fine messages after that. The actual fix itself is simply catching the right exception at the exact right place and swallowing it rather than turning it into a fatal error. There is little risk. Automated tests, including QuickLook test this area all the time. No doc impact. QA need only run their usual standard tests
          Hide
          Tom Mueller added a comment -

          Approved for 4.0

          Show
          Tom Mueller added a comment - Approved for 4.0
          Hide
          Byron Nevins added a comment -

          QL before the change (with a bad hostname)

          testng-summary:
          [echo] [testng] ===============================================
          [echo] [testng] QuickLookTests
          [echo] [testng] Total tests run: 117, Failures: 44, Skips: 21
          [echo] [testng] Configuration Failures: 1, Skips: 0
          [echo] [testng] ===============================================
          [echo] [testng]
          [INFO] Executed tasks

          QL After the change (still with bad hostname)

          testng-summary:
          [echo] [testng]
          [echo] [testng] ===============================================
          [echo] [testng] QuickLookTests
          [echo] [testng] Total tests run: 117, Failures: 0, Skips: 0
          [echo] [testng] ===============================================
          [echo] [testng]
          [INFO] Executed tasks
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD SUCCESS

          Show
          Byron Nevins added a comment - QL before the change (with a bad hostname) testng-summary: [echo] [testng] =============================================== [echo] [testng] QuickLookTests [echo] [testng] Total tests run: 117, Failures: 44, Skips: 21 [echo] [testng] Configuration Failures: 1, Skips: 0 [echo] [testng] =============================================== [echo] [testng] [INFO] Executed tasks QL After the change (still with bad hostname) testng-summary: [echo] [testng] [echo] [testng] =============================================== [echo] [testng] QuickLookTests [echo] [testng] Total tests run: 117, Failures: 0, Skips: 0 [echo] [testng] =============================================== [echo] [testng] [INFO] Executed tasks [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS
          Hide
          Byron Nevins added a comment -

          Sending common/common-util/src/main/java/com/sun/enterprise/util/CULoggerInfo.java
          Sending common/common-util/src/main/java/com/sun/enterprise/util/net/NetUtils.java
          Transmitting file data ..
          Committed revision 61658.

          Done

          Show
          Byron Nevins added a comment - Sending common/common-util/src/main/java/com/sun/enterprise/util/CULoggerInfo.java Sending common/common-util/src/main/java/com/sun/enterprise/util/net/NetUtils.java Transmitting file data .. Committed revision 61658. Done

            People

            • Assignee:
              Byron Nevins
              Reporter:
              walec51
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: