tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Hrastnik <peter.hrast...@1012surf.net>
Subject Re: strange way to start tomcat
Date Fri, 06 Jul 2001 07:15:09 GMT
The first time a jsp script is requested, it has to be compiled. This
procedure takes some time. But I agree with you: Waiting some minutes is
very long. What processor, memory etc do you have and is the machine
loaded (use top to display the load). Perhaps you should try to use
another JVM?

That the sequence (start, stop, start, start) works could have following
reasons:
* The first time you start, everything seems to be ok.
* Then you stop.
* The next startup tells you, that the port is already used, so tomcat
was not stopped properly. Did you do a ps -edaf to view your processes
after the shutdown? Perhaps there are hanging java processes/threads?
* The next time you start is the same as before: the port is used
already

I think that something triggers the compilation of your jsp while you
perform that procedure and tomcat is not shut down at all. When you try
to access your jsp afterwards, it is already compiled and so it is
served faster.

I would try another, more up-to-date JVM.

Bye,
	Peter.


-- 
Mag. Peter Hrastnik
tele.ring Telekom Service GmbH
A-1030 Wien, Hainburgerstr. 33
Tel.: +43/1/931012/3277, Mobil: +43/650/6503277



Krishna Muthyala wrote:
> 
> Alex
> 
> Looks like the port on which tomcat is using is being
> already used by something else , hence the bind
> exception
> 
> kris
> --- Alex Madon <madon@cma-it.com> wrote:
> > Hello
> > I downloaded tomcat 3.2.2 binaries distribution and
> > installed it in my
> > /opt (SuSE linux 7.0) dir.
> >
> > The sequence from the doc:
> > TOMCAT_HOME=/opt/jakarta-tomcat-3.2.2 ; export
> > TOMCAT_HOME;
> > JAVA_HOME=/usr/lib/jdk1.1.8/; export JAVA_HOME;
> > bin/startup.sh
> >
> > didn't work:
> > the server serves pages only very very slow (have to
> > wait to minutes to
> > get a page)
> > when I connect to port 8080.
> >
> > The only way I found to make it work is to issue the
> > forllowing sequence
> > of
> > startup.sh and shutdown.sh:
> >
> > bin/startup.sh
> > bin/shutdown.sh
> > bin/startup.sh
> > bin/startup.sh
> >
> > Follwos the output of issuing the commands.
> > Does somebody has an idea to make it work on the
> > first bin/startup.sh?????????
> >
> > Thanks
> > Alex
> >
> >
> >
> > ---------------------------------------
> > torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh
> > start
> > Using classpath:
> >
> /opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar
> > torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat.
> > Check
> > logs/tomcat.log for error messages
> > 2001-07-05 09:49:40 - ContextManager: Adding context
> > Ctx( /examples )
> > 2001-07-05 09:49:40 - ContextManager: Adding context
> > Ctx( /admin )
> > 2001-07-05 09:49:40 - ContextManager: Adding context
> > Ctx(  )
> > 2001-07-05 09:49:40 - ContextManager: Adding context
> > Ctx( /test )
> > 2001-07-05 09:49:46 - PoolTcpConnector: Starting
> > HttpConnectionHandler
> > on 8080
> >
> > torino:/opt/jakarta-tomcat-3.2.2 #
> > torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh
> > stop
> > Using classpath:
> >
> /opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar
> > Stop tomcat
> > 2001-07-05 09:49:46 - PoolTcpConnector: Starting
> > Ajp12ConnectionHandler
> > on 8007
> > torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh
> > start
> > Using classpath:
> >
> /opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar
> > torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat.
> > Check
> > logs/tomcat.log for error messages
> > 2001-07-05 09:49:55 - ContextManager: Adding context
> > Ctx( /examples )
> > 2001-07-05 09:49:55 - ContextManager: Adding context
> > Ctx( /admin )
> > 2001-07-05 09:49:55 - ContextManager: Adding context
> > Ctx(  )
> > 2001-07-05 09:49:55 - ContextManager: Adding context
> > Ctx( /test )
> > FATAL:java.net.BindException: Address already in use
> > java.net.BindException: Address already in use
> >         at
> >
> java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363)
> >         at
> > java.net.ServerSocket.<init>(ServerSocket.java:138)
> >         at
> > java.net.ServerSocket.<init>(ServerSocket.java:102)
> >         at
> >
> org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97)
> >         at
> >
> org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:239)
> >         at
> >
> org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188)
> >         at
> >
> org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
> >         at
> >
> org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
> >         at
> >
> org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
> >
> > torino:/opt/jakarta-tomcat-3.2.2 #
> > torino:/opt/jakarta-tomcat-3.2.2 # bin/tomcat.sh
> > start
> > Using classpath:
> >
> /opt/jakarta-tomcat-3.2.2/lib/ant.jar:/opt/jakarta-tomcat-3.2.2/lib/jasper.jar:/opt/jakarta-tomcat-3.2.2/lib/jaxp.jar:/opt/jakarta-tomcat-3.2.2/lib/parser.jar:/opt/jakarta-tomcat-3.2.2/lib/servlet.jar:/opt/jakarta-tomcat-3.2.2/lib/test:/opt/jakarta-tomcat-3.2.2/lib/webserver.jar
> > torino:/opt/jakarta-tomcat-3.2.2 # Starting tomcat.
> > Check
> > logs/tomcat.log for error messages
> > 2001-07-05 09:50:08 - ContextManager: Adding context
> > Ctx( /examples )
> > 2001-07-05 09:50:08 - ContextManager: Adding context
> > Ctx( /admin )
> > 2001-07-05 09:50:08 - ContextManager: Adding context
> > Ctx(  )
> > 2001-07-05 09:50:08 - ContextManager: Adding context
> > Ctx( /test )
> > FATAL:java.net.BindException: Address already in use
> > java.net.BindException: Address already in use
> >         at
> >
> java.net.PlainSocketImpl.bind(PlainSocketImpl.java:363)
> >         at
> > java.net.ServerSocket.<init>(ServerSocket.java:138)
> >         at
> > java.net.ServerSocket.<init>(ServerSocket.java:102)
> >         at
> >
> org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:97)
> >         at
> >
> org.apache.tomcat.service.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:239)
> >         at
> >
> org.apache.tomcat.service.PoolTcpConnector.start(PoolTcpConnector.java:188)
> >         at
> >
> org.apache.tomcat.core.ContextManager.start(ContextManager.java:527)
> >         at
> >
> org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:202)
> >         at
> >
> org.apache.tomcat.startup.Tomcat.main(Tomcat.java:235)
> >
> > torino:/opt/jakarta-tomcat-3.2.2 #
> > torino:/opt/jakarta-tomcat-3.2.2 #
> > torino:/opt/jakarta-tomcat-3.2.2 # ps aux | grep
> > tomcat
> > root      6316  7.5  1.8 25844 4828 pts/2    S
> > 09:49   0:06
> > /usr/lib/jdk1.1.8//bin/i686/green_threads/java
> > -Dtomcat.home=/opt/jakarta-tomcat-3.2.2
> > org/apache/tomcat/startup/Tomcat
> > -----------------------------------------------
> >
> >
> > --
> > Capital Management Advisors
> > Via Piave 8 00187 Roma, Italy
> > Tel: (39)06 42036611 Fax: (39)06 4873968
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/

Mime
View raw message