1 Reply Latest reply on Aug 25, 2009 9:29 PM by Peter Johnson

    Deploying an MDB on a server started using the -b option.

    Karthik Ramachandran Newbie

      Hi,

      I've got a simple EJB 3 style MDB. When I deploy it on a server started without the -b option i.e ./run.sh. It works fine. When I deploy it to a server started with the -b option ./run.sh -b <ip addr> I get the following errors :

      14:12:48,538 DEBUG [NamingContext] Failed to connect to localhost:1099
      javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:331)
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1696)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:689)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jboss.util.naming.Util.lookup(Util.java:222)
       at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQDestination(AbstractDLQHandler.java:106)
       at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:82)
       at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
       at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
       at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
       at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:292)
       at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:733)
       at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:213)
       at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
       at java.lang.Thread.run(Thread.java:613)
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
       ... 17 more
      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.SocksSocketImpl.connect(SocksSocketImpl.java:432)
       at java.net.Socket.connect(Socket.java:520)
       at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
       at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:297)
       ... 17 more
      14:12:53,540 ERROR [JmsActivation] Unable to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@74b6e6(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@2a032a destination=queue/DeliverMPOExternalMessageQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=bssub pass=<not shown> maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
      javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]]
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1725)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:689)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.jboss.util.naming.Util.lookup(Util.java:222)
       at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setupDLQDestination(AbstractDLQHandler.java:106)
       at org.jboss.resource.adapter.jms.inflow.dlq.AbstractDLQHandler.setup(AbstractDLQHandler.java:82)
       at org.jboss.resource.adapter.jms.inflow.dlq.JBossMQDLQHandler.setup(JBossMQDLQHandler.java:48)
       at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDLQ(JmsActivation.java:413)
       at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:351)
       at org.jboss.resource.adapter.jms.inflow.JmsActivation.handleFailure(JmsActivation.java:292)
       at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:733)
       at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:213)
       at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
       at java.lang.Thread.run(Thread.java:613)
      Caused by: javax.naming.CommunicationException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:331)
       at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1696)
       ... 16 more
      Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301)
       ... 17 more
      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.SocksSocketImpl.connect(SocksSocketImpl.java:432)
       at java.net.Socket.connect(Socket.java:520)
       at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97)
       at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82)
       at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:297)
       ... 17 more
      
      
      


      The bean is obviously looking to connect over localhost and failing. How do i get around this