users@glassfish.java.net

Re: Strange Startup Issue

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 28 May 2007 10:24:22 -0400

Hi,

try two things:

(1) Add
<jvm-options>-Dcom.sun.enterprise.server.ss.ASQuickStartup=false</jvm-options>
in domain.xml. In domain.xml, turn the web-container log level to FINE

(2) I suspect port 80 is used either by another application or the
socket is still in CLOSE_WAIT or TIME_WAIT and the Web Server is
throwing a BindException which is swallowed somewhere. Are you on win32
by any chance?

Add (1) to see if you can see the exception. Another test is to bring
down the server. Wait a couple of minute (so the OS clear the CLOSE_WAIT
socket) to see if that works.

Thanks

-- Jeanfrancois



glassfish_at_javadesktop.org wrote:
> I've been running glassfish V1 UR1 P01 Build 02 for a while. One day, I had to restart the server and it stopped working. I've tried reinstalling it several times now, but I have a similar problem each time.
>
> First, for some background. I am running glassfish on port 80 as root so that it can be treated as a regular web server. I have one EAR deployed that has been getting updated pretty regularly over the past 2+ months. Unfortunately, I'm not sure what the state of the deployed code was when this stopped working.
>
> I think the best way to illustrate what's happening is to go through the steps I performed the last time I reinstalled glassfish.
>
> 1. Use the jar and setup.xml to install glassfish and the default domain
> 2. Copy my JDBC, log4j, and log4j configuration JARs to the <glassfish>/lib directory
> 3. Start the server (always as root)
> 4. Use the admin console to add the MaxPermSize JVM arg (I always seem to have a problem with the default value) and change the http-listener-1 port to 80
> 5. Restart the server
>
> At this point the server restarts fine.
>
> 6. Use the admin console to setup JDBC connection pool, JDBC connection, and JavaMail resource.
> 7. Use the admin console to deploy my EAR.
>
> At this point, the server works. It's on port 80 and everything seems happy. The problem occurs when I restart glassfish again. The startup never finishes. It just hangs. Here are the last 5 lines of the server.log file:
>
> [#|2007-05-26T07:15:00.526-0700|INFO|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;AWSApp:AWSApp-war.war;server;/aws;|WEB0100: Loading web module [AWSApp:AWSApp-war.war] in virtual server [server] at [/aws]|#]
>
> [#|2007-05-26T07:15:02.992-0700|INFO|sun-appserver-pe9.0|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=10;_ThreadName=main;;|Initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context ''|#]
>
> [#|2007-05-26T07:15:04.122-0700|INFO|sun-appserver-pe9.0|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=10;_ThreadName=main;;|Completed initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context ''|#]
>
> [#|2007-05-26T07:15:04.819-0700|INFO|sun-appserver-pe9.0|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=10;_ThreadName=main;/asadmin;|Initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context '/asadmin'|#]
>
> [#|2007-05-26T07:15:05.833-0700|INFO|sun-appserver-pe9.0|javax.enterprise.resource.webcontainer.jsf.config|_ThreadID=10;_ThreadName=main;/asadmin;|Completed initializing Sun's JavaServer Faces implementation (1.2_02-b03-FCS) for context '/asadmin'|#]
>
> Looking at working log files, the next line would usually be:
>
> [#|2007-05-26T06:52:52.462-0700|INFO|sun-appserver-pe9.0|javax.enterprise.system.container.web|_ThreadID=11;_ThreadName=Thread-4;8080;|WEB0712: Starting Sun-Java-System/Application-Server HTTP/1.1 on 80|#]
>
> It never gets to that line, though. It just sits there. All the threads are either asleep or waiting, from what I can tell.
>
> Once the startup freezes, I can't even get to the admin console. If I kill the process (stop-domain doesn't work either) and modify domain.xml to say port 8080 again, it works.
>
> Here's why I'm so confused. Port 80 only seems to work when started without my app. It used to work fine with my app. Port 8080 always seems to work.
>
> I'm running the glassfish v2 beta right now, but there appear to be some connection pool issues that I'm having with it. I would like to move back to a stable version if possible.
>
> Can anyone provide some insight? If I haven't provided enough information, please let me know what else you need.
> [Message sent by forum member 'trekkyleaper' (trekkyleaper)]
>
> http://forums.java.net/jive/thread.jspa?messageID=219069
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>