Why Tomcat shutdowns after startup?
I installed tomcat 5 on linux(ubuntu) but after starting it up, it goes down automat开发者_JS百科ically I checked by this command:
lsof -i:8080
and it showed the java, but after one second, when i do it again(lsof -i:8080) it showed nothing
I checked the logs and saw this:
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:336)
at java.net.ServerSocket.bind(ServerSocket.java:336)
at java.net.ServerSocket.<init>(ServerSocket.java:202)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:363)
at org.apache.catalina.startup.Catalina.await(Catalina.java:616)
at org.apache.catalina.startup.Catalina.start(Catalina.java:576)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
but no process uses the port 8080, i checked by netstat
Go to your tomcat bin dir (typically something like : /usr/local/tomcat/bin) and run:
./catalina.sh run
This will show you output from startup. One of the issues could be that port your instance of Tomcat was configured to run on has already been taken (try nestat -an|grep yourportnumber) to get the list of ports in use.
精彩评论