Hi,

Have a problem which we have been battling with for days....

Have a simple test client application that is trying to put a JMS Message onto 
a Queue on a remote server. This works fine when running from one machine, but 
not from another. The only obvious difference is that the working client 
machine is Solaris on the same subnet as the server (which is running Solaris), 
whereas the failing client is CentOS (on a different subnet).

The exception that is thrown in the client is:

org.jboss.mq.SpyJMSException: Cannot authenticate user; - nested throwable: 
(java.net.ConnectException: Connection refused)
  | 
  |         at 
org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:72)
  |         at 
org.jboss.mq.SpyJMSException.rethrowAsJMSException(SpyJMSException.java:57)
  |         at org.jboss.mq.Connection.authenticate(Connection.java:1071)
  |         at org.jboss.mq.Connection.<init>(Connection.java:252)
  |         at org.jboss.mq.Connection.<init>(Connection.java:323)
  |         at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:116)
  |         at 
org.jboss.mq.SpyConnectionFactory.internalCreateConnection(SpyConnectionFactory.java:137)
  |         at 
org.jboss.mq.SpyConnectionFactory.createConnection(SpyConnectionFactory.java:98)
  |         at 
com.aditon.server.messaging.api.jms.JmsProducer.sendMessage(JmsProducer.java:79)
  |         at 
com.aditon.liferay.curn.LiferayArticleRssAdapter.sendToQueue(LiferayArticleRssAdapter.java:210)
  |         at 
com.aditon.liferay.curn.LiferayArticleRssAdapter.displayChannel(LiferayArticleRssAdapter.java:115)
  |         at org.clapper.curn.Curn.outputChannels(Curn.java:531)
  |         at org.clapper.curn.Curn.processRSSFeeds(Curn.java:272)
  |         at org.clapper.curn.Curn.run(Curn.java:177)
  |         at org.clapper.curn.Tool.runCommand(Tool.java:554)
  |         at 
org.clapper.util.cmdline.CommandLineUtility.execute(CommandLineUtility.java:223)
  |         at org.clapper.curn.Tool.main(Tool.java:169)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:597)
  |         at org.clapper.curn.Bootstrap.loadAndRun(Bootstrap.java:340)
  |         at org.clapper.curn.Bootstrap.main(Bootstrap.java:203)
  | Caused by: java.net.ConnectException: Connection refused
  |         at java.net.PlainSocketImpl.socketConnect(Native Method)
  |         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
  |         at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
  |         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
  |         at java.net.Socket.connect(Socket.java:519)
  |         at java.net.Socket.connect(Socket.java:469)
  |         at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
  |         at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
  |         at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
  |         at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
  |         at sun.net.www.http.HttpClient.New(HttpClient.java:306)
  |         at sun.net.www.http.HttpClient.New(HttpClient.java:323)
  |         at 
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
  |         at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
  |         at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
  |         at 
sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:832)
  |         at org.jboss.mq.il.http.HTTPClient.post(HTTPClient.java:63)
  |         at 
org.jboss.mq.il.http.HTTPServerIL.postRequest(HTTPServerIL.java:391)
  |         at 
org.jboss.mq.il.http.HTTPServerIL.authenticate(HTTPServerIL.java:114)
  |         at org.jboss.mq.Connection.authenticate(Connection.java:1067)
  |         ... 20 more

Nothing is displayed in the server log. The client code is:

...
  | Properties env = new Properties();
  | env.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jboss.naming.HttpNamingContextFactory");
  | env.put(Context.PROVIDER_URL, 
"http://REMOTE_SERVER:8080/invoker/JNDIFactory";);
  | env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
  | 
  | Context ctx = new InitialContext(env);
  | 
  | ConnectionFactory cf = (ConnectionFactory) ctx.lookup("/ConnectionFactory");
  | System.out.println("cf --> "+cf);
  | ...
  | 

I have tried straight JNDI over 1099 too with the same issue.

Any ideas?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4194085#4194085

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4194085
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to