Tomcat 服务器启动几秒后关闭?

Tomcat 服务器启动几秒后关闭?

我在 ubuntu pc 上的 tomcat 服务器上遇到了一些奇怪的问题,它可以在启动后几秒内关闭。我仍然无法启动 tomcat 服务器

我的 server.xml 没有错误,我更改了端口,但仍然没有成功

这是我的配置

<Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="20000" 
               redirectPort="8443" />

有什么帮助吗?

我的 catalina.out 错误日志说

Oct 11, 2011 6:34:00 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
LifecycleException:  service.getName(): "Catalina";  Protocol handler start failed: java.net.BindException: Address already in use <null>:8080
    at org.apache.catalina.connector.Connector.start(Connector.java:1094)
    at org.apache.catalina.core.StandardService.start(StandardService.java:534)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
    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:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Oct 11, 2011 6:34:00 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 23691 ms
Oct 11, 2011 6:34:00 AM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[8080]: 
java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
    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:373)
    at org.apache.catalina.startup.Catalina.await(Catalina.java:662)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:614)
    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:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Oct 11, 2011 6:34:00 AM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-8080
Oct 11, 2011 6:34:00 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 11, 2011 6:34:01 AM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Oct 11, 2011 6:34:01 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Oct 11, 2011 6:34:08 AM org.apache.catalina.connector.MapperListener destroy
WARNING: Error unregistering MBeanServerDelegate
java.lang.NullPointerException
    at org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:176)
    at org.apache.catalina.connector.Connector.stop(Connector.java:1135)
    at org.apache.catalina.core.StandardService.stop(StandardService.java:596)
    at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
    at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
Oct 11, 2011 6:34:08 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Oct 11, 2011 6:34:08 AM org.apache.catalina.connector.Connector stop
SEVERE: Coyote connector has not been started
Oct 11, 2011 6:34:09 AM org.apache.catalina.connector.MapperListener destroy
WARNING: Error unregistering MBeanServerDelegate
java.lang.NullPointerException
    at org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:176)
    at org.apache.catalina.connector.Connector.stop(Connector.java:1135)
    at org.apache.catalina.core.StandardService.stop(StandardService.java:596)
    at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
    at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
Oct 11, 2011 6:34:09 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Oct 11, 2011 6:34:09 AM org.apache.catalina.connector.Connector stop
SEVERE: Coyote connector has not been started
Oct 11, 2011 6:34:09 AM org.apache.catalina.connector.MapperListener destroy
WARNING: Error unregistering MBeanServerDelegate
java.lang.NullPointerException
    at org.apache.catalina.connector.MapperListener.destroy(MapperListener.java:176)
    at org.apache.catalina.connector.Connector.stop(Connector.java:1135)
    at org.apache.catalina.core.StandardService.stop(StandardService.java:596)
    at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:648)
    at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:692)
Oct 11, 2011 6:34:09 AM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Oct 11, 2011 6:34:09 AM org.apache.catalina.connector.Connector stop
SEVERE: Coyote connector has not been started

答案1

严重:StandardServer.await:create[8080]:java.net.BindException:地址已在使用中

该端口已被使用。您可能需要使用其他端口,或者找出 8080 上运行的程序并将其停止。

相关内容