linux 下 tomcat 一天挂掉几次!百度几天了,求支招,谢谢。

Sagar 发布于 2014/06/04 09:39
阅读 25K+
收藏 0

挂掉前的日志如下:

Jun 3, 2014 11:17:05 AM org.apache.coyote.http11.AbstractHttp11Processor process

SEVERE: Error processing request
java.lang.IllegalArgumentException: Control character in cookie value or attribute.
    at org.apache.tomcat.util.http.CookieSupport.isHttpSeparator(CookieSupport.java:193)
    at org.apache.tomcat.util.http.Cookies.processCookieHeader(Cookies.java:272)
    at org.apache.tomcat.util.http.Cookies.processCookies(Cookies.java:168)
    at org.apache.tomcat.util.http.Cookies.getCookieCount(Cookies.java:106)
    at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:932)
    at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:689)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Jun 3, 2014 11:17:07 AM org.apache.coyote.http11.AbstractHttp11Processor process
SEVERE: Error processing request
java.lang.IllegalArgumentException: Control character in cookie value or attribute.
    at org.apache.tomcat.util.http.CookieSupport.isHttpSeparator(CookieSupport.java:193)
    at org.apache.tomcat.util.http.Cookies.processCookieHeader(Cookies.java:272)
    at org.apache.tomcat.util.http.Cookies.processCookies(Cookies.java:168)
    at org.apache.tomcat.util.http.Cookies.getCookieCount(Cookies.java:106)
    at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:932)
    at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:689)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Jun 3, 2014 6:02:40 PM org.apache.coyote.http11.AbstractHttp11Processor process
SEVERE: Error processing request
java.lang.NullPointerException
    at org.apache.tomcat.util.buf.CharChunk.append(CharChunk.java:355)
    at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:680)
    at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:647)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Jun 3, 2014 11:42:09 PM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Jun 3, 2014 11:42:09 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-80"]
Jun 3, 2014 11:42:10 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /opt/jdk1.6.0_37/jre/lib/amd64/server:/opt/jdk1.6.0_37/jre/lib/amd64:/opt/jdk1.6.0_37/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Jun 3, 2014 11:42:10 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
Jun 3, 2014 11:42:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-80"]
Jun 3, 2014 11:42:10 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Jun 3, 2014 11:42:10 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jun 3, 2014 11:42:10 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1109 ms
Jun 3, 2014 11:42:10 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 3, 2014 11:42:10 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Jun 3, 2014 11:42:10 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /opt/tomcat4smartphone/apache-tomcat/webapps/smartphone.war
Jun 3, 2014 11:42:11 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(/opt/tomcat4smartphone/apache-tomcat/webapps/smartphone/WEB-INF/lib/javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

加载中
0
算法与编程之美
S
Sagar
我试了下,在tail-f 还在运行的情况下,我直接关掉vpn ssh退出,然后再请求接口,发现tomcat死掉了。。。长记性了,感谢兄台,希望看到此问题的人也注意下操作习惯,不犯这种低级错误。
S
Sagar
感谢,我先看看。
1
寒情漠漠
寒情漠漠

Cookie内容有中文字符 使用URLEncoder编码解码

0
工号1024
工号1024
google 几天可能就会有解决方法了
雷泽
回复 @Sagar : www.aol.com 也是用的Google引擎
S
Sagar
嗯,今天google了,为此还把host改了,来解决google访问不顺畅问题...
0
挖粪涂墙
挖粪涂墙
tomcat里面的字符集修改了吗?
S
Sagar
修改了,坐等看挂不挂,感谢!
0
南湖船老大
南湖船老大

java.lang.IllegalArgumentException: Control character in cookie value or attribute. 

好好检查你的cookie,以及你对cookie的处理部分

S
Sagar
回复 @char1st : 我在tomcat里面有作监听,如果挂掉的时候会自动去重启tomcat,此代码和这应该有点关系吧。
char1st
char1st
关键是这个INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance. 是不是觉得很奇怪?
0
挖粪涂墙
挖粪涂墙
<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8" />



挖粪涂墙
挖粪涂墙
URIEncoding="UTF-8" 这个修改了吗
0
ljiang
ljiang
<Server port="8005" shutdown="SHUTDOWN">

把这个默认端口和SHUTDOWN改了试试,没记错的话,可以通过telnet yourhost 8005 输入SHUTDOWN 关掉你的tomcat



ljiang
ljiang
回复 @Sagar : Tomcat没停掉,但出现了同样的log INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
S
Sagar
这位兄台想法很给力啊,不过我测试了一下,用telnet 是没法关掉tomcat的,感谢。
0
挖粪涂墙
挖粪涂墙
楼上想多了,楼主先看看会不会挂再说吧
0
S
Sagar
Jun 4, 2014 10:21:00 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1701 ms
Jun 4, 2014 10:21:00 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 4, 2014 10:21:00 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.42
Jun 4, 2014 10:21:00 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /opt/tomcat4smartphone/apache-tomcat/webapps/smartphone.war
Jun 4, 2014 10:21:01 PM org.apache.catalina.loader.WebappClassLoader validateJarFile

INFO: validateJarFile(/opt/tomcat4smartphone/apache-tomcat/webapps/smartphone/WEB-INF/lib/javax.servlet-api-3.1.0.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

这是今天早上来的结果,还是挂掉了。。。

S
Sagar
回复 @char1st : 是的,我昨天10点多的时候已经就挂掉了,我又重启了一下,然后今天早上来 tail -f catalina.out 就是这些错误代码了。而且我访问我的应用是没法访问的,证明挂掉了。
char1st
char1st
就是说昨天晚上10:21启动后到现在没有挂掉。 前面的日志和之前贴的日志是一样的么?
S
Sagar
回复 @char1st : 没有,就这些了。
char1st
char1st
后面还有日志么?
0
Jack_Q
Jack_Q

换一个tomcat版本试下。

认真检查log日志。

S
Sagar
我的是tomcat 7.0.42 本地开发环境用的是Apache Tomcat/7.0.53这也不是很老的版本,如果是tomcat的问题,应该网上很容易找到答案才是啊。
返回顶部
顶部