Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » MysqlXAException: No operations allowed after connection closed
MysqlXAException: No operations allowed after connection closed [message #1693396] Thu, 23 April 2015 18:16 Go to next message
Gudrun Koko is currently offline Gudrun KokoFriend
Messages: 20
Registered: January 2013
Junior Member
Hi

Would somebody be able to share a mysql configuration file that works for Stardust 2.1.1 ? I am testing a 2.1.1 build for a development environment; however, I am experiencing frequent random disconnects and see below errors in tomcat log.

I also would be interested in the associated tomcat 7 server.xml entry for Resource AuditTrail.DataSource deployed on RH 6. My local 5.1 mysql db is started with storage engine innodb.

I DID follow instructions found at
http://help.eclipse.org/luna/topic/org.eclipse.stardust.docs.deployment/html/audittraildatabasesetup/mysql.html

Logon to portal and even remote Rest web service call to start business process works again ONLY once completely recycled. If no solution found I may need to switch to another db such as Oracle 11g which given the outdated InnoDb storage engine might be probably advisable to do but more costly. Additional question here would be is it possible to configure Stardust with an external JMS provider such as ORACLE AQ ? (Following works since done with ActiveMQ https://wiki.eclipse.org/Stardust/Knowledge_Base/Deployment/SpringConfigurations )

06:33:54 WARN [080-exec-8] Transaction - Unable to enlist XAResource

org.apache.geronimo.transaction.manager.WrapperNamedXAResource@784edc97, errorCode: 0
com.mysql.jdbc.jdbc2.optional.MysqlXAException: No operations allowed after connection closed.
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:604)
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:583)
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:523)
at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.start(WrapperNamedXAResource.java:111)
at org.apache.geronimo.transaction.manager.TransactionImpl.enlistResource(TransactionImpl.java:202)
at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:60)
at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:101)
Re: MysqlXAException: No operations allowed after connection closed [message #1693422 is a reply to message #1693396] Fri, 24 April 2015 06:30 Go to previous messageGo to next message
Rajkumar Dangi is currently offline Rajkumar DangiFriend
Messages: 51
Registered: November 2014
Location: Pune, India
Member
Hi,

Below is sample entry for "server.xml"
Quote:
<Resource name="AuditTrail.DataSource" auth="Container"
type="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"
factory="com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory"
maxActive="50" maxIdle="10" maxWait="5000"
user="USERNAME" password="PASSWORD" defaultAutoCommit="false"
driverClassName="com.mysql.jdbc.Driver"
serverName="localhost"
port="3306"
databaseName="DBNAME"/>


Check if that helps you.

-Thanks
Raj
Re: MysqlXAException: No operations allowed after connection closed [message #1693423 is a reply to message #1693396] Fri, 24 April 2015 06:32 Go to previous messageGo to next message
Rajkumar Dangi is currently offline Rajkumar DangiFriend
Messages: 51
Registered: November 2014
Location: Pune, India
Member
Hi,
Below is the smple "server.xml" entries for tomcat7
Quote:

<Resource name="AuditTrail.DataSource" auth="Container"
type="com.mysql.jdbc.jdbc2.optional.MysqlXADataSource"
factory="com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory"
maxActive="50" maxIdle="10" maxWait="5000"
user="USERNAME" password="PASSWORD" defaultAutoCommit="false"
driverClassName="com.mysql.jdbc.Driver"
serverName="localhost"
port="3306"
databaseName="DBNAME"/>

check if that helps you.

-Thanks
Raj
Re: MysqlXAException: No operations allowed after connection closed [message #1693490 is a reply to message #1693423] Fri, 24 April 2015 14:09 Go to previous messageGo to next message
Gudrun Koko is currently offline Gudrun KokoFriend
Messages: 20
Registered: January 2013
Junior Member
Thanks Raj

My server.xml entry for resource name="AuditTrail.DataSource" checks out fine; however, errors persist. Two restarts in the last two hours. Below errors observed.

I am afraid if it is not my Stardust and/or tomcat configuration, my local mysql db setup and configuration may be the culprit - in particular timeout configuration.

Unless any other options come up I decided to move the mysql db off the small Linux 4G vm and install from scratch on a similar vm. This should force me to use TCP/IP connectivity to db rather than rely on a socket file. My install was good enough for a proof-of-concept but I need to learn more about mysql db install/config for Stardust to support a bigger env.

Cheers Gudrun

Errors:
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:3119)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3573)
... 99 more
06:33:11 WARN [080-exec-1] ApplicationException - Failed retrieving content for file '/default-skin/login.css'.
org.eclipse.stardust.common.error.PublicException: : No operations allowed after connection closed.
at org.eclipse.stardust.engine.core.persistence.jdbc.Session.executeQuery(Session.java:2709)
at org.eclipse.stardust.engine.core.persistence.jdbc.Session.executePersistentQuery(Session.java:2906)
.....
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
at sun.reflect.GeneratedConstructorAccessor186.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
......
Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 358,389 milliseconds ago. The last packet sent successfully to the server was 1 milliseconds ago.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1121)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3673)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3562)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4113)
....

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:3119)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:3573)
... 99 more
07:09:20 INFO - [bio-8080-exec-7] DebugInterceptor - --> login
07:09:20 INFO - [bio-8080-exec-7] DebugInterceptor - --> isolate
07:09:20 WARN - [bio-8080-exec-7] Transaction - Unable to enlist XAResource org.apache.geronimo.transaction.manager.WrapperNamedXAResource@69b4441e, errorCode: 0
com.mysql.jdbc.jdbc2.optional.MysqlXAException: No operations allowed after connection closed.
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:604)
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:583)
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:523)
at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.start(WrapperNamedXAResource.java:111)
at org.apache.geronimo.transaction.manager.TransactionImpl.enlistResource(TransactionImpl.java:202)
at org.apache.geronimo.connector.outbound.TransactionEnlistingInterceptor.getConnection(TransactionEnlistingInterceptor.java:60)
at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.getConnection(TransactionCachingInterceptor.java:101)
Re: MysqlXAException: No operations allowed after connection closed [message #1695897 is a reply to message #1693490] Wed, 20 May 2015 07:54 Go to previous messageGo to next message
Robert Emsbach is currently offline Robert EmsbachFriend
Messages: 186
Registered: October 2011
Location: Singapore
Senior Member

Gudrun, you last assumptions make a lot of sense to me. Did that solve the issue?

Regards

Rob
Re: MysqlXAException: No operations allowed after connection closed [message #1696082 is a reply to message #1695897] Thu, 21 May 2015 14:42 Go to previous message
Gudrun Koko is currently offline Gudrun KokoFriend
Messages: 20
Registered: January 2013
Junior Member
Thanks for the info.

It appears a combination of changes so far produced the best result. Connection loss is down drastically but I am still monitoring.

Changes done:

a) mysql config changed - ensured that in config file following is set

innodb_table_locks = 0
init_connect='SET autocommit=0'

Notes:
1. I never thought that autocommit would be turned on by default even for InnoDB)
2. I also did set innodb_table_locks to 0 to force row level locking ... but still observing

b) created a technical user and inserted info into relevant properties file

Notes: 1. it appears autocommit OFF is ALSO a property that can be set as a Stardust property - only found out after a Smile

c) added expected exception handling to process modeled in particular to camel producer route application (see other forum inquiry)


Previous Topic:Other supported Java EE server(s) for Stardust ?
Next Topic:How to receive a carnot.ear file?
Goto Forum:
  


Current Time: Fri Apr 19 03:12:36 GMT 2024

Powered by FUDForum. Page generated in 0.03813 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top