10 Replies Latest reply on May 25, 2011 9:50 AM by Rajasundaram Gopalan

    Connection refused to host

    Rajasundaram Gopalan Novice

      JBoss Applicaiton server : 4.2.3

      jboss esb 4.5

       

      We are getting Connection refused to host exception in jboss_console. below is the logs

       

      java.lang.reflect.InvocationTargetException

          at org.apache.ws.scout.transport.RMITransport.send(RMITransport.java:91)

          at org.apache.ws.scout.registry.RegistryImpl.execute(RegistryImpl.java:271)

          at org.apache.ws.scout.registry.RegistryImpl.findTModel(RegistryImpl.java:795)

          at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findClassificationSchemeByName(BusinessQueryManagerImpl.java:440)

          at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:424)

          at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:273)

          at org.jboss.internal.soa.esb.services.registry.InVMRegistryInterceptor.findEPRs(InVMRegistryInterceptor.java:160)

          at org.jboss.soa.esb.services.registry.RegistryFactory$HeadRegistryInterceptor.findEPRs(RegistryFactory.java:229)

          at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:226)

          at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:486)

          at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:168)

          at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:149)

          at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:191)

          at com.intelliverse.gf.components.core.esbcomm.ServiceInvokerRepository.getServiceInvoker(ServiceInvokerRepository.java:53)

          at com.intelliverse.gf.components.core.esbcomm.AbstractEsbCommunicationImpl.deliver(AbstractEsbCommunicationImpl.java:136)

          at com.intelliverse.gf.components.core.esbcomm.AbstractEsbCommunicationImpl.deliverSync(AbstractEsbCommunicationImpl.java:101)

          at com.test.DpiMonitorESB2.authenticate(DpiMonitorESB2.java:37)

          at com.test.DpiMonitorESB2.monitor(DpiMonitorESB2.java:159)

          at com.test.DpiMonitorESB2.run(DpiMonitorESB2.java:143)

      Caused by: java.lang.reflect.InvocationTargetException

          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.apache.ws.scout.transport.RMITransport.send(RMITransport.java:86)

          ... 18 more

      Caused by: java.rmi.ConnectException: Connection refused to host: jbesb2.ion.intelli.com; nested exception is:

          java.net.ConnectException: Connection refused: connect

          at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:601)

          at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:198)

          at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:184)

          at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:110)

          at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)

          at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)

          at $Proxy4.inquire(Unknown Source)

          ... 23 more

      Caused by: java.net.ConnectException: Connection refused: connect

          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:366)

          at java.net.Socket.connect(Socket.java:519)

          at java.net.Socket.connect(Socket.java:469)

          at java.net.Socket.<init>(Socket.java:366)

          at java.net.Socket.<init>(Socket.java:180)

          at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)

          at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)

          at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:595)

          ... 29 more

      java.lang.reflect.InvocationTargetException

          at org.apache.ws.scout.transport.RMITransport.send(RMITransport.java:91)

          at org.apache.ws.scout.registry.RegistryImpl.execute(RegistryImpl.java:271)

          at org.apache.ws.scout.registry.RegistryImpl.findTModel(RegistryImpl.java:795)

          at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findClassificationSchemeByName(BusinessQueryManagerImpl.java:440)

          at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findService(JAXRRegistryImpl.java:424)

          at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:273)

        • 1. Connection refused to host
          Rajasundaram Gopalan Novice

          I am wondering is this related to the post

           

          http://community.jboss.org/message/564513

           

          This error occured due to the load on production server.

          • 2. Connection refused to host
            Tom Cunningham Master

            Those errors do not look similar.     In your error, scout cannot send a message over RMI because it is unable to create a socket.    

             

            You mentioned that this happens under load - maybe you have exceeded the maximum number of sockets?      You could try increasing that number.

            • 3. Connection refused to host
              Rajasundaram Gopalan Novice

              Is there any method available to reproduce the same issue in testing server using tools are writing program?

              • 4. Connection refused to host
                Rajasundaram Gopalan Novice

                Error I posted from the client but I do see the same error from the server. If that is because of socket means then how it reaches to the server? please explain

                • 5. Re: Connection refused to host
                  Tom Cunningham Master

                  Rajasundaram Gopalan wrote:

                   

                  Is there any method available to reproduce the same issue in testing server using tools are writing program?

                   

                  If you are asking if there is a load testing tool you can use to reproduce this in a testing environment, SOAPUI will probably fit the bill.

                  • 6. Connection refused to host
                    Rajasundaram Gopalan Novice

                    which configuration in the configuration file we have to modify to increase the connections for socket.

                    • 7. Re: Connection refused to host
                      Rajasundaram Gopalan Novice

                      Is there any example shows how to use the SOAPUI against jbossesb?

                       

                      I try to use jmeter and I could able to send TextMessage only I don't get any example for Object Message Type. On the server I got the following error and I am stuck.

                       

                      ERROR [JmsComposer] Unsupported JMS message type: org.jboss.mq.SpyTextMessage for incoming ESB-aware message.

                      • 8. Re: Connection refused to host
                        Hans Wolffenbuttel Expert

                        Hi,

                         

                        To use SOAPUI you send a SOAP message to an endpoint of your ESB. If you redirect that endpoint back to a MockService of SOAPUI you can do load testing without messing up your database. SOAPUI has a load test for this kind of test, but I dont know if it is available in the free version, since I use the Pro version. See the help pages of SOAPUI for more information. (if you have a request/response service, you might want to look into scripting for returning the right conformation message, and for scripting you do need the pro-version)

                         

                        regards,

                         

                        Hans

                        • 9. Re: Connection refused to host
                          Rajasundaram Gopalan Novice

                          I written simple program for load test.

                           

                          import java.util.Properties;

                          import javax.jms.Message;

                          import javax.jms.Queue;

                          import javax.jms.QueueConnection;

                          import javax.jms.QueueConnectionFactory;

                          import javax.jms.QueueSender;

                          import javax.jms.QueueSession;

                          import javax.jms.Session;

                          import javax.naming.Context;

                          import javax.naming.InitialContext;

                          public class SubscriberTest {

                              public static void main(String[] args) {

                                  QueueConnection queueConnection = null;

                                  String queueName = "queue/getSubscriberBySubscriberId_ejbprocessor_request_esb";

                                  try {

                                      Properties properties = new Properties();

                                      properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");

                                      properties.put(Context.PROVIDER_URL, "jnp://jbesb1i.devion.intelliverse.com:1099");

                                      InitialContext jndiContext = new InitialContext(properties);

                                      // lookup queue

                                      QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("ConnectionFactory");

                                      Queue testQueue = (Queue) jndiContext.lookup(queueName);

                                      queueConnection = queueConnectionFactory.createQueueConnection();

                                      QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

                                      Message message = queueSession.createObjectMessage();

                                      // Message reqMsg = MessageFactory.getInstance().getMessage();

                                      message.setStringProperty("subscriberId", "9B2AA3031FF54554E044080020C48ED0");

                                      QueueSender queueSender = queueSession.createSender(testQueue);

                                      queueSender.send(message);

                                  } catch (Exception e) {

                                      e.printStackTrace();

                                  } finally {

                                      if (queueConnection != null) {

                                          try {

                                              queueConnection.close();

                                          } catch (javax.jms.JMSException jmse) {

                                              // ignore

                                          }

                                      }

                                  }

                              }

                          }

                           

                          I saw the message in the queue in jmx-console and queue-depth was increased by 1. But the message was not processed in the queue any clue.

                          Is this is because of security? if so please tell me where it is configured?

                           

                          I am new SOAPUI is there any material for Load testing against jbossesb. Let me send the configuration screen shot of SOAPUI on my next post.

                          • 10. Re: Connection refused to host
                            Rajasundaram Gopalan Novice

                            I have attached the screen shot of the configuration. How to use the session in soap ui to perform load test?