LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2012, 08:03 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
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
 
Old 08-02-2012, 09:42 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,632

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by thomas2004ch View Post
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
javax.naming.NameNotFoundException: Name bbbb is not bound in this Context threezerous Linux - Newbie 3 02-29-2012 02:59 AM
javax.faces.viewstate sheevy Linux - Server 0 11-10-2009 02:43 AM
Is there a way to have grub translate its own naming to naming scheme under Linux zhjim Linux - Software 6 05-28-2006 08:09 AM
getting javax.swing.* to appear student04 Programming 8 10-05-2004 10:06 AM
mail server the naming naming convention problem kashan Linux - Newbie 0 07-16-2004 02:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration