[jboss-user] [JNDI/Naming/Network] - InvokerLocator socket problem with 4.2.1.GA ?
ahaumer
do-not-reply at jboss.com
Wed Oct 24 14:43:01 EDT 2007
When testing an EJB3 SLSB from a remote client I found that jboss started with option "-b 0.0.0.0" (on Linux) binds all sockets to all network interfaces, except for the socket at port 3873!
JBOSS seems to bind this port to the IP address listed for the hostname of the server, only. On my development notebook this was 127.0.0.1 at that time, which gave me the following interesting exception on the client:
org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket://127.0.0.1:3873/]
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 $Proxy0.divide(Unknown Source)
at at.co.xss.test.client.TestClient.runTest(TestClient.java:25)
at at.co.xss.test.client.TestClient.main(TestClient.java:32)
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:366)
at java.net.Socket.connect(Socket.java:519)
at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:187)
at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.getConnection(MicroSocketClientInvoker.java:801)
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 $Proxy0.divide(Unknown Source)
at at.co.xss.test.client.TestClient.runTest(TestClient.java:25)
at at.co.xss.test.client.TestClient.main(TestClient.java:32)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:74)
... 11 more
When I changed the entry in /etc/hosts on my notebook to map the IP address of the ethernet port to the machines hostname and restarted JBOSS, I could connect from the remote client side without problem.
On the server, netstat now shows the following bound ports:
| tcp 0 0 192.168.162.96:3873 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:1098 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:1099 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:32816 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:32817 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:32819 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:8083 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:4444 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:8093 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:4445 0.0.0.0:* LISTEN 1766/java
| tcp 0 0 0.0.0.0:4446 0.0.0.0:* LISTEN 1766/java
|
192.168.162.96 is the IP address listed in /etc/hosts for the hostname of
the notebook and it happens to be the current IP address of the ethernet interface (which is not always the case!)
But why does JBOSS bind port 3873 to this IP address only and not to 0.0.0.0 like it does for all other ports?
I explicitely used option "-b 0.0.0.0" to have JBOSS listen on all network interfaces on this machine.
Is this a bug or do I miss something here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4098486#4098486
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4098486
More information about the jboss-user
mailing list