Apache常用守护进程- procrun. Stop服务挂起

0qx6xfy6  于 2023-02-24  发布在  Apache
关注(0)|答案(2)|浏览(145)

你好,我安装了我的java服务来运行apache公共守护进程prunsrv。我在停止它时遇到了问题。有时当从windows服务控制台重新启动服务时,它会挂起;奇怪的是,我的服务被正确停止,如apache日志所示。问题似乎与https://issues.apache.org/jira/browse/DAEMON-288相同,即使在版本0.15中似乎已经实现了修复。在版本0.14中,问题不存在,但在版本0.14中,服务随机重新启动(不适合我的需要)。这里有显示服务停止的日志:

[2016-01-19 11:12:52] [info]  [ 2036] Commons Daemon procrun (1.0.15.0 64-bit) started
[2016-01-19 11:12:53] [info]  [ 2036] Running 'xxxxxxx' Service...
[2016-01-19 11:12:53] [info]  [ 1400] Starting service...
[2016-01-19 11:12:54] [info]  [ 1400] Service started in 1546 ms.
[2016-01-19 11:58:50] [info]  [ 2648] Stopping service...
[2016-01-19 11:58:51] [info]  [ 2648] Service stop thread completed.

之后,Windows服务控制台打印“stopping service“,过了一段时间(我想是1分钟),它显示“Windows could not stop the service on local computer. Error 1053: The service did not respond to the start or control request in a timely fashion“;则服务无法重新启动(windows服务控制台继续将其指示为stopping),我们必须重新启动计算机。
有人遇到过同样的问题吗?
谢谢

km0tfn4u

km0tfn4u1#

是的,我在1.0.15版本中发现了这个问题,对我来说,降级到以前的1.0.14版本已经足够了。它与公开的bug有关:
https://issues.apache.org/jira/browse/DAEMON-298
(尽管288标记为已解决)。

4szc88ey

4szc88ey2#

您可以使用**系统退出(0);**在你的停止方法中,如果你找不到好的方法。

相关问题