[jboss-dev] Branch_4_2 Naming not working correctly if -b is used

Brian Stansberry brian.stansberry at redhat.com
Tue Feb 27 13:27:32 EST 2007


Recent changes (probably related to running bound to localhost by 
default??) cause a problem if the -b switch is used.  The RMI stub for 
the naming service seems to be bound to localhost.  Note the endpoint in 
this log message:

2007-02-27 12:10:14,515 DEBUG [org.jboss.naming.Naming] NamingServer 
stub: NamingServer_Stub[UnicastRef2 [liveRef: 
[endpoint:[127.0.0.1:1098,org.jboss.net.sockets.DefaultSocketFactory at aa7d433a[bindAddress=/192.168.1.164]](local),objID:[0]]]]

The naming service is useless, e.g. shutdown doesn't work:

c:\dev\jboss\jboss-4.2\build\output\jboss-4.2.0.CR1\bin>shutdown -s 
192.168.1.16
4 -S
Exception in thread "main" javax.naming.CommunicationException [Root 
exception i
s java.rmi.ConnectException: Connection refused to host: 127.0.0.1; 
nested exception is:
         java.net.ConnectException: Connection refused: connect]
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:722)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at org.jboss.Shutdown.main(Shutdown.java:214)
Caused by: java.rmi.ConnectException: Connection refused to host: 
127.0.0.1; nested exception is:
         java.net.ConnectException: Connection refused: connect
         at 
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:574)
         at 
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185
)
         at 
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:94)
         at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
         ... 3 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:179)
         at 
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirect
SocketFactory.java:22)
         at 
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMaster
SocketFactory.java:128)
         at 
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
         ... 8 more

I'll poke around a bit to see if I can find the cause/solution.

-- 
Brian Stansberry
Lead, AS Clustering
JBoss, a division of Red Hat
brian.stansberry at redhat.com




More information about the jboss-development mailing list