0 Replies Latest reply on Nov 23, 2008 9:55 PM by jlashmet

    connect over internet to jms queue

    jlashmet

      Hi everyone,

      So here is my setup. I've got jboss 4.0.3SP1 running on linux bound to port 192.168.1.2. I've configured my router to forward all ports to this ip address and I've turned off my firewall temporarily. I have a JMS queue running which I am able to send an receive messages from on any computer in my network by specifying 192.168.1.2 as the jndi provider url. Now I'm trying to connect to this same queue over the internet from a remote box, and I'm unable to even create the Initial Context. I get this error.

      java.rmi.ConnectException: Connection refused to host: 192.168.1.2; nested exception is:
      java.net.ConnectException: Connection timed out: 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:610)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(Unknown Source)

      Now, what is interesting is that in the jndi properties file I've specified my WAN ip address as the jndi provider url, but in the error message I see the internal 192.168.1.2 address. So I guess it is forwarding correctly at least. Also if from the remote machine I do telnet [wanip] 1099 I get this:

      ¼�†sr↓java.rmi.MarshalledObject|╜▲ù�†câ�¿>☻♥I♦hashlocBytest☻[BobjBytesq~☺xp↨F)áur☻[B
      ↨°Tα☻xp3¼�†t"http://localhost.localdomain:8083/q~q~uq~♥┬¼�†sr org.jnp.server.Namin
      gServer_Stub☻☻xrjava.rmi.server.RemoteStubΘ■▄╔ïße☻xr∟java.rmi.server.RemoteObjec
      t╙a┤æ
      a3▲♥xpw6
      UnicastRef2
      192.168.1.2♦J┤Å
      1/☺↔╠L+├Ç☺x `L!t

      Connection to host lost.

      Any ideas why I can't connect?