6 Replies Latest reply on Feb 1, 2008 5:06 AM by jaikiran pai

    JBoss Not Working On IpAddress. Works Only On localhost

    raghav telgar Newbie

      Hi..

      I have installed JBoss as Windows Service on my Windows XP. I have downloaded Native JBoss and installed it. I am able to access JBoss using http://localhost:8080 .. But I want to access JBoss which is running as Windows Service from another machine using the IpAddress...

      I know that the Command: run.bat -b can be used to access JBoss using IpAddress but as my JBoss is now a Windows Service, i am not able to pass the parameters -b . Please let me know if there is any way where i can access the JBOSS which is installed as a service using the IPAddress.


      Thanks,
      Raghav.

        • 1. Re: JBoss Not Working On IpAddress. Works Only On localhost
          jaikiran pai Master

          Edit the service.bat and modify

          call run.bat >run.log


          to

          call run.bat -b xxx.xxx.xxx.xxx >run.log


          xxx.xxx.xxx.xxx is the IP address

          • 2. Re: JBoss Not Working On IpAddress. Works Only On localhost
            raghav telgar Newbie


            As this is a windows service, i dont have to call run.bat at all for starting jboss. The Service file is an executable file that will be started automatically and will be running in the services... A bit detailed information will be helpful to me.

            Thanks.
            Raghav.

            • 3. Re: JBoss Not Working On IpAddress. Works Only On localhost
              jaikiran pai Master

              You mentioned that you installed JBoss Native. So when you start the service through the Windows Services, it reads the service.bat file which is present in %JBOSS_HOME%/bin folder. So if you want to pass any parameters to the service, you can edit that file as mentioned in my earlier post.

              • 4. Re: JBoss Not Working On IpAddress. Works Only On localhost
                raghav telgar Newbie


                Hi.. Thanks for the solution. Now my jboss service runs fine.... but i get the problem when i try to stop the service.. From control panel when i stop the service, it shows it as stopped. but i can stilll access the jboss from the browser.
                when i tried using this command:

                service stop

                this is the error message that is displayed....

                Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
                at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)
                at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
                at javax.naming.InitialContext.lookup(InitialContext.java:351)
                at org.jboss.Shutdown.main(Shutdown.java:214)
                Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
                at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)
                at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
                ... 4 more
                Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
                at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)
                ... 5 more
                Caused by: java.net.ConnectException: Connection refused: connect
                at java.net.PlainSocketImpl.socketConnect(Native Method)
                at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
                at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
                at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
                at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
                at java.net.Socket.connect(Socket.java:507)
                at java.net.Socket.connect(Socket.java:457)
                at java.net.Socket.(Socket.java:365)
                at java.net.Socket.(Socket.java:265)
                at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
                at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
                at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)



                Have i missed out any other configurations...???

                Thanks,
                Raghav

                • 5. Re: JBoss Not Working On IpAddress. Works Only On localhost
                  raghav telgar Newbie

                  i used the command:

                  service stop JBAS42SVC

                  • 6. Re: JBoss Not Working On IpAddress. Works Only On localhost
                    jaikiran pai Master

                    Since you opened a new topic for the shutdown problem at http://www.jboss.com/index.html?module=bb&op=viewtopic&t=129061, let's continue this discussion there.