-
1. Re: jboss on box with 2 network adaptors?
juha Nov 3, 2003 7:46 AM (in response to jmhofer)You could try -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx to force RMI to specific NIC.
-- Juha -
2. Re: jboss on box with 2 network adaptors?
jmhofer Nov 3, 2003 8:23 AM (in response to jmhofer)If you mean that I should start my clients with that parameter: They don't seem to care.
The stacktrace says that the naming lookup fails, at the place where I look up the first home of the first enterprise bean. This happens on jBoss 3.2.1 in a configuration that is relatively similar to the default configuration.
javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: Exception creating connection to: 192.9.200.232; nested exception is:
java.net.SocketException: Network is unreachable: connect]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:611)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
at javax.naming.InitialContext.lookup(Unknown Source)
at de.imbus.protestant.client.app.ConnectionFactory.initHomes(ConnectionFactory.java:450)
at de.imbus.protestant.client.app.ConnectionFactory.init(ConnectionFactory.java:244)
at de.imbus.protestant.client.app.ConnectionFactory.(ConnectionFactory.java:236)
at de.imbus.protestant.client.app.ConnectionFactory.getInstance(ConnectionFactory.java:272)
at de.imbus.protestant.client.app.ProTestAntClient.main(ProTestAntClient.java:66)
at de.imbus.taustern.j2eeappstarter.J2EEAppStarter.startApp(J2EEAppStarter.java:78)
at de.imbus.taustern.j2eeappstarter.J2EEAppStarter.(J2EEAppStarter.java:30)
at de.imbus.taustern.j2eeappstarter.J2EEAppStarter.main(J2EEAppStarter.java:18)
Caused by: java.rmi.ConnectIOException: Exception creating connection to: 192.9.200.232; nested exception is:
java.net.SocketException: Network is unreachable: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
... 10 more
Caused by: java.net.SocketException: Network is unreachable: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
... 16 more -
3. Re: jboss on box with 2 network adaptors?
juha Nov 3, 2003 9:14 AM (in response to jmhofer)No, you should set it on the server.
-- Juha -
4. Re: jboss on box with 2 network adaptors?
jmhofer Nov 3, 2003 9:26 AM (in response to jmhofer)The problem with setting this on the server is that then, the clients from the other network will not be able to reach the server, I guess.
I need the server as multi-homed server for both networks. Clients from both networks should be able to connect to the application server.
I suspect I need a way to configure jBoss so that it says (for JNDI or whatever else):
"You are a client from 192.9.200.x? Ok, I'm your server for enterprise bean homes at 192.9.200.z. - ... - "Ah, and you are a client from 192.168.255.y? Ok, I'm your server for enterprise bean homes at 192.168.255.z".
I really hope that this can be done somehow. Any help is greatly appreciated. -
5. Re: jboss on box with 2 network adaptors?
juha Nov 3, 2003 12:55 PM (in response to jmhofer)This is a property of Sun's RMI implementation. I don't know if there's any other way to tell the RMI subsystem which IP address should be embedded to the stubs it sends out. Try searching Sun's website for alternative options.
-- Juha