Hello, I am using Procrun to run a Spring Boot microservice as a Windows service. After migrating from Spring Boot 2.7.18 to 3.3.11, I've observed that when Procrun stops the service, it now shows the following error messages in the log:
[2025-12-05 08:50:02] [info] [52656] Service SERVICE_CONTROL_STOP signalled. [2025-12-05 08:50:02] [info] [27984] Stopping service... [2025-12-05 08:50:02] [info] [27984] Stopping service...timeout 60000 [2025-12-05 08:50:02] [info] [27984] Stopping service...timeout 60000 _jni_shutdown [2025-12-05 08:50:03] [error] [17164] Failed to set service status. [2025-12-05 08:50:03] [error] [17164] The handle is invalid. The service appears to have successfully shut down despite this, however. I've observed this happening with Procrun versions 1.4.1 and 1.5.0. Interestingly, these errors aren't logged when I enable debug logging in Procrun: [2025-12-05 08:40:34] [info] ( prunsrv.c:1610) [11696] Service SERVICE_CONTROL_STOP signalled. [2025-12-05 08:40:34] [debug] ( prunsrv.c:1127) [11696] reportServiceStatusE: dwCurrentState = 3 (SERVICE_STOP_PENDING), dwWin32ExitCode = 0, dwWaitHint = 3000 milliseconds, dwServiceSpecificExitCode = 0. [2025-12-05 08:40:34] [info] ( prunsrv.c:1227) [ 9148] Stopping service... [2025-12-05 08:40:34] [debug] ( javajni.c:419 ) [ 9148] Loaded JVM DLL 'C:\Program Files\Java\jdk-21.0.7+6\bin\server\jvm.dll', home '(null)'. [2025-12-05 08:40:35] [debug] ( javajni.c:424 ) [ 9148] JNI_GetCreatedJavaVMs... [2025-12-05 08:40:35] [debug] ( javajni.c:1008) [12816] argv[0] = stop [2025-12-05 08:40:35] [debug] ( javajni.c:1067) [12816] Java worker thread started for ***:stop [2025-12-05 08:40:35] [debug] ( javajni.c:1073) [12816] JNI calling static void method ***:stop [2025-12-05 08:40:35] [debug] ( javajni.c:571 ) [12204] Exit hook with exit code 0 [2025-12-05 08:40:35] [debug] ( prunsrv.c:1194) [12204] Stop exit hook called... [2025-12-05 08:40:35] [debug] ( prunsrv.c:1127) [12204] reportServiceStatusE: dwCurrentState = 1 (SERVICE_STOPPED), dwWin32ExitCode = 0, dwWaitHint = 0 milliseconds, dwServiceSpecificExitCode = 0. [2025-12-05 08:40:35] [debug] ( prunsrv.c:1203) [12204] Start exit hook called... [2025-12-05 08:40:35] [debug] ( prunsrv.c:1204) [12204] JVM exit code: 0. [2025-12-05 08:40:35] [debug] ( prunsrv.c:1127) [12204] reportServiceStatusE: dwCurrentState = 1 (SERVICE_STOPPED), dwWin32ExitCode = 0, dwWaitHint = 0 milliseconds, dwServiceSpecificExitCode = 0. [2025-12-05 08:40:35] [info] ( prunsrv.c:1932) [11696] Run service finished. [2025-12-05 08:40:35] [info] ( prunsrv.c:2190) [11696] Apache Commons Daemon procrun finished. Thank you, Jordan Strong Confidentiality Notice: This e-mail, including any attachments, may include advisory, consultative and/or deliberative material and, as such, would be privileged and/or confidential and not a public document. Any information in this e-mail identifying a client of the Department of Health or including protected health information is confidential. If you received this e-mail in error, you are not authorized to review, transmit, convert to hard copy, copy, or in any way further use or disseminate this e-mail or any attachments to it. You must immediately notify the sender, delete the email/attachment(s), confirm in writing to the sender that you deleted the email/attachment(s) and that you did not/will not further use or disclose the information contained in the email.
