-
1. Re: Factory re-connect doesn't work. Connects only 30% of ti
adrian.brock Nov 29, 2003 5:24 AM (in response to js1111)Show the full stacktrace.
You can also try enabling TRACE logging on the client
for org.jnp to see what it is doing.
Regards,
Adrian -
2. Re: Factory re-connect doesn't work. Connects only 30% of ti
js1111 Dec 1, 2003 1:58 PM (in response to js1111)Arian,
Thanks for the help. I setup log4 it gives me more trace information (below).
A failed run shows..
Connection refused
ServiceUnavailableException
SocketTimeoutException.
javax... Receive Timed out.
It almost seems that the socket is temporarily busy, which doesn't make much sense, since my client is the only thing running against it on my test.
Again, this happens about 70% of the time. If I stop Java, and restart my client code, I can connect ok 30% of the time. Trying to reconnect without stop the code never seems to work.
Thanks,
Jeff
...
tcf = (TopicConnectionFactory) jniContext.lookup("ConnectionFactory");
.. (error)
1943 [Thread-0] WARN org.jnp.interfaces.NamingContext - Failed to connect to myserver.mycomp.com:1099
javax.naming.CommunicationException: Failed to connect to server myserver.mycomp.com:1099 [Root exception is javax.namin
g.ServiceUnavailableException: Failed to connect to server myserver.mycomp.com:1099 [Root exception is java.net.ConnectE
xception: Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:215)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1181)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:514)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(Unknown Source)
at smclient.SageManagerTopicSubscriber.initJMSConnection(SageManagerTopicSubscriber.java:142)
at smclient.SageManagerTopicSubscriber.setupJMS(SageManagerTopicSubscriber.java:88)
at smclient.SageManagerTopicSubscriber.run(SageManagerTopicSubscriber.java:72)
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server myserver.mycomp.com:1099 [Root exceptio
n is java.net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:190)
... 7 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:186)
... 7 more
error ! JNDI context or lookup failed: javax.naming.CommunicationException: Receive timed out
[Root exception is java.net.SocketTimeoutException: Receive timed out] -
3. Re: Factory re-connect doesn't work. Connects only 30% of ti
adrian.brock Dec 2, 2003 8:10 AM (in response to js1111)Are you using Windows?
Windows does little backlogging (by default).
Too many connections at once cause it throw connection refused.
http://www.mail-archive.com/jboss-user@lists.sourceforge.net/msg31572.html//www.mail-archive.com/jboss-user@lists.sourceforge.net/msg31572.html
Regards,
Adrian -
4. Re: Factory re-connect doesn't work. Connects only 30% of ti
js1111 Dec 2, 2003 9:52 AM (in response to js1111)Adrian,
Thank you so much for helping !
The problem is network related. I have 2 network cards on the Solaris box, with each IP mapped to the same hostname name. When my pc requests jnp://hostname:port, sometimes it is translated into jnp://ip1:port, and sometimes jnp://ip2:port. Unlike some other applications, Jboss only listens on one of those IP addresses. (netstat -an shows IP:port, rather the hostname:port). I can solve my problem by trying each one in turn.
Thanks!
Jeff