[GLASSFISH-17083] Invalid http_proxy value can cause DAS to fail to start and then fail to exit Created: 21/Jul/11  Updated: 20/Dec/16  Resolved: 29/Sep/11

Status: Resolved
Project: glassfish
Component/s: admin
Affects Version/s: 3.1.1_dev
Fix Version/s: 3.1.2, 4.0

Type: Bug Priority: Major
Reporter: Sreekanth Assignee: Tom Mueller
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
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).


Attachments: Text File server.log     File t.out     File t1.out    
Tags: 3_1-next, 3_1_1-scrubbed

 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.



 Comments   
Comment by Tom Mueller [ 21/Jul/11 ]

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?

Comment by Sreekanth [ 21/Jul/11 ]

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.

Comment by Tom Mueller [ 21/Jul/11 ]

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.

Comment by Sreekanth [ 21/Jul/11 ]

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.

Comment by Tom Mueller [ 26/Jul/11 ]

Updated summary to reflect the actual problem.

Comment by Sreekanth [ 03/Aug/11 ]

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

Comment by Tom Mueller [ 29/Sep/11 ]

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.

Comment by Tom Mueller [ 13/Oct/11 ]

This is fixed in 3.1.2 also.

Generated at Tue Jan 24 07:33:32 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.