-
1. Re: How to open 1099 for access over network
carlwilliamb May 17, 2005 5:04 AM (in response to richiethom)I have a similar problem, If I run my JBoss4 server on windows, and compile it all there, everything works fine, the app client also works from the other machines on the network, but when I convert it to compile and run on linux, the client app can't connect to the linux jboss4 server. What's up with that?
My windows machine runs Win2K, JBoss4.x, and no firewalls, My linux machine runs Redhat 9.0, JBoss4.x and also no fire walls.
The other problem is that my client app tries to connect to the localhost when I try running the linux client-app.
here is my jndi.properties filejava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory java.naming.provider.url=jnp://192.168.0.19:1099 java.naming.factory.url.pkgs=org.jboss.naming.client j2ee.clientName=ExampleGUI
and here is the exception it throwsjavax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:663) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520) at javax.naming.InitialContext.lookup(Unknown Source) at org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:114) at $Proxy0.lookup(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at ImportAgentGUI.actionPerformed(Unknown Source) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect 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) at org.jnp.server.NamingServer_Stub.lookup(Unknown Source) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:544) ... 30 more Caused by: java.net.ConnectException: Connection refused: 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.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at java.net.Socket.<init>(Unknown Source) at java.net.Socket.<init>(Unknown Source) at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source) at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source) ... 36 more
-
2. Re: How to open 1099 for access over network
richiethom May 17, 2005 5:25 AM (in response to richiethom)Hi
I seem to have got it working since I posted to the forum. Make sure that the jar files in your client are the ones that come with the Jboss server you're connecting to. I think I'd forgotten to do this when upgrading the system.
Rich -
3. Re: How to open 1099 for access over network
carlwilliamb May 17, 2005 5:36 AM (in response to richiethom)Yup, I have the correct jar file, I still get that exception,when running the app on linux with the linux jboss running, it works fine, but as soon as I take that jar and try and run it on windows it gives me the exception in my post above.
-
4. Re: How to open 1099 for access over network
richiethom May 17, 2005 5:39 AM (in response to richiethom)When I was trying to solve my problem (I've not got Linux for my system) I read that there are issues with Java on Linux resolving Localhost. I can't remember what the specific problems are, but I think setting something in the hosts file (or Linux equivalent) might be a solution.
-
5. Re: How to open 1099 for access over network
carlwilliamb May 17, 2005 5:44 AM (in response to richiethom)You mean the hosts file on the linux box where jboss is running or the hosts file on windows where the client-app is trying to connect from?
-
6. Re: How to open 1099 for access over network
richiethom May 17, 2005 5:47 AM (in response to richiethom)Where it's trying to connect from - but this problem was definitely a client running on Linux.
The other thing I checked was occurences of ${jboss.bind.address} within JBoss's config files. I don't think I changed anything, but perhaps I did!
Sorry I can't be more specific! -
7. Re: How to open 1099 for access over network
carlwilliamb May 17, 2005 5:50 AM (in response to richiethom)cool, I'll check all of that, thanks for the help.
-
8. Re: How to open 1099 for access over network
carlwilliamb May 18, 2005 8:36 AM (in response to richiethom)Hey
This is how I fixed my problem...
my linux box runs with the ip address 192.168.0.123
as soon as I started JBoss like this:run.sh -c default --host=192.168.0.123
everything worked fine.
it's the small things you miss that makes everything work fine...
thankx for all the help. -
9. Re: How to open 1099 for access over network
pjw May 31, 2005 5:31 AM (in response to richiethom)setting --host=... worked fine for opening port 1099, but gave me Connection Refused on other pages
javax.servlet.jsp.JspException: Exception opening resource http://myserver:8080/member.jsp: java.net.ConnectException: Connection refused
When trying to access the same page via the ip-address, i.e.
http://148.148.130.75:8080/member.jsp
everything works fine... Any suggestions here?
my /etc/hosts file contains the line
148.148.130.75 myserver
/pj