Discussion:
[openjms-developer] [ openjms-Bugs-1611385 ] Client-Server Connection hangs and locks clients
SourceForge.net
2006-12-08 09:59:37 UTC
Permalink
Bugs item #1611385, was opened at 2006-12-08 10:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1611385&group_id=54559

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: server
Group: v0.7.7-alpha-3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Peter De Leuze (cajundust)
Assigned to: Nobody/Anonymous (nobody)
Summary: Client-Server Connection hangs and locks clients

Initial Comment:
OpenJMS works fine for 2-3 days, then suddenly, client connections seem to keep hanging on the server side.

When doing a netstat:
tcp 0 0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.166:1397 ESTABLISHED
tcp 0 0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.162:1389 ESTABLISHED
tcp 0 0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.161:1193 ESTABLISHED

And these hanging connections cause all new incoming client connections to lock on creating a session on the connection.
The place where the client JMS implementation blocks is:

javax.jms.ConnectionFactory factory = (ConnectionFactory) context.lookup("TCPConnectionFactory");
javax.jms.Connection connection = factory.createConnection();

// blocks here forever !
// -----------------------
javax.jms.Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
// -----------------------

This situation is only resolved when stopping the jms server and restarting it. Then it works fine again for 2-3 days, and the whole problem reoccurs.

The problem mostly occurs when client applications connect through a VPN, and when the connection is then lost because the VPN disconnects.
There should be a (server.xml) configurable option that stalled connections should be disconnected after a while, but there is no configuration option.

Also in the JMS client API, there is no way to set a connection timeout when creating a session from a connection object or when sending a message on a disconnected connection.
connection.stop,close or session.close does not do anything !!! The client keeps blocked on the connection.createSession !

Please take this bug serious, because it seems that others also have this problem.


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1611385&group_id=54559
SourceForge.net
2006-12-08 10:25:16 UTC
Permalink
Bugs item #1611385, was opened at 2006-12-08 10:59
Message generated for change (Comment added) made by cajundust
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1611385&group_id=54559

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: server
Group: v0.7.7-alpha-3
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Peter De Leuze (cajundust)
Assigned to: Nobody/Anonymous (nobody)
Summary: Client-Server Connection hangs and locks clients

Initial Comment:
OpenJMS works fine for 2-3 days, then suddenly, client connections seem to keep hanging on the server side.

When doing a netstat:
tcp 0 0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.166:1397 ESTABLISHED
tcp 0 0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.162:1389 ESTABLISHED
tcp 0 0 ::ffff:192.168.111.190:3035 ::ffff:192.168.111.161:1193 ESTABLISHED

And these hanging connections cause all new incoming client connections to lock on creating a session on the connection.
The place where the client JMS implementation blocks is:

javax.jms.ConnectionFactory factory = (ConnectionFactory) context.lookup("TCPConnectionFactory");
javax.jms.Connection connection = factory.createConnection();

// blocks here forever !
// -----------------------
javax.jms.Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
// -----------------------

This situation is only resolved when stopping the jms server and restarting it. Then it works fine again for 2-3 days, and the whole problem reoccurs.

The problem mostly occurs when client applications connect through a VPN, and when the connection is then lost because the VPN disconnects.
There should be a (server.xml) configurable option that stalled connections should be disconnected after a while, but there is no configuration option.

Also in the JMS client API, there is no way to set a connection timeout when creating a session from a connection object or when sending a message on a disconnected connection.
connection.stop,close or session.close does not do anything !!! The client keeps blocked on the connection.createSession !

Please take this bug serious, because it seems that others also have this problem.


----------------------------------------------------------------------
Comment By: Peter De Leuze (cajundust)
Date: 2006-12-08 11:25

Message:
Logged In: YES
user_id=1663703
Originator: YES

I tried to force the phenomenon, and I succeeded.
What I did was: (using Windows XP and VPN connection)
1) Start a VPN connection to remote network with our openJMS server. Let
it only have a Topic with a TCP connection factory configured.
2) connect a JMS client application (via the VPN connection) and let it
send repeated messages to the topic (send/receive)
3) disconnect hard the VPN connection while client is sending/receiving
4) check on remote site that network connection was still in netstat.
5) the JMS server now hangs, and does allow incoming connections, but
blocks on all other connecting clients when creating a session on that
connection.
6) situation only resolves when restarting jms server again.


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=1611385&group_id=54559
Continue reading on narkive:
Loading...