当前位置: 技术问答>linux和unix
Linux系统下,Tomcat启动有时报Address already in use<null>:8080
来源: 互联网 发布时间:2017-03-03
本文导语: 我知道 是端口被占用,可是第一次启动就是成功的,再关闭后,重启就报错,具体错误码信息如下: 2010-10-24 18:12:23 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows o...
我知道 是端口被占用,可是第一次启动就是成功的,再关闭后,重启就报错,具体错误码信息如下:
2010-10-24 18:12:23 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk1.5.0_06/jre/lib/i386/server:/usr/local/jdk1.5.0_06/jre/lib/i386:/usr/local/jdk1.5.0_06/jre/../lib/i386:/opt/sybase/OCS-12_5/lib:/opt/sybase/OCS-12_5/lib3p:/opt/sybase/SQLRemote/lib:/opt/sybase/ASE-12_5/lib:/opt/sybase/OCS-12_5/lib:/opt/sybase/OCS-12_5/lib3p:/opt/sybase/SQLRemote/lib:/opt/sybase/ASE-12_5/lib:
2010-10-24 18:12:23 org.apache.coyote.http11.Http11Protocol init
严重: Error initializing endpoint
java.net.BindException: Address already in use:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2010-10-24 18:12:23 org.apache.catalina.startup.Catalina load
严重: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:8080
at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2010-10-24 18:12:23 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 574 ms
这个项目里面使用的数据库是Sybase,另:在配制 Tomcat 时,那个文件夹名字有个空格怎么设置可以有效?
2010-10-24 18:12:23 org.apache.catalina.core.AprLifecycleListener init
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk1.5.0_06/jre/lib/i386/server:/usr/local/jdk1.5.0_06/jre/lib/i386:/usr/local/jdk1.5.0_06/jre/../lib/i386:/opt/sybase/OCS-12_5/lib:/opt/sybase/OCS-12_5/lib3p:/opt/sybase/SQLRemote/lib:/opt/sybase/ASE-12_5/lib:/opt/sybase/OCS-12_5/lib:/opt/sybase/OCS-12_5/lib3p:/opt/sybase/SQLRemote/lib:/opt/sybase/ASE-12_5/lib:
2010-10-24 18:12:23 org.apache.coyote.http11.Http11Protocol init
严重: Error initializing endpoint
java.net.BindException: Address already in use:8080
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:502)
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:176)
at org.apache.catalina.connector.Connector.initialize(Connector.java:1058)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2010-10-24 18:12:23 org.apache.catalina.startup.Catalina load
严重: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:8080
at org.apache.catalina.connector.Connector.initialize(Connector.java:1060)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:677)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:530)
at org.apache.catalina.startup.Catalina.load(Catalina.java:550)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:260)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:412)
2010-10-24 18:12:23 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 574 ms
这个项目里面使用的数据库是Sybase,另:在配制 Tomcat 时,那个文件夹名字有个空格怎么设置可以有效?
|
那是因为你的tomcat已经启动了 tomcat自带的关闭脚本 有时候关闭看上去成功了 其实并没有关闭了
你可以ps -ef | grep java查看 如果还在 就用kill -9 pid把它杀掉 再启动tomcat
另外在linux下 尽量避免用带空格的文件名 文件夹 容易搞错 在使用空格的时候加转义字符 即空格
你可以ps -ef | grep java查看 如果还在 就用kill -9 pid把它杀掉 再启动tomcat
另外在linux下 尽量避免用带空格的文件名 文件夹 容易搞错 在使用空格的时候加转义字符 即空格