2 Replies Latest reply on Jun 21, 2006 9:14 PM by spickering

    JMS firewall problem

    flltho

      Hello

      I'm quite new to jboss, but I've managed to solve most problems that has occured using the wiki and this forum. One problem i still have is that when accessing my ejb appliacion from outside the local network (trough a firewall) the Jboss server replied with his local ip. I read the wiki and solved the problem.... almost.

      I'm running a local thread in my client, this thread implements messagelistener wich supscribes to a topic. I understand that JMS(topics) use port 8093 as default. When i try to connect to the topic outside the firewall it tries to connect to my linux servers local internal network ip.

      Before i added

      -Djava.rmi.server.hostname=<external_host_name>
      -Djava.rmi.server.useLocalHostname=false
      

      to my run.sh script this also happend for my jndi lookups on port 1098.

      Below is my jndi.properties.file (fictional ip)
      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://193.123.123.123:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces


      My local thread running a topicsubscriber
       public void run() {
       try {
      
       jndiContext = new InitialContext();
       topicConnectionFactory = (TopicConnectionFactory) jndiContext.lookup("TopicConnectionFactory");
       topic = (Topic) jndiContext.lookup(selectedTopicName);
       topicConnection = topicConnectionFactory.createTopicConnection();
       topicSession = topicConnection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
       topicSubscriber = topicSession.createSubscriber(topic);
       topicSubscriber.setMessageListener(this);
       topicConnection.start();
      } catch (NamingException e) {
       System.out.println("ServerTopicPublisher: Error while connecting");
      
       e.printStackTrace();
       } catch (JMSException e) {
       e.printStackTrace();
       }
       }


        • 1. Re: JMS firewall problem
          flltho

          doh, no edit button ah well

          Running netstat when i'm trying to connect to the service i get

          TCP prescott:1556 193.123.123.123:1098 ESTABLISHED
          TCP prescott:1557 193.123.123.123:4444 ESTABLISHED
          TCP prescott:1558 192.168.1.20:8093 SYN_SENT

          Any advice?

          Did some searches on the web, i hate to double post a problem, but i could not find a post that could help me in this case.

          • 2. Re: JMS firewall problem
            spickering

            I'm having the same problem.

            Any solutions?