2012-10-19 177 views
0

我的WebApplication託管在apache tomcat上,當我嘗試訪問網站時,它只是繼續加載並且沒有返回任何網頁。Tomcat未啓動

當我檢查apache-tomcat目錄時,這些目錄中有堆轉儲。

然後我重新啓動我的服務器,重新啓動後,web應用程序不起作用。

當我檢查了卡特琳娜日誌,我發現這些語句:

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 

回答

1

你已經有8080端口綁定,改變tomcat的端口,並嘗試重新啓動

1){Tomcat安裝server.xml中找到文件夾} \的conf \

2)找到以下類似的語句

<!-- 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。

+0

我做了更改,並將端口更改爲8081,並重新啓動服務器和應用程序,但如果我將端口更改回8080並重新啓動web應用程序不起作用。 –

+0

然後才能使8080工作,你必須停止服務運行在端口8080上,在你的情況下,我懷疑它是Oracle XE或ORacle 10g/11g。如果答案有效,請接受它 – Satya