这里是我遇到的一个很郁闷的问题,希望有人遇到过类似问题...
这个问题我在Resin的maillist里面提的,所以只能copy/paste我这些乱七八糟的英文了。
如果有人在今年年底前发现这个问题的原因,请mailto:zixia@yahoo.com
I use Linux Redhat6.2 with IBMJava2-SDK-13/Jikes1.12 Resin1.2.b2...
the web server is resin's httpd.sh ...
a user named web start the httpd.sh ( ./httpd.sh start )
resin start normally. but after a while( run some jsp pages ), the
resin server has no responses.....
I bind the resin listen port to 8080... use kHTTPd to forward the
requests...
when resin works, I can see the jsp pages...
when this problem appear, the symptom is: I can telnet to the port
8080, and I aoso can input : GET / HTTP/1.0\n\n ...( the '\n' here is
a Enter)... but the resin server doesn't appear anything...
the log files( stdout.log/stderr.log/error.log ) does not log
anything too...
if I use IE to visit http://my-host:8080/, the IE tell me: "opening
the pages...". It stands there untill ie(or resin?) timeout... use
telnet to have a look, find resin server has no response, and does
not close the connection...
if I use IE to visit http://my-host/( use kHTTPd to forward the
request ), IE appear a empty document. use telnet to have a look,
find that kHTTPd returns:
GET / HTTP/1.0 - my input
HTTP/1.0 403 Forbidden -khttpd output
Server: kHTTPd 0.1. -khttpd output
then, khttpd closed the connection.( that is the reason why IE appear
a empty document )
I think this problem caused by some jsp pages( or JavaBeans ),
because it frequency happen after some JSP page and JavaBeans
changed... I think this is a resin bug...
can scott give me some advice about void this things happen?
****************************************
Sounds like a possible dead lock.Try doing a thread dump (CTRL+\ or
sending the process a QUIT signal) to see what lock it is possibly waiting
for.
Calvin
****************************************
hi, Calvin,
I try to killall -QUIT java but nothing happend...
can you kind enough to tell me how to do a thread dump?
great thanks... :P
and, I found out the reason cause resin server freeze...
I use JDBC(thin driver) connect to Oracle8i(8.1.6),
and I found a SQLException: java.sql.SQLException: Protocol violation
exist in the stderr.log...
when this exception occured, the resin will freeze... faint...
here's the log message, it may be help...
ps. my jdbc driver for oracle is download from www.oracle.com
yesterday... is it a jdbc bug?
=== BoardAccessBean.java ==============================================
16 synchronized private boolean Get(BoardBean bd,ResultSet rs){
17 try {
18 int NOTP=bd.m_NumOfThisPage;
19 for(int i=0;i<NOTP;i++){
20
bd.m_OutAutoID[NOTP-i]=rs.getInt("AutoID");
21
bd.m_OutTitle[NOTP-i]=Utils.DB2Page(rs.getString("Title"));
22
bd.m_OutAccess[NOTP-i]=rs.getInt("Accessed");
23
bd.m_OutOwner[NOTP-i]=Utils.DB2Page(rs.getString("Owner"));
24
bd.m_OutTitleClass[NOTP-i]=rs.getInt("TitleClass");
25
bd.m_OutPostTime[NOTP-i]=rs.getInt("LastUpdate");
26 //FIXME: Protocol Violation
27 if(!rs.next())break;
^^^^^^^^^^^^^^^^^^^ HERE!!
28 }
29 return true;
30 }catch(Exception e){
31 Utils.Log(e,"");
32 return false;
33 }
34 }
... ...
242 try{
243 Statement stmt = conn.createStatement();
244 stmt.setQueryTimeout(0);
245 Utils.Log("start select");
246 ResultSet rs = stmt.executeQuery(sql);
247 if (!rs.next()) {
248 stmt.close();
249 return false;
250 }
251 else {
252 Utils.Log("selected");
253 bd.m_PageNum=PN;
254 bd.m_ArticleNum=AN;
255 bd.m_LastPostTime=PostTime;
256 bd.m_CurPage=CP;
257 bd.m_OutStartNo=OSN;
258 bd.m_OutEndNo=OEN;
259 bd.m_NumOfThisPage=NOTP;
260 Get(bd,rs);
261 bd.m_OutMinID=bd.m_OutAutoID[1];
262 bd.m_OutMaxID=bd.m_OutAutoID[NOTP];
263 bd.m_CurArticle=OSN;
264
Utils.Log("OSN="+OSN+",NOTP="+NOTP);
265 //FIXME: Protocol Violation
266 stmt.close();
^^^^^^^^^^^^^^^^ HERE!
267 return true;
268 }
269 }catch (Exception e){
270 Utils.Log(e,"");
271 return false;
272 } finally {
273 try{conn.close();}catch(Exception e){}
274 }
=== stderr.log ======================================
hu Oct 19 06:21:04 CST 2000: BoardNum=203
Thu Oct 19 06:21:04 CST 2000: BoardNum=203
Thu Oct 19 06:21:11 CST 2000: select count(*) from BoardFileList_TB where
IsDeleted=0 and BoardAutoID=86
Thu Oct 19 06:21:11 CST 2000: AN=4843
Thu Oct 19 06:21:11 CST 2000: select Max(LastUpdate) from BoardFileList_TB where
IsDeleted=0 and BoardAutoID=86
Thu Oct 19 06:21:11 CST 2000: AN=4843
Thu Oct 19 06:21:11 CST 2000: NOTP=20
Thu Oct 19 06:21:11 CST 2000: select * from (select * from (select * from
BoardFileList_TB where IsDeleted=0 and BoardAutoID=86 orde
r by AutoID) where rownum<=4843 order by AutoID desc) where rownum<=20
Thu Oct 19 06:21:11 CST 2000: start select
Thu Oct 19 06:21:11 CST 2000: selected
Thu Oct 19 06:21:11 CST 2000:
java.sql.SQLException: Protocol violation
at java.sql.SQLException.<init>(SQLException.java:45)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:803)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java(Compiled Code))
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:797)
at
oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java(Compiled
Code))
at com.bbser.board.BoardAccessBean.Get(BoardAccessBean.java:27)
at com.bbser.board.BoardAccessBean.ListArticle(BoardAccessBean.java:260)
at com.bbser.board.BoardBean.ListBySequence(BoardBean.java:82)
at _jsp._listarticle__jsp._jspService(_listarticle__jsp.java:97)
at com.caucho.jsp.JavaPage.service(JavaPage.java:89)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:83)
at com.caucho.jsp.Page.service(Page.java:303)
at com.caucho.jsp.Page.service(Page.java:303)
at com.caucho.server.http.Invocation.service(Invocation.java:230)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:205)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:144)
at com.caucho.server.TcpConnection.run(TcpConnection.java:133)
at java.lang.Thread.run(Thread.java:498)
Thu Oct 19 06:21:11 CST 2000: OSN=4824,NOTP=20
Thu Oct 19 06:21:11 CST 2000:
java.sql.SQLException: Protocol violation
at java.sql.SQLException.<init>(SQLException.java:45)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:803)
at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:130)
at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:493)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:467)
at com.bbser.board.BoardAccessBean.ListArticle(BoardAccessBean.java:266)
at com.bbser.board.BoardBean.ListBySequence(BoardBean.java:82)
at _jsp._listarticle__jsp._jspService(_listarticle__jsp.java:97)
at com.caucho.jsp.JavaPage.service(JavaPage.java:89)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:83)
at com.caucho.jsp.Page.service(Page.java:303)
at com.caucho.server.http.Invocation.service(Invocation.java:230)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:205)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:144)
at com.caucho.server.TcpConnection.run(TcpConnection.java:133)
at java.lang.Thread.run(Thread.java:498)
at com.caucho.server.TcpConnection.run(TcpConnection.java:133)
at java.lang.Thread.run(Thread.java:498)
Thu Oct 19 06:21:13 CST 2000: select count(*) from BoardFileList_TB where
IsDeleted=0 and BoardAutoID=86
Thu Oct 19 06:21:13 CST 2000: AN=4843
Thu Oct 19 06:21:13 CST 2000: select Max(LastUpdate) from BoardFileList_TB where
IsDeleted=0 and BoardAutoID=86
Thu Oct 19 06:21:13 CST 2000: AN=4843
Thu Oct 19 06:21:13 CST 2000: NOTP=20
Thu Oct 19 06:21:13 CST 2000: select * from (select * from (select * from
BoardFileList_TB where IsDeleted=0 and BoardAutoID=86 orde
r by AutoID) where rownum<=4843 order by AutoID desc) where rownum<=20
Thu Oct 19 06:21:13 CST 2000: start select
Thu Oct 19 06:21:14 CST 2000: selected
Thu Oct 19 06:21:14 CST 2000:
java.sql.SQLException: Protocol violation
at java.sql.SQLException.<init>(SQLException.java:45)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:803)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java(Compiled Code))
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1311)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:797)
at
oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java(Compiled
Code))
at com.bbser.board.BoardAccessBean.Get(BoardAccessBean.java:27)
at com.bbser.board.BoardAccessBean.ListArticle(BoardAccessBean.java:260)
at com.bbser.board.BoardBean.ListBySequence(BoardBean.java:82)
at _jsp._listarticle__jsp._jspService(_listarticle__jsp.java:97)
at com.bbser.board.BoardBean.ListBySequence(BoardBean.java:82)
at _jsp._listarticle__jsp._jspService(_listarticle__jsp.java:97)
at com.caucho.jsp.JavaPage.service(JavaPage.java:89)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:83)
at com.caucho.jsp.Page.service(Page.java:303)
at com.caucho.server.http.Invocation.service(Invocation.java:230)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:205)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:144)
at com.caucho.server.TcpConnection.run(TcpConnection.java:133)
at java.lang.Thread.run(Thread.java:498)
Thu Oct 19 06:21:14 CST 2000: OSN=4824,NOTP=20
Thu Oct 19 06:21:14 CST 2000:
java.sql.SQLException: Protocol violation
at java.sql.SQLException.<init>(SQLException.java:45)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:803)
at oracle.jdbc.ttc7.Oclose.receive(Oclose.java:130)
at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:493)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:467)
at com.bbser.board.BoardAccessBean.ListArticle(BoardAccessBean.java:266)
at com.bbser.board.BoardBean.ListBySequence(BoardBean.java:82)
at _jsp._listarticle__jsp._jspService(_listarticle__jsp.java:97)
at com.caucho.jsp.JavaPage.service(JavaPage.java:89)
at com.caucho.jsp.JavaPage.subservice(JavaPage.java:83)
at com.caucho.jsp.Page.service(Page.java:303)
at com.caucho.server.http.Invocation.service(Invocation.java:230)
at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:205)
at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:144)
at com.caucho.server.TcpConnection.run(TcpConnection.java:133)
at java.lang.Thread.run(Thread.java:498)
Thu Oct 19 06:21:14 CST 2000: BoardListBean Created
Thu Oct 19 06:21:27 CST 2000: BoardListBean Created
Thu Oct 19 06:21:27 CST 2000: End Load,ClassNum=9
Thu Oct 19 06:21:27 CST 2000: kkk select * from BoardList_TB order by EBoardName
Thu Oct 19 06:21:27 CST 2000: connect
Thu Oct 19 06:21:27 CST 2000: executed!
Thu Oct 19 06:21:27 CST 2000: BoardNum=203
Thu Oct 19 06:21:27 CST 2000: BoardNum=203
Thu Oct 19 06:21:27 CST 2000: BoardListBean Created