Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JMS on multiple machine

843830Oct 15 2003 — edited Oct 16 2003
I have two machines on my LAN: 10.0.77.49 and 10.0.77.65, let's call them 49 and 65 for short.

49 is OpenJMS Server.
65 is OpenJMS Client.

I did a simple connectivity test for OpenJMS by running it's sample programs as follow:

Run message receiver on 49 first.

Then run message sender on 49 to send message by specifying host and port. Proved that the sample program take care on host and port.

And then run message sender on 65 to send message by specifiying host as 10.0.77.49:1099. But it connect to 127.0.0.1.... strange.... _*

Below are the commands I used during the test.

Anyone knows what is happening? and what is the workaround or solution for this issue?
Any advice or comment will be greatly appreciated. Thanks very much in advance.




[MESSAGE RECEIVER on 10.0.77.49]
================================
run a message receiver on 49, listening up to 10 message
./runreceiver.sh -queue queue1 -count 10



[MESSAGE SENDER on 10.0.77.49]
==============================
run a message sender on 49, send message to 127.0.0.1:1099, success
./runsender.sh -queue queue1 -count 1 -jndihost 127.0.0.1 -jndiport 1099


run a message sender on 49, send message to 10.0.77.49:1099, success
./runsender.sh -queue queue1 -count 1 -jndihost 10.0.77.49 -jndiport 1099


run a message sender on 49, send message to 10.0.77.49:1098, ConnectException thrown
javax.naming.CommunicationException:
Failed to lookup JNDI provider for URL: rmi://10.0.77.49:1098/JndiServer.
Root exception is java.rmi.ConnectException: Connection refused to host: 10.0.77.49;
nested exception is: java.net.ConnectException: Connection refused
./runsender.sh -queue queue1 -count 1 -jndihost 10.0.77.49 -jndiport 1098


run a message sender on 49, send message to 10.0.77.48:1099, NoRouteToHostException thrown
javax.naming.CommunicationException:
Failed to lookup JNDI provider for URL: rmi://10.0.77.48:1099/JndiServer.
Root exception is java.rmi.ConnectIOException: Exception creating connection to: 10.0.77.48;
nested exception is: java.net.NoRouteToHostException: No route to host
./runsender.sh -queue queue1 -count 1 -jndihost 10.0.77.48 -jndiport 1099


Now, we proved that the sample program take care on parameter jndihost and jndiport.



[MESSAGE SENDER on 10.0.77.65]
==============================
run a message sender on 65, send message to 10.0.77.49:1099, ServiceUnavailableException thrown
javax.naming.ServiceUnavailableException: Connection refused to host: 127.0.0.1;
nested exception is: java.net.ConnectException: Connection refused.
Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1;
nested exception is: java.net.ConnectException: Connection refused
./runsender.sh -queue queue1 -count 1 -jndihost 10.0.77.49 -jndiport 1099

so strange that why it connects to 127.0.0.1

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 13 2003
Added on Oct 15 2003
1 comment
213 views