<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
cmd.exe processes stranded after JBoss 5.1 service shutdown Windows 7
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/cdavis999">Chris Davis</a> in <i>JBoss Web Development</i> - <a href="http://community.jboss.org/message/607072#607072">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I'm running JBoss EAP 5.1 as a service on Windows 7 (32-bit).  I used service.bat to install/uninstall the service.  I use the Windows Control Panel Services dialog to start and stop the service.  JBoss starts up cleanly and JBoss itself shuts down cleanly when I stop the service (as reported by the shutdown.log).  The jbosssvc.exe process and the java.exe process also disappear from Task Manager. However, Task Manager continues to show the two cmd.exe processes presumably spawned by jbosssvc.exe, for example:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 8pt;"><span style="text-decoration: underline;">Image Name</span> <span style="text-decoration: underline;">PID    </span> <span style="text-decoration: underline;">User Name</span> <span style="text-decoration: underline;">Command Line</span></span></p><p><span style="font-size: 8pt;">cmd.exe       7148  SYSTEM    </span><span style="font-size: 8pt;">C:\Windows\system32\cmd.exe /E:ON /S /C "SET JSERVICE_PPID=6344&&SET JSERVICE_NAME=JBEAP5SVC&&CALL service.bat start"</span></p><p><span style="font-size: 8pt;">cmd.exe       8322  SYSTEM    C:\Windows\system32\cmd.exe /E:ON /S /C "SET JSERVICE_PPID=6344&&SET JSERVICE_NAME=JBEAP5SVC&&CALL service.bat stop"</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>These processes have to be manually killed.  Shouldn't jbosssvc.exe be able to shut these two processes down automatically?  The PPID parameter in the lines above is the same as the PID for jbosssvc.exe in Task Manager.  I had to tweak my bat files to match my file system paths, so I'm attaching them, along with my run.log and shutdown.log. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>For reference: while the JBoss service is running, Task Manager displays these lines (before I stop the service):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 8pt;"><span style="text-decoration: underline;">Image Name  </span> <span style="text-decoration: underline;">PID    </span> <span style="text-decoration: underline;">User Name</span> <span style="text-decoration: underline;">Command Line</span></span></p><p><span style="font-size: 8pt;">cmd.exe         7148  SYSTEM    </span><span style="font-size: 8pt;">C:\Windows\system32\cmd.exe /E:ON /S /C "SET JSERVICE_PPID=6344&&SET JSERVICE_NAME=JBEAP5SVC&&CALL service.bat start"</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 8pt;">java.exe         3492  SYSTEM  </span><span style="font-size: 8pt;">"C:\Program Files\Java\jdk1.6.0_22\bin\java"  ­Xms512m ­Xmx1024m ­XX:PermSize=512m ­XX:MaxPermSize=512m ­Xrs ­Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="font-size: 8pt;">jbosssvc.exe 6344  SYSTEM   "C:\JBoss510\native32\sbin\jbosssvc.exe" ­r JBEAP5SVC</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Any help is greatly appreciated!</p><p>Chris</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/607072#607072">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Web Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2112">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>