jQuery in Action, 3rd edition
The moose likes Tomcat and the fly likes Tomcat Installation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat Installation" Watch "Tomcat Installation" New topic

Tomcat Installation

YumeiWavrek lu

Joined: Oct 02, 2004
Posts: 10

I am trying to run Tomcat on my machine and had following problem.

Run Startup under bin directory, window Dos did fire up the second dos window and it's running but it shuts down automatically and no any error message and didn't display welcome page for me.

My Tomcat version is 5.0.16 and under XP Home Edition.

Is anybody out there had same experience?


YumeiWavrek lu

Joined: Oct 02, 2004
Posts: 10
Here's the message I got in log file.

Can anybody make some suggestion?



2004-10-19 12:31:38 StandardContext[/balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
2004-10-19 12:31:41 StandardContext[/jsp-examples]ContextListener: contextInitialized()
2004-10-19 12:31:41 StandardContext[/jsp-examples]SessionListener: contextInitialized()
2004-10-19 12:31:42 StandardContext[/servlets-examples]ContextListener: contextInitialized()
2004-10-19 12:31:42 StandardContext[/servlets-examples]SessionListener: contextInitialized()
2004-10-19 12:31:45 StandardContext[/servlets-examples]SessionListener: contextDestroyed()
2004-10-19 12:31:45 StandardContext[/servlets-examples]ContextListener: contextDestroyed()
2004-10-19 12:31:45 StandardContext[/jsp-examples]SessionListener: contextDestroyed()
2004-10-19 12:31:45 StandardContext[/jsp-examples]ContextListener: contextDestroyed()
YumeiWavrek lu

Joined: Oct 02, 2004
Posts: 10
OK, Here's the message I got from DOS screen.

Binding Exception. can anyone help me?



INFO: Installing web application at context path from URL file:C:\jakarta-tomca
Oct 19, 2004 1:10:30 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /servlets-examples from URL fil
Oct 19, 2004 1:10:30 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Installing web application at context path /tomcat-docs from URL file:C:\j
Oct 19, 2004 1:10:30 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 8080
Oct 19, 2004 1:10:31 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /
Oct 19, 2004 1:10:31 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/80 config=C:\jakarta-tomcat-5.0.16\conf\jk2.proper
Oct 19, 2004 1:10:31 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 13179 ms
StandardServer.await: create[8005]: java.net.BindException: Address already in u
se: JVM_Bind
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:331)
at java.net.ServerSocket.bind(ServerSocket.java:318)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:535
at org.apache.catalina.startup.Catalina.await(Catalina.java:637)
at org.apache.catalina.startup.Catalina.start(Catalina.java:599)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
Oct 19, 2004 1:10:32 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 19, 2004 1:10:32 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stoping http11 protocol on 8080 Catalina:type=ThreadPool,name=http8080
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

you have probably installed Tomcat as a service? "Address already in use" means that Tomcat is trying to bind to a port that someone else is already using. That someone else could be the instance of Tomcat that starts with your computer.

Other suspects include 'other web servers', 'other app servers', 'database servers' and 'file sharing applications'.
YumeiWavrek lu

Joined: Oct 02, 2004
Posts: 10
thank you mike.

but what's that mean? I do have Eclipse and JRE on my machine but I removed them all(uninstall) and reinstall the JDK and tomcat.

the problem is persistant.

How do I check the port is being used?

Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
Hi Yumei,

Before starting tomcat, check if port 8080 is being used by running "netstat". Next, refer to "Local Address" column:

c:\> netstat -na
c:\> netstat -na | grep 8080

If the port is being used, track which process is listening on.

Tomcat runs on default port 8080. Check the file server.xml.

<Connector port="8080"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"

For more info on changing port, check out CoreServlet: Change Port.

[ October 19, 2004: Message edited by: Joyce Lee ]
YumeiWavrek lu

Joined: Oct 02, 2004
Posts: 10

Thank you very much and I got that smiling face of Tomcat in front of me now. One of the ports is used by my old version of JRE, I think.


Consider Paul's rocket mass heater.
subject: Tomcat Installation
It's not a secret anymore!