3 Replies Latest reply on Jul 17, 2008 3:29 AM by Yan

    Problem establishing socket connection for InvokerLocator [s

    Stefan Muehlbauer Newbie

      Hi,

      i hava a JBoss 4.2.0 cluster, each with a webserver. Above there's an apache2.2 with mod_jk for loadbalancing.

      I did the loadbalancing, decribed on
      http://www.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss

      I also changed the DefaultEJBConnector, that it returns the IP of the Apache.

      Now i tried to access the cluster with rmi over http and i get the error:

      org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://x.x.x.x:3873/?enableTcpNoDelay=false]
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:530)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       at org.jboss.remoting.Client.invoke(Client.java:1550)
       at org.jboss.remoting.Client.invoke(Client.java:530)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
       at $Proxy1.verifyUsernameAndPassword(Unknown Source)
       at com.kontron.fc.client.dialog.LoginDialog.logIn(LoginDialog.java:195)
       at com.kontron.fc.client.dialog.LoginDialog.buttonPressed(LoginDialog.java:163)
       at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
       at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
       at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
       at org.eclipse.jface.window.Window.open(Window.java:796)
       at com.kontron.fc.client.Application.run(Application.java:66)
       at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
       at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at org.jboss.remoting.transport.socket.SocketClientInvoker.createClientSocket(SocketClientInvoker.java:152)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:842)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:526)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       at org.jboss.remoting.Client.invoke(Client.java:1550)
       at org.jboss.remoting.Client.invoke(Client.java:530)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
       at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
       at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:103)
       at $Proxy1.verifyUsernameAndPassword(Unknown Source)
       at com.kontron.fc.client.dialog.LoginDialog.logIn(LoginDialog.java:195)
       at com.kontron.fc.client.dialog.LoginDialog.buttonPressed(LoginDialog.java:163)
       at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
       at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
       at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
       at org.eclipse.jface.window.Window.open(Window.java:796)
       at com.kontron.fc.client.Application.run(Application.java:66)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
       ... 25 more
      Caused by: java.net.SocketException: recv failed: Connection aborted by peer
       at jrockit.net.SocketNativeIO.readBytesPinned(Native Method)
       at jrockit.net.SocketNativeIO.socketRead(Unknown Source)
       at java.net.SocketInputStream.socketRead0(SocketInputStream.java)
       at java.net.SocketInputStream.read(SocketInputStream.java:129)
       at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
       at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
       at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
       at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2213)
       at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2226)
       at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2694)
       at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761)
       at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
       at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:95)
       at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:54)
       at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:72)
       at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:55)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.createInputStream(ClientSocketWrapper.java:185)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:164)
       at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:66)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
       at org.jboss.remoting.transport.socket.SocketClientInvoker.createClientSocket(SocketClientInvoker.java:152)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:842)
       at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:526)
       at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
       at org.jboss.remoting.Client.invoke(Client.java:1550)
       at org.jboss.remoting.Client.invoke(Client.java:530)
       at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
      


      The ip address is the address of the Apache server.
      I think, that there's no routing for this adress on the Apache server.
      How can i do this?

      thanks in advance :-)

      Regards
      Stefan

        • 2. Re: Problem establishing socket connection for InvokerLocato
          Brian Stansberry Master

           

          Can not get connection to server. Problem establishing so
          cket connection for InvokerLocator [socket://x.x.x.x:3873/?enableTcpNoDelay=false]


          Note the port is 3873. I doubt Apache is listening on 3873.

          Why are you trying to load balance your EJB via Apache? If you mark the bean @Clustered the bean proxy will handle load balancing for you.

          • 3. Re: Problem establishing socket connection for InvokerLocato
            Yan Newbie

            Hi ,
            I am having the same problem from time to time our jms socket is stuck
            we have 2 jms servers in a cluster , the only thing we see in the logs is this

            2008-07-17 07:58:18,018 WARN [DownHandler (MPING)] peer closed connection, trying to re-send msg
            2008-07-17 07:58:18,018 ERROR [DownHandler (MPING)] 2nd attempt to send data failed too
            2008-07-17 07:58:18,088 TRACE [Heartbeat] Publishing:
            HeartbeatMessage:
            lifeId: 1216270678788
            
            2008-07-17 07:58:18,542 ERROR [Timer-12] Got marshalling exception, exiting
            java.net.SocketException: end of file
             at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:577)
             at org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport(BisocketClientInvoker.java:413)
             at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
             at org.jboss.remoting.ConnectionValidator.doCheckConnection(ConnectionValidator.java:133)
             at org.jboss.remoting.ConnectionValidator.run(ConnectionValidator.java:308)
             at java.util.TimerThread.mainLoop(Timer.java:512)
             at java.util.TimerThread.run(Timer.java:462)
            2008-07-17 07:58:18,639 INFO [Settlement] Settlement start
            2008-07-17 07:58:18,640 TRACE [Settlement] Time to get db connection: 1
            2008-07-17 07:58:18,669 TRACE [Settlement] Time to get db connection: 1
            2008-07-17 07:58:18,709 INFO [Settlement] Settlement done
            2008-07-17 07:58:19,643 WARN [Timer-10] LeasePinger[SocketClientInvoker[192c766, bisocket://XXX.XXX.XXX.XXX:4457](1q2i3q5u-di4j2a-filwy68q-1-filwyu2p-9)] fail
            ed to ping to server: Can not get connection to server. Problem establishing socket connection for InvokerLocator [bisocket://XXX.XXX.XXX.XXX:4457/?clientLease
            Period=10000&clientMaxPoolSize=200&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWi
            reFormat&numberOfCallRetries=1&numberOfRetries=10&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.
            jms.wireformat.JMSWireFormat]
            

            XXX.XXX.XXX.XXX stands for my server IP , its production server
            any help on this ?

            Thanks