Running Client
dmoffett Oct 29, 2002 11:53 AMHello,
I believe that I have the JBoss server running since is starts without any errors. I am running JBoss on Madrake linux using jdk 1.3.1 and jboss 3.0.3. I am having two problems getting the client to connect. Ok Ok I have more than two problems. :-)
1. On the machine that jboss is running the client seems to want to connect to the local machine at address 67.40.137.193 which is the NAT address of the machine through my firewall. The machine is know locally as 192.168.4.5 or niko.
[dmoffett@mail template]$ hostname
mail.dbinspector.net
I have tried to configure the machine to use 192.168.4.5 but JNDI seems to always try to connect to 67.40.137.193. Here is my jndi.properties file.
[dmoffett@mail bin]$ cat jndi.properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=niko
This just shows that niko resolvs to 192.168.4.5
[dmoffett@mail bin]$ ping niko
PING mail (192.168.4.5) from 192.168.4.5 : 56(84) bytes of data.
64 bytes from mail (192.168.4.5): icmp_seq=0 ttl=255 time=51 usec
64 bytes from mail (192.168.4.5): icmp_seq=1 ttl=255 time=40 usec
My question is how can I configure JNDI to look for niko instead of mail.dbinspector.net?
Here is the stack trace for the error described above:
javax.naming.CommunicationException. Root exception is java.rmi.ConnectException: Connection refused to host: 67.40.137.193; nested exception is:
java.net.ConnectException: Connection timed out
java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:355)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:142)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:129)
at java.net.Socket.(Socket.java:273)
at java.net.Socket.(Socket.java:100)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:25)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:120)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:499)
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:190)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:174)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:83)
at org.jnp.server.NamingServer_Stub.listBindings(Unknown Source)
at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:674)
at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:662)
at javax.naming.InitialContext.listBindings(InitialContext.java:399)
at test.client.TestClient.main(TestClient.java:22)
2. I tried to make the client work from a remote box. The remote box is a OS X machine. The OS X machine seems to do better but I am getting the following error:
javax.naming.CommunicationException: Receive timed out. Root exception is java.io.InterruptedIOException: Receive timed out
at java.net.PlainDatagramSocketImpl.receive(Native Method)
at java.net.DatagramSocket.receive(DatagramSocket.java:387)
at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:930)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1017)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:447)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:440)
at javax.naming.InitialContext.lookup(InitialContext.java:345)
at test.client.TestClient.main(TestClient.java:21)
My jndi.properties file:
cat jndi.properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=niko
Any ideas ?
Thank you for any help.
David