LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   javax.naming.ServiceUnavailableException ... (https://www.linuxquestions.org/questions/linux-networking-3/javax-naming-serviceunavailableexception-4175419970/)

thomas2004ch 08-02-2012 08:03 AM

javax.naming.ServiceUnavailableException ...
 
Hi,

I use the RHEL 5. There are 3 IPs on the machine. If I use the telnet ip1 8080, I get the connection. But as I try telnet ip1 1100, I got error as follow:
Code:

Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: jnp://172.23.17.40:1100,jnp://172.23.17.41:1100 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server 172.23.17.41:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 172.23.17.41:1100 [Root exception is java.net.ConnectException: Connection refused]]]
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
        at javax.naming.InitialContext.lookup(InitialContext.java:409)
        at com.wei.chen.app.Client.main(Client.java:22)
Caused by: javax.naming.CommunicationException: Failed to connect to server 172.23.17.41:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 172.23.17.41:1100 [Root exception is java.net.ConnectException: Connection refused]]
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
        at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
        ... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 172.23.17.41:1100 [Root exception is java.net.ConnectException: Connection refused]
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
        ... 5 more
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
        at java.net.Socket.connect(Socket.java:546)
        at java.net.Socket.connect(Socket.java:495)
        at java.net.Socket.<init>(Socket.java:392)
        at java.net.Socket.<init>(Socket.java:293)
        at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
        at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
        at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
        ... 5 more


TB0ne 08-02-2012 09:42 AM

Quote:

Originally Posted by thomas2004ch (Post 4744072)
Hi,
I use the RHEL 5. There are 3 IPs on the machine. If I use the telnet ip1 8080, I get the connection. But as I try telnet ip1 1100, I got error as follow:

Ok...so your service is listening on one IP address/port. Why is this a problem? Did you write your service to listen on multiple IP addresses/ports? If you didn't, then you're getting exactly what you SHOULD be getting. Without knowing about how you've got your NIC's set up, how your application is SUPPOSED to work, etc., there's little we can tell you. Start by checking your selinux/firewall rules.

But since you're using RHEL, have you contacted RHEL support, since you're paying for it with your RHEL subscription?


All times are GMT -5. The time now is 02:55 PM.