Tomcat常见错误

来源:互联网 发布:网络女主播会真心的吗 编辑:程序博客网 时间:2024/05/22 22:14

Tomcat v6.0Server at localhost

ServerTomcat v6.0 Server at localhost was unable to start within 45 seconds. If theserver requires more time, try increasing the timeout in the server editor.

 

错误 :
Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds.If the server requires more time, try increasing the timeout in the servereditor. 
也就是我们限定了部署的时间导致的错误。

修改workspace\.metadata\.plugins\org.eclipse.wst.server.core\servers.xml文件。 
<servers> 
<server hostname="localhost" id="JBoss v5.0 atlocalhost" name="JBoss v5.0 at 
localhost" runtime-id="JBoss v5.0"server-type="org.eclipse.jst.server.generic.jboss5" 
server-type-id="org.eclipse.jst.server.generic.jboss5" start-timeout="1000"stop- 
timeout="15" timestamp="0"> 
<map jndiPort="1099"key="generic_server_instance_properties" port="8090" 
serverAddress="127.0.0.1" serverConfig="default"/> 
</server> 
</servers> 
其中的start-timeout="45"改为  start-timeout="100"或者更长,根据不同同学的工程大小来设置。最后重启eclipse就可以了。

 

Tomcat 8080端口被占用,解决方法

方法一:

我也觉得改端口比较好点8080端口被占用的情况还是有的..像跟ORACLE一起用的时候就会出问题....你改成8288,8899等等...

以下是我文件里的端口,见红色部分..在\tomcat-6.0.14\conf文件夹下的server.xml 第50行左右...

<Connector port="8288"protocol="HTTP/1.1" onnectionTimeout="20000"

redirectPort="8443"URIEncoding ="UTF-8"/>

方法二:

  1.打开CMD. cmd
2.查找端口号的PID netstat -a -o (有了PID可以看看到底是很那个应用程序占用的)
3.强行关闭 ntsd -c q -p PID(查询出来的PID号码) 【ntsd不正确】