1 2 Previous Next 17 Replies Latest reply on Nov 4, 2013 5:59 AM by Ilario Mazzei

    JBoss server hangs in state

    Oliver Roell Newbie

      Hi,

      I have the following problem with Eclipse 3.4.2, JBoss 4.2.3 and JBoss Tools 3 under Windows XP:

      After starting JBoss within Eclipse, the server is successfully coming up and displays in the console:
      15:13:02,145 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)] Started in 17s:312ms

      But the state displays always "starting", and after the timeout, there was the following error-message:

      Starting JBoss 4.2 Server has encountered a problem.
      Server JBoss 4.2 Server was unable to start within 450 seconds. If the server requires more time, try increasing the timeout in the server editor.

      It seems, Eclipse never recognizes that the server has started. The log-file from eclipse contains after the server-start only the above message.

      I have searched the web for a long time and there are other people who have had this problem, but I have not found a solution for me.

      I can start JBoss manually in the command-line with run.bat, and this works without errors.

      In the file run.bat I have replaced JAVA_HOME with JAVA_HOME_FOR_JBOSS because I need another JRE for the JBoss-start, but this could not be the problem, because JBoss starts without problems in the command-line.

      Could anybody help me to solve the problem?

        • 1. Re: JBoss server hangs in state
          Peter Johnson Master

          Eclipse monitors the ports opened by JBoss AS to determine if the app server is running (I think it gets the server mbean and asks for the state). If you change the ports that JBoss AS uses, or if you change the -b run option to bind to something other than localhost, Eclipse will not be able to tell if the app server started successfully. You can edit the eclipse/plugins/org.eclipse.jst.server.generic.jboss_1.6.1.v200904151730/servers/jboss42.serverdef file to change the ports used by Eclipse to monitor the app server.

          • 2. Re: JBoss server hangs in state
            Peter Johnson Master

            Another problem would be if you secure the JMX invoker - Eclipse cannot handle that and thus would be prevented from accessing the necessary mbeans.

            • 3. Re: JBoss server hangs in state
              Oliver Roell Newbie

              This is the content of my jboss42.serverdef file:








              ${port}
              Http
              http


              Are these values correct?

              When I start JBoss within Eclipse, I can view the JMX Agent View in the browser with the URL http://localhost:8080/jmx-console/

              I have found the following information in a forum: "Eclipse never recognizes that the server has started. I had this problem for weeks and finally figured out that (at least for me) the host name and address had to be identical. I had hostname:localhost; address"127.0.0.1" and it would not work. I changed both to 127.0.0.1 and voila!"

              But I have changed the localhost to 127.0.0.1 in the server-overview, and it does not work.
              Is there another place in Eclipse where I must change localhost to 127.0.0.1 ?

              • 4. Re: JBoss server hangs in state
                Oliver Roell Newbie

                This is another try to post the jboss42.serverdef file:

                <property id="serverRootDirectory"
                 label="%ApplicationServerDirectory"
                 type="directory"
                 context="runtime"
                 default="/your_server_root/appservers/jboss" />
                <property id="serverAddress"
                 label="%serverAddress"
                 type="string"
                 context="server"
                 default="127.0.0.1" />
                <property id="port"
                 label="%serverPort"
                 type="string"
                 context="server"
                 default="8080" />
                <property id="jndiPort"
                 label="%jndiPort"
                 type="string"
                 context="server"
                 default="1099" />
                <property id="serverConfig"
                 label="%jboss323serverConfig"
                 type="combo"
                 context="server"
                 default="default,all,minimal,other - type your own here" />
                
                 <port>
                 <no>${port}</no>
                 <name>Http</name>
                 <protocol>http</protocol>
                 </port>
                


                • 5. Re: JBoss server hangs in state
                  Peter Johnson Master

                  That looks like the correct settings IF you did not change the ports used by JBoss AS AND you did not use the -b option to bind JBoss AS to a different IP address.

                  The next thing to look at is the host file (it is in c:/windows/system32/drivers/etc). Most likely, that is not set up correctly. Here's what is in mine (the second line is for IPv6):

                  127.0.0.1 localhost
                  ::1 localhost

                  If your hosts file is different, please post it (you can skip the comment lines at the start of the file).

                  • 6. Re: JBoss server hangs in state
                    Oliver Roell Newbie

                    Peter, this is my hosts-file. It is identical with yours:

                    127.0.0.1 localhost

                    There are seven spaces between 127.0.0.1 and localhost.

                    You wrote: "IF you did not change the ports used by JBoss AS AND you did not use the -b option to bind JBoss AS to a different IP address."

                    How can I check these options?

                    When I make a double-click on "JBoss 4.2. Server" within the "JBoss Server View", I can see the server ports in the Overview:

                    JNDI Port, Automatically detect
                    When I click on "Configure..." there is the "Current Value" of 1099.

                    Web Port, Automatically detect
                    When I click on "Configure..." there is the "Current Value" of 8080.

                    That should be fine.

                    This is a snipped from my JBoss run.bat from the bin-directory:

                    :RESTART
                    "%JAVA%" %JAVA_OPTS% ^
                     -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" ^
                     -classpath "%JBOSS_CLASSPATH%" ^
                     org.jboss.Main %*
                    


                    I do now know whether Eclipse uses the same run.bat or if Eclipse has it's own JBoss-start-routine with separate options.


                    • 7. Re: JBoss server hangs in state
                      Peter Johnson Master

                      The easiest way to determine which ports JBoss AS is using is to run "nestat -ab" on the command line. Or get TCPView form SysInternals.

                      One more thought. Run this from a command line:

                      telnet localhost 1099

                      The page will refresh and you will get some garbage back. Post the garbage.

                      • 8. Re: JBoss server hangs in state
                        Oliver Roell Newbie

                        I have installed JBoss 4.0.2 and it works. I can start JBoss 4.0.2 from Eclipse, and Eclipse recognizes that JBoss 4.0.2 has started. The starting-problem occurs only with JBoss 4.2.3.

                        This is the output from netstat -ab after JBoss 4.0.2 has started:

                         TCP roell:1098 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:1099 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:4444 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:4445 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:8009 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:8080 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:8083 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:8093 roell.sip.local:0
                         [javaw.exe]
                        


                        This is the output from netstat -ab after JBoss 4.2.3 has started:

                         TCP roell:1098 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:1099 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:1153 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:1154 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:1157 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:3873 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:4444 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:4445 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:4446 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:8009 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:8080 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:8083 roell.sip.local:0
                         [javaw.exe]
                         TCP roell:8093 roell.sip.local:0
                         [javaw.exe]
                        


                        Running "telnet localhost 1099" from a command line prints an error, that it is not possible to create a connection with the host on port 1099. Connection failed.


                        • 9. Re: JBoss server hangs in state
                          Oliver Roell Newbie

                          I have tested it on another PC with JBoss 4.2.3 and it works. Eclipse recognizes on the other PC that JBoss has started. Only my PC and my Eclipse is too stupid for this.

                          This is my output from netstat -ab after JBoss 4.0.2 has started:

                           TCP roell:1099 localhost:1137 WAITING 0
                           TCP roell:1099 localhost:1142 WAITING 0
                           TCP roell:1099 localhost:1132 WAITING 0
                           TCP roell:1099 localhost:1129 WAITING 0
                           TCP roell:1130 localhost:1098 WAITING 0
                           TCP roell:1131 localhost:1098 WAITING 0
                           TCP roell:1133 localhost:1098 WAITING 0
                           TCP roell:1134 localhost:4444 WAITING 0
                           TCP roell:1135 localhost:1098 WAITING 0
                           TCP roell:1136 localhost:4444 WAITING 0
                           TCP roell:1138 localhost:1098 WAITING 0
                           TCP roell:1139 localhost:4444 WAITING 0
                           TCP roell:1140 localhost:4444 WAITING 0
                           TCP roell:1141 localhost:1098 WAITING 0
                           TCP roell:1143 localhost:1098 WAITING 0
                           TCP roell:1144 localhost:4444 WAITING 0
                           TCP roell:1145 localhost:1098 WAITING 0
                           TCP roell:1146 localhost:4444 WAITING 0
                          


                          This is my output from netstat -ab after JBoss 4.2.3 has started:

                           TCP roell:1152 roell.sip.local:1148 WAITING 0
                           TCP roell:1155 roell.sip.local:1153 WAITING 0
                          


                          This is the output from the other PC after JBoss 4.2.3 has started:

                           TCP anotherPC:1099 localhost:2141 WAITING 0
                           TCP anotherPC:1099 localhost:2133 WAITING 0
                           TCP anotherPC:1099 localhost:2146 WAITING 0
                           TCP anotherPC:1099 localhost:2136 WAITING 0
                           TCP anotherPC:2134 localhost:1098 WAITING 0
                           TCP anotherPC:2135 localhost:1098 WAITING 0
                           TCP anotherPC:2137 localhost:1098 WAITING 0
                           TCP anotherPC:2138 localhost:4444 WAITING 0
                           TCP anotherPC:2139 localhost:1098 WAITING 0
                           TCP anotherPC:2140 localhost:4444 WAITING 0
                           TCP anotherPC:2142 localhost:1098 WAITING 0
                           TCP anotherPC:2143 localhost:4444 WAITING 0
                           TCP anotherPC:2144 localhost:1098 WAITING 0
                           TCP anotherPC:2145 localhost:4444 WAITING 0
                           TCP anotherPC:2147 localhost:1098 WAITING 0
                           TCP anotherPC:2148 localhost:4444 WAITING 0
                          


                          My WAITING-output from netstat -ab after JBoss 4.2.3 has started is a very small list. Could this be a problem?


                          • 10. Re: JBoss server hangs in state
                            Peter Johnson Master

                            Your are using XP, is the other PC also using XP? I ask because the netstat output appears to be coming out in a different order (the bound ports are in the third column instead of the second column, like on your PC).

                            It appears you ran netstat on your PC with 4.2.3 twice and got two different outputs?

                            If the telnet did not work then port 1099 is not bound to localhost. Try again using:

                            telnet roell 1099

                            If that works, then do these things.

                            First, when you start JBoss AS within Eclipse you should see the console log output in Eclipse's console window. A few lines before the "started in xxx seconds" line there will be a line that looks like this:

                            08:19:20,537 INFO [Http11Protocol] (main) Starting Coyote HTTP/1.1 on http-127.0.0.1-8080

                            Post that line from your output.

                            Second, run JBoss AS from the command line. Then find the same line and post it also.

                            • 11. Re: JBoss server hangs in state
                              Oliver Roell Newbie

                              Both PCs running with XP Service Pack 3.

                              Yes, when I run netstat on my PC with 4.2.3 twice I got different outputs.
                              The ports 1098, 1099, 3873, 4444, 4445, 4446, 8009, 8080, 8083 and 8093 are always the same, but three ports change:
                              1153, 1154, 1157 at the first call
                              1158, 1159, 1162 at the second call
                              1167, 1168, 1170 at the third call

                              "telnet [user-name] 1099" does not work on both PCs. It's always the same error:
                              Connecting to [user-name]...Could not open connection to the host on port 1099: Connection failed

                              I have started JBoss on both PCs within Eclipse and on the command-line. The output is the same:

                              JBoss started within Eclipse (host-name in the Overview is localhost):

                              INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-localhost%2F127.0.0.1-8080

                              JBoss started within Eclipse (host-name in the Overview is 127.0.0.1):

                              INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080

                              JBoss started on command line:

                              INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-127.0.0.1-8080

                              • 12. Re: JBoss server hangs in state
                                Peter Johnson Master

                                The changing ports are not a problem - some ports are dynamically assigned. See this for a list of key ports:
                                http://www.jboss.org/community/wiki/UsingJBossBehindAFirewall

                                The telnet syntax is "telnet [hostname] [port]", not [username]. The [hostname]s I suggested were based on the netstat output. If telnet cannot access port 1099, then Eclipse will not be able to access it either, and thus will never be able to tell whether the app server is running.

                                All I can think of at this point is that a firewall is blocking the ports. Depending on how insistent your firewall is in doing this blocking, you might have to uninstall the firewall software to get this working. I have had to uninstall ZoneAlarm and Symantec on occasion to get some software to work, usually because I left those firewalls on 'automatic' mode and they guessed wrong.

                                • 13. Re: JBoss server hangs in state started
                                  Oliver Roell Newbie

                                  Our SysAdmin is back from holiday and has changed my TCP/IP-settings.

                                  Eclipse still not recognizes that JBoss 4.2.3 has started, but "telnet localhost 1099" works now:

                                  ¼Ã�sr?java.rmi.MarshalledObject|¢?ùÃ�c³>??I?hashlocBytest?[BobjBytesq~?xp+Åä-ur?[B
                                  ?°TÓ?xp'¼Ã�t?http://127.0.0.1:8083/q~q~uq~?+¼Ã�sr org.jnp.server.NamingServer_Stub
                                  ??xrjava.rmi.server.RemoteStubÚ¦_+ïße?xr?java.rmi.server.RemoteObjectËa¦æ
                                   a3??xpw
                                  4
                                   UnicastRef2 127.0.0.1?JGǧ??#¦Çx
                                  


                                  Eclipse recognizes that JBoss 4.0.2 has started, and this is the "telnet localhost 1099" from JBoss 4.0.2:

                                  ¼�sr?java.rmi.MarshalledObject|¢?ù�c³>??I?hashlocBytest?[BobjBytesq~?xpª?ÞVur?[B
                                  ?°TÓ?xp#¼Ã�t?http://roell:8083/q~q~uq~?-¼Ã�sr org.jnp.server.NamingServer_Stub??xr
                                  java.rmi.server.RemoteStubÚ¦_+ïße?xr?java.rmi.server.RemoteObjectËa¦æ
                                   a3??xpw8
                                   Uni
                                  172.23.10.109?JÄÈ-?#+76Çx
                                  


                                  My windows-firewall was disabled and there is no other firewall on my PC.

                                  This is the complete "netstat -ab" after JBoss 4.2.3 has started in Eclipse 3.4.2:

                                  Aktive Verbindungen
                                   Proto Lokale Adresse Remoteadresse Status PID
                                   TCP roell:epmap roell.sip.local:0 ABH™REN 1084
                                   c:\windows\system32\WS2_32.dll
                                   C:\WINDOWS\system32\RPCRT4.dll
                                   c:\windows\system32\rpcss.dll
                                   C:\WINDOWS\system32\svchost.exe
                                   C:\WINDOWS\system32\ADVAPI32.dll
                                   [svchost.exe]
                                   TCP roell:microsoft-ds roell.sip.local:0 ABH™REN 4
                                   [System]
                                   TCP roell:2779 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:2780 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:2782 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:5555 roell.sip.local:0 ABH™REN 2028
                                   [omniinet.exe]
                                   TCP roell:19226 roell.sip.local:0 ABH™REN 376
                                   [Pagent.exe]
                                   TCP roell:1040 roell.sip.local:0 ABH™REN 1416
                                   [alg.exe]
                                   TCP roell:1098 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:1099 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:3873 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:4444 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:4445 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:4446 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:5152 roell.sip.local:0 ABH™REN 1960
                                   [jqs.exe]
                                   TCP roell:8009 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:8080 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:8083 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:8093 roell.sip.local:0 ABH™REN 200
                                   [javaw.exe]
                                   TCP roell:netbios-ssn roell.sip.local:0 ABH™REN 4
                                   [System]
                                   TCP roell:2715 speedy.sip.local:microsoft-ds HERGESTELLT 4
                                   [System]
                                   TCP roell:2725 sblsrv.local.sip.de:telnet HERGESTELLT 3088
                                   [HOST32.EXE]
                                   TCP roell:2726 sblsrv.local.sip.de:telnet HERGESTELLT 3808
                                   [netterm.exe]
                                   TCP roell:2728 pegasus.local.sip.de:144 HERGESTELLT 2188
                                   [OUTLOOK.EXE]
                                   TCP roell:5152 localhost:2606 SCHLIESSEN_WARTEN 1960
                                   [jqs.exe]
                                   TCP roell:1099 localhost:2784 WARTEND 0
                                   TCP roell:2783 roell.sip.local:2779 WARTEND 0
                                   UDP roell:4500 *:* 804
                                   [lsass.exe]
                                   UDP roell:isakmp *:* 804
                                   [lsass.exe]
                                   UDP roell:19226 *:* 376
                                   [Pagent.exe]
                                   UDP roell:microsoft-ds *:* 4
                                   [System]
                                   UDP roell:1025 *:* 804
                                   [lsass.exe]
                                   UDP roell:1900 *:* 1592
                                   c:\windows\system32\WS2_32.dll
                                   c:\windows\system32\ssdpsrv.dll
                                   C:\WINDOWS\system32\ADVAPI32.dll
                                   C:\WINDOWS\system32\kernel32.dll
                                   [svchost.exe]
                                   UDP roell:ntp *:* 1188
                                   c:\windows\system32\WS2_32.dll
                                   c:\windows\system32\w32time.dll
                                   ntdll.dll
                                   -- unbekannte Komponente(n) --
                                   [svchost.exe]
                                   UDP roell:1044 *:* 748
                                   [winlogon.exe]
                                   UDP roell:netbios-ns *:* 4
                                   [System]
                                   UDP roell:netbios-dgm *:* 4
                                   [System]
                                   UDP roell:ntp *:* 1188
                                   c:\windows\system32\WS2_32.dll
                                   c:\windows\system32\w32time.dll
                                   ntdll.dll
                                   C:\WINDOWS\system32\kernel32.dll
                                   [svchost.exe]
                                   UDP roell:1900 *:* 1592
                                   c:\windows\system32\WS2_32.dll
                                   c:\windows\system32\ssdpsrv.dll
                                   C:\WINDOWS\system32\ADVAPI32.dll
                                   C:\WINDOWS\system32\kernel32.dll
                                   [svchost.exe]
                                  




                                  • 14. Re: JBoss server hangs in state
                                    Peter Johnson Master

                                    What your are looking for in the telnet response is the hostname or IP address that comes right after "UnicastRef". In the first case that was 127.0.0.1 and in the second 172.23.10.109. The client, when it gets a response from the JNDI server, uses this hostname/IP address for all future communications with the server. I have found in many cases that if a hostname is passed back that the hostname is either unknown to the DNS or the client has an invalid IP address for the hostname in its hosts file. I have also seen invalid IP addresses being sent back, which usually indicates problems in the hosts file on the server.

                                    In your case the responses appear to be correct - a client should have no problems using 127.0.0.1 to communicate with the server.

                                    At this point I have suggested everything I can think of.

                                    1 2 Previous Next