glassfish
  1. glassfish
  2. GLASSFISH-17083

Invalid http_proxy value can cause DAS to fail to start and then fail to exit

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1_b11
    • Fix Version/s: 3.1.2, 4.0
    • Component/s: admin
    • Labels:
      None
    • Environment:

      Ubuntu 11.04, Java(TM) SE Runtime Environment (build 1.6.0_23-b05), GlassFish Server Open Source Edition 3.1.1-b11 (build 11).

      Description

      Some times when I try to start domain,the start-domain command fails and in the subsequent invocation it works.This is the output I see:

      sreekanth@spidy:/space/Sreekanth/servers/glassfish3/glassfish$ asadmin start-domain domain1
      Waiting for domain1 to start .......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
      No response from the Domain Administration Server (domain1) after 600 seconds.
      The command is either taking too long to complete or the server has failed.
      Please see the server log files for command status.
      Please start with the --verbose option in order to see early messages.
      Command start-domain failed.

      I did a jps and have 2 processes running:
      sreekanth@spidy:/space/Sreekanth/workspace/RSP-BSP/metro-ws-i-tests~rsp-bsp$ jps
      2990 admin-cli.jar
      3068 ASMain
      3468 Jps

      I took out jstack for each one and I am attaching the output of jstack here to the bug report.

      Then when I again say : asadmin start-domain , I see this:

      sreekanth@spidy:/space/Sreekanth/servers/glassfish3/glassfish$ asadmin start-domain domain1
      Waiting for domain1 to start ............................
      Successfully started the domain : domain1
      domain Location: /space/Sreekanth/servers/glassfish3/glassfish/domains/domain1
      Log File: /space/Sreekanth/servers/glassfish3/glassfish/domains/domain1/logs/server.log
      Admin Port: 4848
      Command start-domain executed successfully.

      1. server.log
        551 kB
        Sreekanth
      2. t.out
        4 kB
        Sreekanth
      3. t1.out
        5 kB
        Sreekanth

        Activity

        Hide
        Tom Mueller added a comment -

        Do you have the server.log file from when this happens?

        t.out is from the ASMain (DAS) and t1.out is from admin-cli.jar (asadmin). The DAS appears
        to either have never really got started, or it detected a failure and is trying to exit,
        but it didn't exit successfully. The server.log would help to determine which case
        this is.

        Is this problem reliably reproducible?

        Show
        Tom Mueller added a comment - Do you have the server.log file from when this happens? t.out is from the ASMain (DAS) and t1.out is from admin-cli.jar (asadmin). The DAS appears to either have never really got started, or it detected a failure and is trying to exit, but it didn't exit successfully. The server.log would help to determine which case this is. Is this problem reliably reproducible?
        Hide
        Sreekanth added a comment -

        Tom I have seen this problem couple of times.I still have the same instance of server but I restarted the domain and i have been running
        some tests on it.I am attaching that server log if it helps you.Otherwise I will wait for next time for this to occur and then upload the server log.

        Show
        Sreekanth added a comment - Tom I have seen this problem couple of times.I still have the same instance of server but I restarted the domain and i have been running some tests on it.I am attaching that server log if it helps you.Otherwise I will wait for next time for this to occur and then upload the server log.
        Hide
        Tom Mueller added a comment -

        At the beginning of the server.log file, there are a couple of cases where the
        DAS tried to startup and then failed to start and shutdown.

        The following error message is appears there:

        [#|2011-07-13T12:40:49.372+0530|SEVERE|glassfish3.1.1|com.sun.pkg.client.SystemInfo|_ThreadID=10;_ThreadName=Thread-2;|badproxy|#]

        [#|2011-07-13T12:40:49.376+0530|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=10;_ThreadName=Thread-2;|java.net.MalformedURLException: Unknown protocol: webcache.sfbay.sun.com

        This is probably due to having the "http_proxy" environment variable set just to webcache.sfbay.sun.com rather than http://webcache.sfbay.sun.com/.

        Since the check for updates only happens periodically, this might explain why you see this happen and then it goes away.

        There is a bug in that the DAS is not exiting when it encounters this error. This might be
        related to GLASSFISH-16925 which also is a case of the DAS not exiting after it encounters an
        error, but that issue is for a different error.

        Show
        Tom Mueller added a comment - At the beginning of the server.log file, there are a couple of cases where the DAS tried to startup and then failed to start and shutdown. The following error message is appears there: [#|2011-07-13T12:40:49.372+0530|SEVERE|glassfish3.1.1|com.sun.pkg.client.SystemInfo|_ThreadID=10;_ThreadName=Thread-2;|badproxy|#] [#|2011-07-13T12:40:49.376+0530|SEVERE|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=10;_ThreadName=Thread-2;|java.net.MalformedURLException: Unknown protocol: webcache.sfbay.sun.com This is probably due to having the "http_proxy" environment variable set just to webcache.sfbay.sun.com rather than http://webcache.sfbay.sun.com/ . Since the check for updates only happens periodically, this might explain why you see this happen and then it goes away. There is a bug in that the DAS is not exiting when it encounters this error. This might be related to GLASSFISH-16925 which also is a case of the DAS not exiting after it encounters an error, but that issue is for a different error.
        Hide
        Sreekanth added a comment -

        Since you no more need the server.log from my side now,what I will do is change the http_proxy to the "http://webcache.sfbay.sun.com" now and then see if the problem exists next time wwhen I start the domain.

        Show
        Sreekanth added a comment - Since you no more need the server.log from my side now,what I will do is change the http_proxy to the "http://webcache.sfbay.sun.com" now and then see if the problem exists next time wwhen I start the domain.
        Hide
        Tom Mueller added a comment -

        Updated summary to reflect the actual problem.

        Show
        Tom Mueller added a comment - Updated summary to reflect the actual problem.
        Hide
        Sreekanth added a comment -

        After setting the correct proxy, till now I never again observed this issue

        Show
        Sreekanth added a comment - After setting the correct proxy, till now I never again observed this issue
        Hide
        Tom Mueller added a comment -

        This is fixed on the trunk. The bad http_proxy value no longer causes the server to exit. There is just a SEVERE message printed to the log.

        Show
        Tom Mueller added a comment - This is fixed on the trunk. The bad http_proxy value no longer causes the server to exit. There is just a SEVERE message printed to the log.
        Hide
        Tom Mueller added a comment -

        This is fixed in 3.1.2 also.

        Show
        Tom Mueller added a comment - This is fixed in 3.1.2 also.

          People

          • Assignee:
            Tom Mueller
            Reporter:
            Sreekanth
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: