I am getting this error.

1,231 views
Skip to first unread message

Vinayak

unread,
Feb 17, 2012, 10:36:03 PM2/17/12
to rundeck-discuss
Hi, I am getting this error.

Request: /
Message: Can not read response from server. Expected to read 4 bytes,
read 0 bytes before connection was unexpectedly lost.
Caused by: Could not open Hibernate Session for transaction; nested
exception is org.hibernate.TransactionException: JDBC begin failed:
Class: ProjectSelectFilters
At Line: [95]
Code Snippet:
Stack Trace

org.springframework.transaction.CannotCreateTransactionException:
Could not open Hibernate Session for transaction; nested exception is
org.hibernate.TransactionException: JDBC begin failed: at UserService$
$EnhancerByCGLIB$$fa9d2481.getFilterPref() at UserService
$getFilterPref.call(Unknown Source) at ProjectSelectFilters
$_closure1_closure3_closure5.doCall(ProjectSelectFilters.groovy:95) at
ProjectSelectFilters
$_closure1_closure3_closure5.doCall(ProjectSelectFilters.groovy)
Caused by: org.hibernate.TransactionException: JDBC begin failed: ...
4 more Caused by:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
Communications link failure The last packet successfully received
from the server was 29,871,640 milliseconds ago. The last packet sent
successfully to the server was 6 milliseconds ago. at
com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at
com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:
1116) at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3090)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2979) at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3520) at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1990) at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2151) at
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2619) at
com.mysql.jdbc.ConnectionImpl.setAutoCommit(ConnectionImpl.java:4997)
at
org.apache.commons.dbcp.DelegatingConnection.setAutoCommit(DelegatingConnection.java:
371) at org.apache.commons.dbcp.PoolingDataSource
$PoolGuardConnectionWrapper.setAutoCommit(PoolingDataSource.java:328)
at $Proxy7.setAutoCommit(Unknown Source) ... 4 more Caused by:
java.io.EOFException: Can not read response from server. Expected to
read 4 bytes, read 0 bytes before connection was unexpectedly lost. at
com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2540) at
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2990) ... 13
more

Hasan

unread,
Feb 18, 2012, 9:19:34 AM2/18/12
to rundeck-discuss
Vinayak

It says in there "Communications link failure. The last packet
successfully received from the server was 29,871,640 milliseconds
ago."

Have you investigated possible causes of that? For example MySql shut
down 8 hrs earlier?

Is this a RunDeck problem, or should you be posting this somewhere
else?

Hasan

Fidal Castro

unread,
Feb 20, 2012, 3:47:14 AM2/20/12
to rundeck...@googlegroups.com
Hi,

  I am also getting the same error in RunDeck after I logged in. 

Greg Schueler

unread,
Feb 20, 2012, 1:10:38 PM2/20/12
to rundeck...@googlegroups.com
I think your database connection to mysql is being dropped after inactivity.  You probably need to add the "autoReconnect" property to your datasource configuration, see here http://dev.mysql.com/doc/refman/5.1/en/connector-j-reference-configuration-properties.html

(I think this should be put in a Rundeck FAQ)

V!NAYAK m

unread,
Feb 22, 2012, 12:17:14 AM2/22/12
to rundeck...@googlegroups.com
Thanks Greg,
I have applied the change. Let me see whether I will get the same exception or not.

-- 
Thanks and Regards,
Vinayak
Reply all
Reply to author
Forward
0 new messages