[jboss-dev] Re: Branch_4_2 Naming not working correctly if -b is used
Anil Saldhana
Anil.Saldhana at redhat.com
Tue Feb 27 13:46:02 EST 2007
Dimitris, do a privileged block for the System.getProperty/setProperty.
If not, you will have issues running under a security manager.
Dimitris Andreadis wrote:
> Yes, I was looking at this. Needs to be set if
> java.rmi.server.hostname is set either by -D or -b
>
> Brian Stansberry wrote:
>> Probably this from org.jboss.Main:
>>
>> // Set the java.rmi.server.hostname if not set
>> if (System.getProperty("java.rmi.server.hostname") == null)
>> {
>> System.setProperty("java.rmi.server.hostname", "127.0.0.1");
>> }
>>
>> This is done before any -b switch is parsed; probably should be moved
>> after the switch parsing and use the value of
>> System.getProperty(ServerConfig.SERVER_BIND_ADDRESS, "127.0.0.1");
>>
>> Brian Stansberry wrote:
>>> 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.
>>>
>>
>>
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
More information about the jboss-development
mailing list