Hi,

I am exactly at the same point in my transition from JServ to Tomcat.
I just got over the problem you mention.

The problem is that Tomcat is trying to listen on a port that is already
being listened to by another process.

In my case, I already had an Apache web server running on 8080/8443
(HTTP/HTTPS).
When I tried to start tomcat, I got the error you describe below.

The solution was to comment out the Http Connector section 
in $TOMCAT_HOME/conf/server.xml so that
Tomcat doesn't try to be a web server too.

This solved the problem, and I started cleanly.
After I successfully did this, I realized that I wanted to experiment with
Tomcat's web server alongside my Apache web server.
So I edited $TOMCAT_HOME/server.xml again.
This time, I simply made the HTTP port 8081.

I restarted and everything works great.
I can now make HTTP requests through Apache (8080) or straight to Tomcat
(8081).

Stephen

P.S. Sometimes, on a failure in startup.sh, shutdown.sh would not clean up
all the processes.  In this case, you may need to manually (explicitly)
kill those processes.  Maybe the conflict is with them and not with the
Apache server.


At 09:50 PM 10/24/00 GMT, you wrote:
>Hi all.
>
>Our site was running Apache+Jserv, and we decided to switch to Tomcat to add 
>JSP support. I downloaded Tomcat and tried to start it up, and I got the 
>following error message:
>
>[root@atari bin]# ./startup.sh
>Guessing TOMCAT_HOME from tomcat.sh to ./..
>Setting TOMCAT_HOME to ./..
>Using classpath:
>:./../lib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar:./../
>lib/test:./../lib/webserver.jar:./../lib/xml.jar:/usr/local/java/lib/tools.j
>ar
>[root@atari bin]# Context log: path="/examples" Adding context
>path="/examples"
>docBase="webapps/examples"
>Context log: path="" Adding context path=""  docBase="webapps/ROOT"
>Context log: path="/test" Adding context path="/test"
>docBase="webapps/test"
>Starting tomcat. Check logs/tomcat.log for error messages
>Starting tomcat install="./.." home="/usr/local/tomcat"
>classPath=".:./../lib/ant.
>jar:./../lib/jasper.jar:./../lib/servlet.jar:./../lib/test:./../lib/webserve
>r.jar:
>/../lib/xml.jar:/usr/local/java/lib/tools.jar"
>Context log: path="/admin" Automatic context load
>docBase="/usr/local/tomcat/webap
>ps/admin"
>Context log: path="/admin" Adding context path="/admin"
>docBase="/usr/local/tomca
>t/webapps/admin"
>FATAL:java.net.BindException: Address already in use
>java.net.BindException: Address already in use
>        at java.net.PlainSocketImpl.socketBind(Native Method)
>        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:414)
>        at java.net.ServerSocket.<init>(ServerSocket.java:182)
>        at java.net.ServerSocket.<init>(ServerSocket.java:132)
>        at
>org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultSe
>rverSocketFactory.java:97)
>        at
>org.apache.tomcat.service.SimpleTcpEndpoint.startEndpoint(SimpleTcpEndp
>oint.java:186)
>        at
>org.apache.tomcat.service.SimpleTcpConnector.start(SimpleTcpConnector.j
>ava:142)
>        at
>org.apache.tomcat.core.ContextManager.start(ContextManager.java:253)
>        at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:157)
>        at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)
>
>Does anyone can help?
>
>Thanks you.
>
>Regards,
>Nelson
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at 
>http://profiles.msn.com.
>

Reply via email to