• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Locating Remote Session Bean Using JNDI--JNDI-Root Error Socket Timeout Jboss.5.1.GA

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My Code for Client Program



Executed from $JBOSS_HOME/client $java -classpath '.:./*' TestClient
-----------------------------------------------------------------------------
OK0
OK1

javax.naming.CommunicationException: Could not obtain connection to any of these urls: 10.168.1.71:3837 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 /10.168.1.71:3837 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /10.168.1.71:3837 [Root exception is java.net.ConnectException: Connection refused]]]
------------------------------------------------------------------------------
If jboss is executed without binding address
------------------------------------------------------------------------------
javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 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 localhost/127.0.0.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost/127.0.0.1:1099 [Root exception is java.net.ConnectException: Connection refused]]]

-----------------------------------------------------------------------------------
Not able to get Right help from jboss community... Please help in solving the above problem
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Exactly how are you starting JBoss AS?

2) Have you changed any of the ports, especially the JNDI port (1099 by default)?

3) Is JBoss AS is running in the same box as the client?

4) Have you using any OS tools (such as netstat) to verify that the ports are actually open?

5) Which OS are you using? I suspect Linux, but knowing which distro and version would help.

6) If you are running Linux, do you by any chance have SELinux enabled?
 
PankajKumar Mishra
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:1) Exactly how are you starting JBoss AS?

2) Have you changed any of the ports, especially the JNDI port (1099 by default)?

3) Is JBoss AS is running in the same box as the client?

4) Have you using any OS tools (such as netstat) to verify that the ports are actually open?

5) Which OS are you using? I suspect Linux, but knowing which distro and version would help.

6) If you are running Linux, do you by any chance have SELinux enabled?




1) I am starting Jboss over Cent O.S. 5.5 release, using run.sh -b 192.168.1.71.

2) I have tried to change default port 1099. and also tested with no change to default port.

3) What exactly Box stands for .. is it same O.S./Machine, or Same Application Container.
3.a) I am running both client and server on same OS/Machine.

4) I have tested it. But I think it was open by default as per JBOSS default configuration.

5). Yes it Linux - Cent O.S. 5.5 release

6). No my Operating System is not enabled to SELinux.

Dear Peter Johnson,
The above description are as per you request. Sir, Although my organization have switched to different EJB version.
I am also able to run EJB 3. and resolved above thing only in IDE.

I am in extream need your suggestions and Eager to know what above questions have relation to my app.
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unfortunately, your answers don't help in identifying the problem. According to your answers, I would expect this to work without issue.

Here is what should happen (on the localhost:1099 example). JBoss AS opens port 1099. The app connects to localhost:1099. As far as I know, there are no firewall issues with a localhost connection, though SELinux can do weird things, which is why I asked if it was off.

If you started up JBoss AS to use localhost:1099, then using 10.168.1.71:1099 from the client would not work because that is not what JBoss AS opened. And the same the other way around. But you could run JBoss AS with -b 0.0.0.0 and connect from the client using both localhost:1099 and 10.168.1.71:1099.

According to the error, either the port is not really open, or something is blocking you from accessing the port (such as the firewall or SELinux). For example, the 10.168.1.71:3837 combination would not work unless port 3837 was opened in the firewall. So the first task is ensuring that the port is really open. Then the next task is ensuring that the port is accessing. Only netstat can help with the former. For the latter, you could even use telnet to check the connection. And that gives me an idea, look at this post and try the suggested telnet test: https://community.jboss.org/thread/120995?tstart=0#409026
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic