我的WebApplication托管在apache tomcat上,当我尝试访问该网站时,它只是继续加载而且没有返回任何网页。
当我检查apache-tomcat目录时,那些目录中有堆转储。
然后我重新启动了我的服务器,重新启动后,网络应用程序无效。
当我查看catalina日志时,我发现了这些陈述:
SEVERE: Catalina.start
LifecycleException: Protocol handler initialization failed: java.net.BindException: The socket name is already in use.:8080
at org.apache.catalina.connector.Connector.initialize(Connector.java:1019)
at org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
at org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Oct 19, 2012 7:27:04 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2281 ms
Oct 19, 2012 7:27:04 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Oct 19, 2012 7:27:04 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
Oct 19, 2012 7:27:04 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Oct 19, 2012 7:27:05 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/sun/student0/webapps/WEB-INF/lib/j2ee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:05 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/sun/student0/webapps/WEB-INF/lib/javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:05 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/sun/student0/webapps/WEB-INF/lib/javax.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:05 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/sun/student0/webapps/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:05 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/sun/student0/webapps/WEB-INF/lib/tomcat-5.5-servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
2012-10-19 07:27:06 - Database - Driver: com.sybase.jdbc2.jdbc.SybDriver URL: jdbc:sybase:Tds:Student:2025/student User: studentweb
2012-10-19 07:27:06 - Connection Pool - Min: 1 Max: 1 Days: 1.0
Oct 19, 2012 7:27:07 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/opt/apache-tomcat-5.5.25/webapps/ROOT/WEB-INF/lib/j2ee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:07 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/opt/apache-tomcat-5.5.25/webapps/ROOT/WEB-INF/lib/javaee.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:07 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/opt/apache-tomcat-5.5.25/webapps/ROOT/WEB-INF/lib/javax.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:07 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/opt/apache-tomcat-5.5.25/webapps/ROOT/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:07 AM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/opt/apache-tomcat-5.5.25/webapps/ROOT/WEB-INF/lib/tomcat-5.5-servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
Oct 19, 2012 7:27:08 AM org.apache.coyote.http11.Http11BaseProtocol start
SEVERE: Error starting endpoint
java.net.BindException: The socket name is already in use.:8080
at org.apache.tomcat.util.net.PoolTcpEndpoint.initEndpoint(PoolTcpEndpoint.java:298)
at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.java:313)
at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:151)
at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:76)
at org.apache.catalina.connector.Connector.start(Connector.java:1090)
at org.apache.catalina.core.StandardService.start(StandardService.java:457)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Oct 19, 2012 7:27:08 AM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start:
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: java.net.BindException: The socket name is already in use.:8080
at org.apache.catalina.connector.Connector.start(Connector.java:1097)
at org.apache.catalina.core.StandardService.start(StandardService.java:457)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Oct 19, 2012 7:27:08 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3489 ms
答案 0 :(得分:1)
您已绑定端口8080,更改tomcat端口并尝试重新启动
1)在{Tomcat安装文件夹} \ conf \
中找到server.xml2)找到以下类似的陈述
<!-- Define a non-SSL HTTP/1.1 Connector on port 8180 -->
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
或
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
将8080更改为您选择的任何其他端口,保存文件然后启动tomcat。