Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

portMapperTable.read(localInputStream); needs to have a configurable timeout. #129

Closed
glassfishrobot opened this issue Nov 12, 2011 · 10 comments

Comments

@glassfishrobot
Copy link

after a n/w outage we had a situation where the jms client was stuck at this point in PortMapperClient.java while creating a new connection.
it was stuck indefinitely.
i think we need a configurable timeout for this operation.

this.portMapperTable.read(localInputStream);

Full stacktrace:

daemon prio=5 Thread id=14 RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
at com.sun.messaging.jmq.io.PortMapperTable.readLine(PortMapperTable.java:310)
at com.sun.messaging.jmq.io.PortMapperTable.read(PortMapperTable.java:266)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:235)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:150)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.(PortMapperClient.java:92)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.(TCPConnectionHandler.java:164)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:135)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:778)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnectionNew(ConnectionInitiator.java:254)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:208)
at com.sun.messaging.jmq.jmsclient.ConnectionInitiator.createConnection(ConnectionInitiator.java:158)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:816)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.(ProtocolHandler.java:1529)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:2327)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:1024)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.(ConnectionImpl.java:418)
at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.(UnifiedConnectionImpl.java:60)
at com.sun.messaging.BasicConnectionFactory.createConnection(BasicConnectionFactory.java:147)
at com.sun.messaging.BasicConnectionFactory.createConnection(BasicConnectionFactory.java:132)

Affected Versions

[4.3]

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by sandeep.p

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
sandeep.p said:
Hello.
Can you please let me know when this will be fixed in the client?
Also is there any workaround you can suggest so that the code will come out of a situation like this even if it occurs? Its strange because we don't see any socket connection on the server side. so there is nothing we can "kill" so that the code comes out of this wait.

Sandeep.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
@nigeldeakin said:
How often do you encounter this problem? What operating system? Is there any way of reproducing it?

Nigel

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
sandeep.p said:
Hi Nigel,

We saw this problem couple of times and both cases were a result of a n/w outage. Around 5% of the client thread to cluster got stuck at this point show above in the logs.
I have tried various options to reproduce this but with no success. OS is linux. we do not see any incoming connections or sockets on the jms side so the only way out of this is to restart the clients.
We had another occurrence of this very long time back reported earlier.
http://java.net/projects/mq/lists/users/archive/2010-08/message/23

Sandeep.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
@nigeldeakin said:
Exactly which version of MQ? (from the broker log)

When you got into this state could other clients connect to the same broker? If you see this again, please take a thread dump of the broker as well and keep the broker logs.

This bug will be reviewed before the next major release. Unfortunately I can't be more specific at the moment.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
sandeep.p said:
FYI. We have raised an SR using the support channel.

Exactly which version of MQ? (from the broker log)

Open Message Queue 4.4
Sun Microsystems, Inc.
Version: 4.4 Update 1 (Build 7-b)

When you got into this state could other clients connect to the same broker? If you see this again, please take a thread dump of the broker as well and keep the broker logs.

Yes. and we saw this after the brokers were restarted. we restarted it again to see if that helps but that didn't resolve it either.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
@amykang2020 said:
This issue has been resolved by #144
http://java.net/jira/browse/MQ-144

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Marked as duplicate on Sunday, February 5th 2012, 9:24:53 pm

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA MQ-129

@glassfishrobot
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants