[jboss-user] JBoss not accepting external connections on port 1099
Allan Kamau
kamauallan at yahoo.com
Fri May 25 04:42:09 EDT 2007
Hi,
Am running JBoss-4.2.0.GA and it appears I am unable
to establish a connection from a client running
remotely.
A quite port scan (between port 1000 and 10000) using
'localhost' or '127.0.0.1' indicates an open port
1099. But a similar scan using 192.168.0.2 (the
computer's ip) reports the port 1099 closed.
How can I enable JBoss to listen on all the server's
IPs?
When I run the client locally and connect using
'localhost:1099' or '172.0.0.1:1099' the connection
succeeds, but when I provide the computer's ip
'192.168.0.2:1099' I get the printStackTrace() output
below
<error>
[java] javax.naming.CommunicationException: Could
not obtain connection to any of these urls:
jnp://192.168.0.2: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 192.168.0.2:1099 [Root exception is
javax.naming.ServiceUnavailableException: Failed to
connect to server 192.168.0.2:1099 [Root exception is
java.net.ConnectException: Connection refused]]]
[java] at
org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
[java] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
[java] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
[java] at
javax.naming.InitialContext.lookup(InitialContext.java:351)
</error>
Below is my client code
public static Context getInitialContext()
throws javax.naming.NamingException
{
InitialContext ctx=null;
try{
ctx = new InitialContext();
ctx.addToEnvironment("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
ctx.addToEnvironment("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
ctx.addToEnvironment(Context.PROVIDER_URL,
"jnp://192.168.0.2:1099");
/*
SimpleSession simpleSession =
(SimpleSession)ctx.lookup(SimpleSession.class.getName());
System.out.println(simpleSession.sayHello("EJB3"));
*/
}catch (NamingException e){
e.printStackTrace();
}
return ctx;
//return new javax.naming.InitialContext();
}
Allan.
____________________________________________________________________________________
8:00? 8:25? 8:40? Find a flick in no time
with the Yahoo! Search movie showtime shortcut.
http://tools.search.yahoo.com/shortcuts/#news
More information about the jboss-user
mailing list