Help requried for JBoss 3.2.5 behind Firewall
sanketdesai Jun 9, 2005 11:12 AMHi all,
My problem is regarding configuration of JBoss 3.2.5 behind Firewall. I went through so many posts regarding this type of issue, but still I haven't got any solution.
Problem goes like this. I have installed JBoss 3.2.5. It is behind firewall. According to various articles, ports like 4444, 4445, 1089, 1088, 8080, 8083, 8009 are open. Ports 1089 and 1088 are JNDI ports for my application. My application contains one applet. This applet makes call to EJB. When applet is opened in LAN there is no problem. But over internet is doesn't open. It gives exception like :
Application Error on localhost at Thu Jun 09 19:46:37 IST 2005
Probably Cause Message : Exception Occured java.rmi.ConnectException: Connection refused to host: xxx.xxx.xxx.xxx; nested exception is:
java.net.ConnectException: Connection timed out: connect
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
...........
......
Then I tried to configure JBoss for RMI and JNDI over HTTP. Configuration is according to other posts available on the forum. But using netstat command I came to know that still applet tries to make connection to 4444 and some other random port. So, according to me it should not use port 4444 and that random port because it is configured as RMI over HTTP.
For RMI over HTTP, I have configured InvokerURL appropriately in deploy/http-invoker.sar/META-INF/jboss-service.xml . I have also provided required http parameter for client side i.e. for applet. They are as follows:
java.naming.factory.initial=org.jnp.interfaces.HttpNamingContextFactory
java.naming.provider.url=http://xxx.xxx.xxx.xxx:8080/invoker/JNDIFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Also, on command line I have provided option -Djava.rmi.server.hostname=xxx.xxx.xxx.xxx (which is external IP). But still no sucess. Where am I making mistake ?
Thanks.
Sanket.