4 Replies Latest reply on Jul 31, 2003 4:05 PM by cfrostrun

    JMS over HTTP

    jch888

      I'm trying to get JBoss to run over HTTP using port 60. There are no firewalls on the current machine. I've changed the http-invoker.sar/META-INF/jboss-service.xml file I've changed the MBean code for the HttpProxyFactory to have the correct port changes for the URL suffix to be:
      :60/invoker/JMXInvokerServlet

      I placed an InvokerURL attribute as well with my IP address in it.

      Then on the client side these are the values i switched the jndi.properties to:
      Initial_Context_Factory to org.jboss.naming.HttpNamingContextFactory

      Provider_URL to http://<my address>:60/invoker/JNDIFactory

      When I try and run a client program and connect to the http invoker this is the exception I get:

      javax.naming.NamingException: Failed to retri
      eve Naming interface [Root exception is java.net.ConnectException: Connection re
      fused: connect]
      javax.naming.NamingException: Failed to retrieve Naming interface. Root excepti
      on is java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
      at java.net.Socket.connect(Socket.java:426)
      at java.net.Socket.connect(Socket.java:376)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:386)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:602)
      at sun.net.www.http.HttpClient.(HttpClient.java:303)
      at sun.net.www.http.HttpClient.(HttpClient.java:264)
      at sun.net.www.http.HttpClient.New(HttpClient.java:336)
      at sun.net.www.http.HttpClient.New(HttpClient.java:317)
      at sun.net.www.http.HttpClient.New(HttpClient.java:312)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
      ction.java:481)
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
      .java:472)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
      nection.java:574)
      at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLCon
      nection.java:1169)
      at java.net.URLConnection.getHeaderFieldInt(URLConnection.java:475)
      at java.net.URLConnection.getContentLength(URLConnection.java:370)
      at org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingC
      ontextFactory.java:106)
      at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamin
      gContextFactory.java:64)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
      62)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
      )
      at javax.naming.InitialContext.init(InitialContext.java:219)

        • 1. Re: JMS over HTTP
          jch888

          Any suggestions? Thanks for the assistance.

          • 2. Re: JMS over HTTP
            cfrostrun

            Who's starting the service? I believe anything below port 1024 needs to be root, or equivalent. ? I could be wrong.

            • 3. Re: JMS over HTTP
              jch888

              It's a manual start, by an administrator user. What does it mean if the port is root? You cannot use it unless you're logged in as the root user? Thanks for the quick reply!

              • 4. Re: JMS over HTTP
                cfrostrun

                let me try to clarify. anybody can use the port. but in order to be able to bind to a port lower than 1024, the user that is starting the service must be root. so root must own the process. ( i guess i should have asked if you are on m$ or a *nix variant..) however, i believe it's the same type of behavior in windows as well.

                hope this helps,

                chris