11 Replies Latest reply on Jan 9, 2008 10:28 AM by matthieu.siggen

    Localhost/IP Address issue

    sathish.gopal

      Hi all,

      I have deployed a war file(app.war) in JBoss 4.2.1. I can access this application by the url http://localhost:8080/app but if i replace the localhost by my IP Address ie http://xx.xx.xx.xx:8080/app i get "The page cannot be displayed" error. It is as if there is no server running, which is strange. I need to access my application(with IP Address) because i need to distribute this URL so that others can access my application.

      I thought the problem could be due to connectivity issue(DNS issue) but when the same war file is deployed in Tomcat. It works both the way(localhost and ip address). Is there any setting that need to be adjusted in Jboss which detects my IP address..



      Help me out in solving this issue in JBoss

        • 1. Re: Localhost/IP Address issue
          sathish.gopal

          Hi all,

          I solved this problem by starting the server with the parameter --host <ip address>.

          The parameter jboss.bind.address will be set to the IP Address

          • 2. Re: Localhost/IP Address issue
            zzztimbo

            You are missing an equals sign:

            --host=<host or ip>
            


            "sathish.gopal" wrote:
            Hi all,

            I solved this problem by starting the server with the parameter --host <ip address>.

            The parameter jboss.bind.address will be set to the IP Address


            • 3. Re: Localhost/IP Address issue
              zzztimbo

              How do I modify the run.conf file so that I do not have to start jboss with this parameter? I would just like to issue my usual

              run.sh
              .

              • 4. Re: Localhost/IP Address issue
                zzztimbo

                I'm having the same issue and finally tried this solution. It did not work for me. I would like to access the default jboss page by going to http://<ip address of machine> instead of http://localhost (which seems to be the only way to access it). What might be my problem?

                • 5. Re: Localhost/IP Address issue
                  jaikiran
                  • 6. Re: Localhost/IP Address issue
                    jaikiran
                    • 7. Re: Localhost/IP Address issue
                      matthieu.siggen

                      Hi all,

                      I'm having the same issue and tried the proposed solution. This works fine on Windows XP. However, I can't get it to run on Windows Vista.

                      I tried using -b 0.0.0.0 but the only way to contact any web pages deployed on JBoss is to use localhost.

                      Does anyone know if there is a way to get "-b 0.0.0.0" to work on Vista?

                      Thank you in advance for your help,

                      Matthieu

                      • 8. Re: Localhost/IP Address issue
                        peterj

                        Have you checked the firewall settings?

                        Are you running with UAC on or off?

                        What is the output from netstat (or tcpview) when you run with and without -b 0.0.0.0?

                        • 9. Re: Localhost/IP Address issue
                          matthieu.siggen

                          Hi Peter,

                          Thank you for your answer.

                          > Have you checked the firewall settings?
                          I tried this with my firewall turned off which didn't help.

                          > Are you running with UAC on or off?
                          UAC is turned on but I am still logged in as an admin.

                          > What is the output from netstat (or tcpview) when you run with and without -b 0.0.0.0?

                          1. Without -b 0.0.0.0
                          Active Connections

                           Proto Local Address Foreign Address State
                           TCP 127.0.0.1:2869 mymachine:49722 ESTABLISHED
                           TCP 127.0.0.1:8080 mymachine:49735 ESTABLISHED
                           TCP 127.0.0.1:10110 mymachine:49736 ESTABLISHED
                           TCP 127.0.0.1:49159 mymachine:49160 ESTABLISHED
                           TCP 127.0.0.1:49160 mymachine:49159 ESTABLISHED
                           TCP 127.0.0.1:49166 mymachine:49167 ESTABLISHED
                           TCP 127.0.0.1:49167 mymachine:49166 ESTABLISHED
                           TCP 127.0.0.1:49194 mymachine:49195 ESTABLISHED
                           TCP 127.0.0.1:49195 mymachine:49194 ESTABLISHED
                           TCP 127.0.0.1:49196 mymachine:49197 ESTABLISHED
                           TCP 127.0.0.1:49197 mymachine:49196 ESTABLISHED
                           TCP 127.0.0.1:49721 mymachine:49717 TIME_WAIT
                           TCP 127.0.0.1:49722 mymachine:icslap ESTABLISHED
                           TCP 127.0.0.1:49726 mymachine:1199 TIME_WAIT
                           TCP 127.0.0.1:49727 mymachine:49725 TIME_WAIT
                           TCP 127.0.0.1:49733 mymachine:8080 TIME_WAIT
                           TCP 127.0.0.1:49735 mymachine:8080 ESTABLISHED
                           TCP 192.168.0.110:49162 by1msg4276312:msnp ESTABLISHED
                           TCP 192.168.0.110:49709 69.60.7.210:http ESTABLISHED
                           TCP 192.168.0.110:49710 digg:http ESTABLISHED
                           TCP 192.168.0.110:49713 69.60.7.199:http ESTABLISHED
                           TCP 192.168.0.110:49714 69.60.7.199:http ESTABLISHED
                           TCP 192.168.0.110:49723 cache:http ESTABLISHED
                           TCP 192.168.0.110:49724 cache:3128 ESTABLISHED
                           TCP 192.168.0.110:49729 cache:http ESTABLISHED
                           TCP 192.168.0.110:49730 cache:3128 ESTABLISHED
                           TCP 192.168.0.110:49731 cache:http ESTABLISHED
                           TCP 192.168.0.110:49732 cache:3128 ESTABLISHED
                           TCP 192.168.0.110:49736 pptpuser:pop3 ESTABLISHED
                           TCP 192.168.0.110:49737 pptpuser:pop3 ESTABLISHED
                          

                          2. With -b 0.0.0.0
                          Active Connections
                           Proto Local Address Foreign Address State
                           TCP 127.0.0.1:49159 mymachine:49160 ESTABLISHED
                           TCP 127.0.0.1:49160 mymachine:49159 ESTABLISHED
                           TCP 127.0.0.1:49166 mymachine:49167 ESTABLISHED
                           TCP 127.0.0.1:49167 mymachine:49166 ESTABLISHED
                           TCP 127.0.0.1:49194 mymachine:49195 ESTABLISHED
                           TCP 127.0.0.1:49195 mymachine:49194 ESTABLISHED
                           TCP 127.0.0.1:49196 mymachine:49197 ESTABLISHED
                           TCP 127.0.0.1:49197 mymachine:49196 ESTABLISHED
                           TCP 127.0.0.1:49755 mymachine:1199 TIME_WAIT
                           TCP 127.0.0.1:49756 mymachine:49754 TIME_WAIT
                           TCP 127.0.0.1:49758 mymachine:8080 TIME_WAIT
                           TCP 127.0.0.1:49760 mymachine:8080 TIME_WAIT
                           TCP 192.168.0.110:49162 by1msg4276312:msnp ESTABLISHED
                           TCP [::1]:8080 mymachine:49759 FIN_WAIT_2
                           TCP [::1]:49759 mymachine:8080 CLOSE_WAIT
                          

                          Any idea what could cause it not to work?

                          Thank you in advance,

                          Matthieu

                          • 10. Re: Localhost/IP Address issue
                            peterj

                            When running netstat, always provide the -ab option - it lists all ports opened and the app the opened them.

                            But based on the netstat output you posted, it looks like the app server is still binding to localhost, and not 0.0.0.0. Please post the first 20 or so lines when you start the app server - everything from the command prompt up to this line:

                            12:06:36,026 INFO [ServerInfo] OS-System: Windows Vista 6.0,x86

                            and post the last 10 lines, especially the line that contains:

                            12:07:57,805 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080

                            and ending with the 'start in' line:

                            12:07:58,461 INFO [Server] JBoss (MX MicroKernel) [4.2.1.GA (build: SVNTag=JBoss_4_2_1_GA date=200707131605)] Started in 1m:23s:497ms

                            • 11. Re: Localhost/IP Address issue
                              matthieu.siggen

                              Hi Peter,

                              I owe you a double apology because:

                              1. it is a really really late answer (to my defense my browser displays "page 1 of 1" at the bottom of this topic so I didn't realise there was an answer).

                              2. it turns out a standard JBoss 4.2.2.GA version works fine on my configuration.

                              However, I was using a version modified by an internal tool. The result being that my deploy/jboss-web.deployer/server.xml referenced my machine name instead of localhost. And the result of this would be that the server would answer to http://localhost:8080 but wouldn't accept http://machine:8080.

                              Thank you for your help and once again sorry for the inconvenience,

                              Matthieu