[jboss-user] [Beginners Corner] - Re: shutdown.bat and cntrl-c not working but web-console doe

amast do-not-reply at jboss.com
Wed Jun 25 08:43:44 EDT 2008


First, I'd like to thank you for your clarity and comprehensive series of tests.  I appreciate it greatly. 

"PeterJ" wrote : If you have not changed the ports JBossAS is using, you should be able to stop JBossAS (running on the same machine) using:
  | 
  | shutdown -S
  | 
  | 

Well, I'm not sure if we changed the ports JBossAS is using, but I do know that during our installation, we are required to enter an unused http, https, and AJP port.  I used 14080 for the http, which you'll see in the netstat below.  I tried shutdown -S from the same machine on another console to no avail.  

"PeterJ" wrote : 
  | Are you running shutdown on the same machine on which JBossAS is running? If not, did you start JBossAS using the "-b 0.0.0.0" option? If you did, then stopping a remote JBossAS can be done using:
  | 
  | shutdown -S --server=hostname
  | 

Yes, I am running shutdown on the same machine. Yes, I do start JBossAS using the "-b 0.0.0.0" option.  When attempting to run from a remote location, I get an connectException that localhost:1099 is unreachable.  If I add hostname:port to the -s flag, it takes a while and throws a failed to receive stub from server:port.  


"PeterJ" wrote : 
  | If you tried the above and still have problems, do this:
  | 
  | 1) run netstat (or tcpview) and note the ports opened by JBossAS (they will be assigned to 'java', if you are running multiple java apps, you will have to also look at the process id to identify the ports assigned to JBossAS)
  | 

Here you go... fortunately I'm only running one java.exe process:  (edited for privacy)
TCP  JBossServer:2847       JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:2848       JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:2849       JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:9098       JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:9099       JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:12444      JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:12445      JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:12446      JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:14009      JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:14080      JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:16083      JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:16093      JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]
TCP  JBossServer:11873      JBossServer.my.domain.com:0 LISTENING    3440 [java.exe]

For fun, I ran "shutdown -s JBossServer:port -S" on each of those ports and all of them sat there, as they have.  

"PeterJ" wrote : 
  | 2) Post the java command run when you run shutdown.bat
  | 

3) Once shutdown.bat hangs, type CTRL-Break and post the thread dump.


Here's that Java command .bat is running and the resulting thread dump.  (thanks for that cntrl-Break tip, very handy!)
C:\myProgram\instance8\OITAppServer\bin>shutdown -S --server=jsmith
"..\jvm\win32\bin\java"  -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y  -Djboss.boot.loader.name=shutdown.bat -classpath ";C:\myProgram\instance8\AppServer\bin\\shutdown.jar;C:\myProgram\instance8\AppServer\bin\/../client/jbossall-client.jar" org.jboss.Shutdown  -S --server jsmith

Listening for transport dt_socket at address: 8787

===== FULL THREAD DUMP ===============
Wed Jun 25 07:38:02 2008
BEA JRockit(R) R27.4.0-90-89592-1.6.0_02-20070928-1715-windows-ia32

"Main Thread" id=1 idx=0x4 tid=716 prio=5 alive, in native, native_waiting

"(Signal Handler)" id=2 idx=0x8 tid=3188 prio=5 alive, in native, daemon

"(GC Main Thread)" id=3 idx=0xc tid=1988 prio=5 alive, in native, native_waiting, daemon

"(GC Worker Thread 1)" id=? idx=0x10 tid=1044 prio=5 alive, in native, daemon

"(Code Generation Thread 1)" id=4 idx=0x14 tid=2780 prio=5 alive, in native, native_waiting, daemon

"(Code Optimization Thread 1)" id=5 idx=0x18 tid=324 prio=5 alive, in native, native_waiting, daemon

"(VM Periodic Task)" id=6 idx=0x1c tid=4012 prio=10 alive, in native, daemon

"(Attach Listener)" id=7 idx=0x20 tid=612 prio=5 alive, in native, daemon

"Finalizer" id=8 idx=0x24 tid=3380 prio=8 alive, in native, native_waiting, daemon
    at jrockit/memory/Finalizer.waitForFinalizees([Ljava/lang/Object;)I(Native Method)
    at jrockit/memory/Finalizer.access$500(Finalizer.java:12)
    at jrockit/memory/Finalizer$4.run(Finalizer.java:143)
    at java/lang/Thread.run(Thread.java:619)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace

"Reference Handler" id=9 idx=0x28 tid=3116 prio=10 alive, in native, native_waiting, daemon
    at java/lang/ref/Reference.getPending()Ljava/lang/ref/Reference;(Native Method)
    at java/lang/ref/Reference.access$000(Reference.java:24)
    at java/lang/ref/Reference$ReferenceHandler.run(Reference.java:144)
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace

"(Sensor Event Thread)" id=10 idx=0x2c tid=3360 prio=5 alive, in native, daemon

"JDWP Transport Listener: dt_socket" id=11 idx=0x30 tid=2352 prio=10 alive, in native, daemon

"JDWP Event Helper Thread" id=12 idx=0x34 tid=2792 prio=10 alive, in native, native_waiting, daemon

===== END OF THREAD DUMP ===============


This was the netstat -ab

TCP  jsmith:2847       jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:2848       jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:2849       jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:9098       jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:9099       jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:12444      jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:12445      jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:12446      jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:14009      jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:14080      jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:16083      jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:16093      jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]
TCP  jsmith:11873      jsmith.OIT.DocFinity.com:0 LISTENING    3440 [java.exe]

I also have ESTABLISHED connections but I didn't include them because they simply were database connections for process id 3440 (above). 

Thanks Again!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160537#4160537

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160537



More information about the jboss-user mailing list