You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Konstantin Kolinko (JIRA)" <ji...@apache.org> on 2011/01/27 18:48:43 UTC

[jira] Created: (DAEMON-195) Stopping the service with "net stop" prints "Error 109: The pipe has been ended."

Stopping the service with "net stop" prints "Error 109: The pipe has been ended."
---------------------------------------------------------------------------------

                 Key: DAEMON-195
                 URL: https://issues.apache.org/jira/browse/DAEMON-195
             Project: Commons Daemon
          Issue Type: Bug
          Components: Procrun
    Affects Versions: 1.0.5
         Environment: WinXP SP3 32-bit
            Reporter: Konstantin Kolinko
            Priority: Minor


This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673

To reproduce:
1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
2. Launch the command prompt window.
3. The following command succeeds:
net stop Tomcat7
It prints two localized messages that can be translated as
The "Apache Tomcat 7" service is being started.
The "Apache Tomcat 7" service started successfully.p
4. The following command apparently fails, but actually it succeeds:
net stop Tomcat7
It prints two localized messages that are, citing from BZ 50673:
System error 109.
The pipe has been ended.
Note that "The service being stopped" message is not printed.
5. Repeating the command shows that the service has been stopped:
net stop Tomcat7
The "Apache Tomcat 7" service has not been started.

The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
[2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
[2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
[2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
[2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...

Stopping the service with Stop button in prunmgr app succeeds without any messages.
Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DAEMON-195) "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.

Posted by "Mladen Turk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989577#comment-12989577 ] 

Mladen Turk commented on DAEMON-195:
------------------------------------

If running trough standard Daemon classes it is expected that embedding client
doesn't call System.exit. I'll see if that can be unconditionally set.
However calling System.exit is a hack for clients that doesn't use Daemon
classes and have shutdown hook installed.
Of course this prevents clean procrun shutdown cause it will never
execute code after apxHandleWait (serviceMain)

rv = apxHandleWait(gWorker, INFINITE, FALSE);
apxLogWrite(APXLOG_MARK_DEBUG "Worker finished.");


System.exit will cause the procrun to exit uncleanly from apxHandleWait
However I did best to ensure this doesn't leave anything hanging around,
so basically it just misses few "finished" log messages.






> "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-195
>                 URL: https://issues.apache.org/jira/browse/DAEMON-195
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.5
>         Environment: WinXP SP3 32-bit
>            Reporter: Konstantin Kolinko
>            Priority: Minor
>
> This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673
> To reproduce:
> 1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
> 2. Launch the command prompt window.
> 3. The following command succeeds:
> net stop Tomcat7
> It prints two localized messages that can be translated as
> The "Apache Tomcat 7" service is being started.
> The "Apache Tomcat 7" service started successfully.p
> 4. The following command apparently fails, but actually it succeeds:
> net stop Tomcat7
> It prints two localized messages that are, citing from BZ 50673:
> System error 109.
> The pipe has been ended.
> Note that "The service being stopped" message is not printed.
> 5. Repeating the command shows that the service has been stopped:
> net stop Tomcat7
> The "Apache Tomcat 7" service has not been started.
> The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
> [2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
> [2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
> [2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
> [2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...
> Stopping the service with Stop button in prunmgr app succeeds without any messages.
> Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DAEMON-195) "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.

Posted by "Konstantin Kolinko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989234#comment-12989234 ] 

Konstantin Kolinko commented on DAEMON-195:
-------------------------------------------

This issue was also observed on Windows 2003 R2 (with Tomcat 7.0.6):
http://markmail.org/thread/xzvdk6d3ycoc5v7d

> "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-195
>                 URL: https://issues.apache.org/jira/browse/DAEMON-195
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.5
>         Environment: WinXP SP3 32-bit
>            Reporter: Konstantin Kolinko
>            Priority: Minor
>
> This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673
> To reproduce:
> 1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
> 2. Launch the command prompt window.
> 3. The following command succeeds:
> net stop Tomcat7
> It prints two localized messages that can be translated as
> The "Apache Tomcat 7" service is being started.
> The "Apache Tomcat 7" service started successfully.p
> 4. The following command apparently fails, but actually it succeeds:
> net stop Tomcat7
> It prints two localized messages that are, citing from BZ 50673:
> System error 109.
> The pipe has been ended.
> Note that "The service being stopped" message is not printed.
> 5. Repeating the command shows that the service has been stopped:
> net stop Tomcat7
> The "Apache Tomcat 7" service has not been started.
> The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
> [2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
> [2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
> [2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
> [2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...
> Stopping the service with Stop button in prunmgr app succeeds without any messages.
> Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DAEMON-195) "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.

Posted by "Konstantin Kolinko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Konstantin Kolinko updated DAEMON-195:
--------------------------------------

    Summary: "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.  (was: Stopping the service with "net stop" prints "Error 109: The pipe has been ended.")

> "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-195
>                 URL: https://issues.apache.org/jira/browse/DAEMON-195
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.5
>         Environment: WinXP SP3 32-bit
>            Reporter: Konstantin Kolinko
>            Priority: Minor
>
> This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673
> To reproduce:
> 1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
> 2. Launch the command prompt window.
> 3. The following command succeeds:
> net stop Tomcat7
> It prints two localized messages that can be translated as
> The "Apache Tomcat 7" service is being started.
> The "Apache Tomcat 7" service started successfully.p
> 4. The following command apparently fails, but actually it succeeds:
> net stop Tomcat7
> It prints two localized messages that are, citing from BZ 50673:
> System error 109.
> The pipe has been ended.
> Note that "The service being stopped" message is not printed.
> 5. Repeating the command shows that the service has been stopped:
> net stop Tomcat7
> The "Apache Tomcat 7" service has not been started.
> The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
> [2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
> [2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
> [2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
> [2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...
> Stopping the service with Stop button in prunmgr app succeeds without any messages.
> Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DAEMON-195) "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.

Posted by "Konstantin Kolinko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989289#comment-12989289 ] 

Konstantin Kolinko commented on DAEMON-195:
-------------------------------------------

Looking at the logs (see Description above) and at the source code, it looks that
{quote}
  apxJavaWait(hWorker, INFINITE, FALSE);
{quote}
call in prunsrv.c line 873 (in serviceStop(LPVOID)) never returns and the prunsrv process just disappears.

1. There is no "Java Worker thread finished %s:%s with status=%d" message from the worker thread ({{javajni.c method __apxJavaWorkerThread(LPVOID)}})
2. There is no "Java jni stop worker finished." message from thread executing serviceStop() call ({{prunsrv.c method serviceStop(LPVOID))}}


Tomcat 7.0.6 and recent versions of Tomcat 6.0 (6.0.30+) when being run as a service terminate themselves by calling System.exit(0).

The lines are, in {{org.apache.catalina.startup.Catalina#stopServer(String[])}}
{quote}
            // Server object already present. Must be running as a service
            // Shutdown hook will take care of clean-up
            System.exit(0);
{quote}

I see that prunsrv has special support for calling System.exit as the stop method. Thus here is a *workaround*:

1. Open the _Configure Tomcat_ dialog (the prunmgr application, aka tomcat7w.exe, aka tomcat6w.exe) and 
2. Configure the following settings on the *Shutdown* tab:

{quote}
*Class*: {{java.lang.System}}
*Method*: {{exit}}
*Arguments*: _remove any text from this field_
{quote}

With the above configuration the service stops successfully.


--------
_PS_: some thoughts when investigating this (may be not so useful):
1. In prunsrv.c in method serviceStop(LPVOID) there is the following call: {{_onexit(onExitHook);}}  This is executed only if the class name is "java/lang/System". I wonder whether it were better if the hook was installed unconditionally. Its job is to report {{reportServiceStatus(SERVICE_STOPPED, NO_ERROR, 0);}} back to the service management. Maybe that is not enough, because there are also other places where "java/lang/System" processing differs from executing any other Java class.

2. If java.lang.System.exit() resulted in a call to ExitProcess (I do not actually know. Just speculating), I would expect from [1] that the thread calling this method was continuing to run. In our case the call was done by the worker thread ({{__apxJavaWorkerThread(LPVOID)}} method). But, as there was no "Java Worker thread finished %s:%s with status=%d" message, it means that the thread was abruptly terminated, just like any other.

[1] http://msdn.microsoft.com/en-us/library/ms682658%28v=vs.85%29.aspx

> "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-195
>                 URL: https://issues.apache.org/jira/browse/DAEMON-195
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.5
>         Environment: WinXP SP3 32-bit
>            Reporter: Konstantin Kolinko
>            Priority: Minor
>
> This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673
> To reproduce:
> 1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
> 2. Launch the command prompt window.
> 3. The following command succeeds:
> net stop Tomcat7
> It prints two localized messages that can be translated as
> The "Apache Tomcat 7" service is being started.
> The "Apache Tomcat 7" service started successfully.p
> 4. The following command apparently fails, but actually it succeeds:
> net stop Tomcat7
> It prints two localized messages that are, citing from BZ 50673:
> System error 109.
> The pipe has been ended.
> Note that "The service being stopped" message is not printed.
> 5. Repeating the command shows that the service has been stopped:
> net stop Tomcat7
> The "Apache Tomcat 7" service has not been started.
> The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
> [2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
> [2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
> [2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
> [2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...
> Stopping the service with Stop button in prunmgr app succeeds without any messages.
> Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (DAEMON-195) "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.

Posted by "Li Cao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104733#comment-13104733 ] 

Li Cao edited comment on DAEMON-195 at 9/14/11 6:07 PM:
--------------------------------------------------------

I am trying to wrap a Java application using "JVM" option and when stopping the service from Services list in Control Panel it eventually stops after a long wait with the following message in a popup dialog box:

Cound not stop the myService service on local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.

The OS is Microsoft Windows Server 2003 Standard x64 Edition Service Pack 2 and I am using the AMD64 binary. "net stop serviceName" command exhibits the same behavior as reported in the first comment.

      was (Author: licao):
    I am trying to wrap a Java application using "JVM" option and when stopping the service from Services list in Control Panel it eventually stops after a long wait with the following message in a popup dialog box:

Cound not stop the myService service on local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.

The OS is Microsoft Windows Server 2003 Standard x64 Edition Service Pack 2 and I am using the AMD64 binary. "net stop serviceName" command exhibits the same behavior as reported in the first comment.
procrun 
  
> "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-195
>                 URL: https://issues.apache.org/jira/browse/DAEMON-195
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.5
>         Environment: WinXP SP3 32-bit
>            Reporter: Konstantin Kolinko
>            Priority: Minor
>
> This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673
> To reproduce:
> 1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
> 2. Launch the command prompt window.
> 3. The following command succeeds:
> net stop Tomcat7
> It prints two localized messages that can be translated as
> The "Apache Tomcat 7" service is being started.
> The "Apache Tomcat 7" service started successfully.p
> 4. The following command apparently fails, but actually it succeeds:
> net stop Tomcat7
> It prints two localized messages that are, citing from BZ 50673:
> System error 109.
> The pipe has been ended.
> Note that "The service being stopped" message is not printed.
> 5. Repeating the command shows that the service has been stopped:
> net stop Tomcat7
> The "Apache Tomcat 7" service has not been started.
> The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
> [2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
> [2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
> [2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
> [2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...
> Stopping the service with Stop button in prunmgr app succeeds without any messages.
> Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DAEMON-195) "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.

Posted by "Li Cao (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104733#comment-13104733 ] 

Li Cao commented on DAEMON-195:
-------------------------------

I am trying to wrap a Java application using "JVM" option and when stopping the service from Services list in Control Panel it eventually stops after a long wait with the following message in a popup dialog box:

Cound not stop the myService service on local Computer.
Error 1053: The service did not respond to the start or control request in a timely fashion.

The OS is Microsoft Windows Server 2003 Standard x64 Edition Service Pack 2 and I am using the AMD64 binary. "net stop serviceName" command exhibits the same behavior as reported in the first comment.
procrun 

> "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-195
>                 URL: https://issues.apache.org/jira/browse/DAEMON-195
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.5
>         Environment: WinXP SP3 32-bit
>            Reporter: Konstantin Kolinko
>            Priority: Minor
>
> This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673
> To reproduce:
> 1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
> 2. Launch the command prompt window.
> 3. The following command succeeds:
> net stop Tomcat7
> It prints two localized messages that can be translated as
> The "Apache Tomcat 7" service is being started.
> The "Apache Tomcat 7" service started successfully.p
> 4. The following command apparently fails, but actually it succeeds:
> net stop Tomcat7
> It prints two localized messages that are, citing from BZ 50673:
> System error 109.
> The pipe has been ended.
> Note that "The service being stopped" message is not printed.
> 5. Repeating the command shows that the service has been stopped:
> net stop Tomcat7
> The "Apache Tomcat 7" service has not been started.
> The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
> [2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
> [2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
> [2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
> [2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...
> Stopping the service with Stop button in prunmgr app succeeds without any messages.
> Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DAEMON-195) "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.

Posted by "Mladen Turk (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DAEMON-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13143511#comment-13143511 ] 

Mladen Turk commented on DAEMON-195:
------------------------------------

This will always happen if the stop method calls System.exit()
There is no way to bypass that.
On Tomcat you can use --StopMode java and it'll shutdown cleanly.
Think we will need to make that as default (at least on Tomcat)

                
> "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-195
>                 URL: https://issues.apache.org/jira/browse/DAEMON-195
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.5
>         Environment: WinXP SP3 32-bit
>            Reporter: Konstantin Kolinko
>            Priority: Minor
>
> This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673
> To reproduce:
> 1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
> 2. Launch the command prompt window.
> 3. The following command succeeds:
> net stop Tomcat7
> It prints two localized messages that can be translated as
> The "Apache Tomcat 7" service is being started.
> The "Apache Tomcat 7" service started successfully.p
> 4. The following command apparently fails, but actually it succeeds:
> net stop Tomcat7
> It prints two localized messages that are, citing from BZ 50673:
> System error 109.
> The pipe has been ended.
> Note that "The service being stopped" message is not printed.
> 5. Repeating the command shows that the service has been stopped:
> net stop Tomcat7
> The "Apache Tomcat 7" service has not been started.
> The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
> [2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
> [2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
> [2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
> [2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...
> Stopping the service with Stop button in prunmgr app succeeds without any messages.
> Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DAEMON-195) "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.

Posted by "Mladen Turk (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DAEMON-195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mladen Turk resolved DAEMON-195.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.8

Seems the fix was really trivial.
Instead waiting on stop thread to finish, return control immediately to the service control manager.
This prevents broken pipe messages if start or stop method calls System.exit
                
> "net stop serviceName" prints "Error 109: The pipe has been ended." Stopping via Windows Control Panel hangs.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DAEMON-195
>                 URL: https://issues.apache.org/jira/browse/DAEMON-195
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.5
>         Environment: WinXP SP3 32-bit
>            Reporter: Konstantin Kolinko
>            Priority: Minor
>             Fix For: 1.0.8
>
>
> This issue was reported for Tomcat 7.0.6: https://issues.apache.org/bugzilla/show_bug.cgi?id=50673
> To reproduce:
> 1. Install apache-tomcat-7.0.6.exe   I am installing with default options. I am not starting Tomcat after installation.
> 2. Launch the command prompt window.
> 3. The following command succeeds:
> net stop Tomcat7
> It prints two localized messages that can be translated as
> The "Apache Tomcat 7" service is being started.
> The "Apache Tomcat 7" service started successfully.p
> 4. The following command apparently fails, but actually it succeeds:
> net stop Tomcat7
> It prints two localized messages that are, citing from BZ 50673:
> System error 109.
> The pipe has been ended.
> Note that "The service being stopped" message is not printed.
> 5. Repeating the command shows that the service has been stopped:
> net stop Tomcat7
> The "Apache Tomcat 7" service has not been started.
> The commons-daemon.<date>.log contains only the following four lines when stopping the service with Debug logging enabled:
> [2011-01-27 20:18:59] [info]  (          :0   ) Stopping service...
> [2011-01-27 20:18:59] [debug] ( javajni.c:844 ) argv[0] = stop
> [2011-01-27 20:18:59] [debug] ( javajni.c:891 ) Java Worker thread started org/apache/catalina/startup/Bootstrap:main
> [2011-01-27 20:19:00] [debug] ( prunsrv.c:871 ) Waiting for java jni stop worker to finish...
> Stopping the service with Stop button in prunmgr app succeeds without any messages.
> Stopping the service from the Services list in the Control Panel quickly goes to 50% of progress but then continues to wait forever, without any changes on the screen.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira