aspose file tools*
The moose likes JBoss/WildFly and the fly likes JMS Error in remote client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JMS Error in remote client" Watch "JMS Error in remote client" New topic
Author

JMS Error in remote client

Josh Britton
Greenhorn

Joined: Nov 26, 2008
Posts: 24
Hi. I have a remote client that is supposed to use jms to communicate with my jboss server launched app. When I run jboss through eclipse on my local development machine and run the client on the same machine, the code works. However, when I attempt to deploy the server app to my remote hosting service and then run the client again on my local machine, I get the following error:

Exception in thread "Thread-3" java.lang.RuntimeException: Failed to download and/or install client side AOP stack
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:199)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:82)
at com.xxxxx.teacher.DataDistributor.jmsSetup(DataDistributor.java:272)
at com.xxxxx.teacher.Controller.buildSingleton(Controller.java:384)
at com.xxxxx.login.Controller$1.run(Controller.java:85)
Caused by: org.jboss.jms.exception.MessagingNetworkFailureException
at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:240)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:205)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$getClientAOPStack$aop(ClientConnectionFactoryDelegate.java:237)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.getClientAOPStack(ClientConnectionFactoryDelegate.java)
at org.jboss.jms.client.ClientAOPStackLoader.load(ClientAOPStackLoader.java:75)
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:192)
... 5 more
Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://xxxxx.com:4457/?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&connectionWait=10&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&stopLeaseOnFailure=true&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat&validatorPingPeriod=10000&validatorPingTimeout=5000]
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:771)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:423)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:160)
at org.jboss.remoting.Client.invoke(Client.java:1708)
at org.jboss.remoting.Client.invoke(Client.java:612)
at org.jboss.remoting.Client.invoke(Client.java:600)
at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)
... 10 more
Caused by: java.net.ConnectException: Connection timed out: 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.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.jboss.remoting.util.SecurityUtility.connect(SecurityUtility.java:1037)
at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:203)
at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.createSocket(BisocketClientInvoker.java:430)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:1084)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:757)
... 16 more

I would greatly appreciate any insights.

Josh
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

Version of JBoss AS?

Does this help: https://www.jboss.org/community/wiki/JBoss42FAQ


JBoss In Action
Josh Britton
Greenhorn

Joined: Nov 26, 2008
Posts: 24
Thanks for your reply.

I use 5.0.1.

I am not sure if the faq you provided helps. I use a Virtual Private Server and start JBoss through their control panel web interface. However, I do know that jndi is working properly because my remote client successfully uses plain rmi to access and use several server-side ejbs. The error in my earlier post occurs when I try to create a Connection for jms.



I will pursue starting through ssh with my hosting provider so that I can experiment with the -b option, but if the above yields any further clues, please let me know.

Thanks,

Josh
Josh Britton
Greenhorn

Joined: Nov 26, 2008
Posts: 24
I looked at the wrapper my host provider uses to launch JBoss and it includes the -b 0.0.0.0 setting. Any other ideas about what may be amiss?

Thanks,

Josh
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

Check the firewall - based on the error message it looks like port 4457 might be blocked.

Also, of the code you posted, which line matches this: "at com.xxxxx.teacher.DataDistributor.jmsSetup(DataDistributor.java:272) "
If none of the lines do, please post the jmsSetup method and highlight line 272.
Josh Britton
Greenhorn

Joined: Nov 26, 2008
Posts: 24
You're right. 4457 is blocked by the host provider's firewall. There are other free other ports that I can use, but it is not clear to me how to reconfigure jbm to accept client connections through a different port. I experimented with the three port properties in /server/default/deploy/jboss-messaging.sar/remoting-bisocket-service.xml, but still did not get through.

Line #4 of the posted code (above) is the line that throws the error. jmsConnection is a javax.jms.Connection.

Do you have any advice for reconfiguring JBoss to use particular ports? I'm puzzled as to why jndi is even working in the first place: 1099 is one of host provider's blocked ports.

Thanks for your insights. And thanks for writing a user-friendly compendium on JBoss. I had no idea that a JBoss book covering 5.0 AND written for humans existed until you responded earlier and I saw the link on your tag. Good news for us EE newbies!

Josh
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

For AS 5.0.x (and even 5.1), ports can be configured in the server/xxx/conf/bootstrap/bindings.xml file.
Josh Britton
Greenhorn

Joined: Nov 26, 2008
Posts: 24
Thanks again.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

Murty Medisetti,
Your post was moved to a new topic.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JMS Error in remote client
 
Similar Threads
Problem with context.lookup
Unable to connect to JMS Server
Error using JBoss5.0.0GA
Failed to download and/or install client side AOP stack
error on jboss start up