coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.83k stars 356 forks source link

Window Service is getting stopped Intermittently #258

Closed dhamodharaanbm closed 4 years ago

dhamodharaanbm commented 4 years ago

Service is getting stopped on irregular basic. why is this behavior ?

Attached log for the reference.

2020-06-10 22:13:15 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:13:15 - Started 12584 2020-06-10 22:36:25 - Stopping globalapi.exe 2020-06-10 22:36:25 - ProcessKill 12584 2020-06-10 22:36:25 - Found child process: 9104 Name: conhost.exe 2020-06-10 22:36:25 - Found child process: 12868 Name: node.exe 2020-06-10 22:36:25 - Stopping process 9104 2020-06-10 22:36:25 - Send SIGINT 9104 2020-06-10 22:36:25 - SIGINT to 9104 failed - Killing as fallback 2020-06-10 22:36:25 - Stopping process 12868 2020-06-10 22:36:25 - Send SIGINT 12868 2020-06-10 22:36:25 - SIGINT to 12868 failed - Killing as fallback 2020-06-10 22:36:25 - Stopping process 12584 2020-06-10 22:36:25 - Send SIGINT 12584 2020-06-10 22:36:25 - SIGINT to 12584 failed - Killing as fallback 2020-06-10 22:36:25 - Finished globalapi.exe 2020-06-10 22:36:26 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:36:26 - Started 2504 2020-06-10 22:41:14 - Stopping globalapi.exe 2020-06-10 22:41:14 - ProcessKill 2504 2020-06-10 22:41:14 - Found child process: 11004 Name: conhost.exe 2020-06-10 22:41:14 - Found child process: 4864 Name: node.exe 2020-06-10 22:41:14 - Stopping process 11004 2020-06-10 22:41:14 - Send SIGINT 11004 2020-06-10 22:41:14 - SIGINT to 11004 failed - Killing as fallback 2020-06-10 22:41:15 - Stopping process 4864 2020-06-10 22:41:15 - Send SIGINT 4864 2020-06-10 22:41:15 - SIGINT to 4864 failed - Killing as fallback 2020-06-10 22:41:15 - Stopping process 2504 2020-06-10 22:41:15 - Send SIGINT 2504 2020-06-10 22:41:15 - SIGINT to 2504 failed - Killing as fallback 2020-06-10 22:41:15 - Finished globalapi.exe 2020-06-10 22:41:16 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:41:16 - Started 3380 2020-06-10 22:42:14 - Stopping globalapi.exe 2020-06-10 22:42:14 - ProcessKill 3380 2020-06-10 22:42:14 - Found child process: 8136 Name: conhost.exe 2020-06-10 22:42:14 - Found child process: 5112 Name: node.exe 2020-06-10 22:42:14 - Stopping process 8136 2020-06-10 22:42:14 - Send SIGINT 8136 2020-06-10 22:42:14 - SIGINT to 8136 failed - Killing as fallback 2020-06-10 22:42:14 - Stopping process 5112 2020-06-10 22:42:14 - Send SIGINT 5112 2020-06-10 22:42:14 - SIGINT to 5112 failed - Killing as fallback 2020-06-10 22:42:14 - Stopping process 3380 2020-06-10 22:42:14 - Send SIGINT 3380 2020-06-10 22:42:14 - SIGINT to 3380 failed - Killing as fallback 2020-06-10 22:42:14 - Finished globalapi.exe 2020-06-10 22:42:15 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:42:15 - Started 5408 2020-06-10 22:49:28 - Stopping globalapi.exe 2020-06-10 22:49:28 - ProcessKill 5408 2020-06-10 22:49:29 - Found child process: 1516 Name: conhost.exe 2020-06-10 22:49:29 - Found child process: 12564 Name: node.exe 2020-06-10 22:49:29 - Stopping process 1516 2020-06-10 22:49:29 - Send SIGINT 1516 2020-06-10 22:49:29 - SIGINT to 1516 failed - Killing as fallback 2020-06-10 22:49:29 - Stopping process 12564 2020-06-10 22:49:29 - Send SIGINT 12564 2020-06-10 22:49:29 - SIGINT to 12564 failed - Killing as fallback 2020-06-10 22:49:29 - Stopping process 5408 2020-06-10 22:49:29 - Send SIGINT 5408 2020-06-10 22:49:29 - SIGINT to 5408 failed - Killing as fallback 2020-06-10 22:49:29 - Finished globalapi.exe 2020-06-10 22:49:30 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:49:30 - Started 12696 2020-06-10 22:52:05 - Stopping globalapi.exe 2020-06-10 22:52:05 - ProcessKill 12696 2020-06-10 22:52:05 - Found child process: 7456 Name: conhost.exe 2020-06-10 22:52:06 - Found child process: 4944 Name: node.exe 2020-06-10 22:52:06 - Stopping process 7456 2020-06-10 22:52:06 - Send SIGINT 7456 2020-06-10 22:52:06 - SIGINT to 7456 failed - Killing as fallback 2020-06-10 22:52:06 - Stopping process 4944 2020-06-10 22:52:06 - Send SIGINT 4944 2020-06-10 22:52:06 - SIGINT to 4944 failed - Killing as fallback 2020-06-10 22:52:06 - Stopping process 12696 2020-06-10 22:52:06 - Send SIGINT 12696 2020-06-10 22:52:06 - SIGINT to 12696 failed - Killing as fallback 2020-06-10 22:52:06 - Finished globalapi.exe 2020-06-10 22:52:23 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:52:23 - Started 9228 2020-06-10 22:56:15 - Stopping globalapi.exe 2020-06-10 22:56:15 - ProcessKill 9228 2020-06-10 22:56:15 - Found child process: 1052 Name: conhost.exe 2020-06-10 22:56:15 - Found child process: 8108 Name: node.exe 2020-06-10 22:56:15 - Stopping process 1052 2020-06-10 22:56:15 - Send SIGINT 1052 2020-06-10 22:56:15 - SIGINT to 1052 failed - Killing as fallback 2020-06-10 22:56:15 - Stopping process 8108 2020-06-10 22:56:15 - Send SIGINT 8108 2020-06-10 22:56:15 - SIGINT to 8108 failed - Killing as fallback 2020-06-10 22:56:15 - Stopping process 9228 2020-06-10 22:56:15 - Send SIGINT 9228 2020-06-10 22:56:15 - SIGINT to 9228 failed - Killing as fallback 2020-06-10 22:56:15 - Finished globalapi.exe 2020-06-10 22:56:17 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:56:17 - Started 3500 2020-06-10 22:56:54 - Stopping globalapi.exe 2020-06-10 22:56:54 - ProcessKill 3500 2020-06-10 22:56:54 - Found child process: 1864 Name: conhost.exe 2020-06-10 22:56:54 - Found child process: 11544 Name: node.exe 2020-06-10 22:56:54 - Stopping process 1864 2020-06-10 22:56:54 - Send SIGINT 1864 2020-06-10 22:56:54 - SIGINT to 1864 failed - Killing as fallback 2020-06-10 22:56:54 - Stopping process 11544 2020-06-10 22:56:54 - Send SIGINT 11544 2020-06-10 22:56:54 - SIGINT to 11544 failed - Killing as fallback 2020-06-10 22:56:54 - Stopping process 3500 2020-06-10 22:56:54 - Send SIGINT 3500 2020-06-10 22:56:54 - SIGINT to 3500 failed - Killing as fallback 2020-06-10 22:56:54 - Finished globalapi.exe 2020-06-10 22:56:58 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:56:58 - Started 7348 2020-06-10 22:57:59 - Stopping globalapi.exe 2020-06-10 22:57:59 - ProcessKill 7348 2020-06-10 22:57:59 - Found child process: 4372 Name: conhost.exe 2020-06-10 22:57:59 - Found child process: 6488 Name: node.exe 2020-06-10 22:57:59 - Stopping process 4372 2020-06-10 22:57:59 - Send SIGINT 4372 2020-06-10 22:57:59 - SIGINT to 4372 failed - Killing as fallback 2020-06-10 22:57:59 - Stopping process 6488 2020-06-10 22:57:59 - Send SIGINT 6488 2020-06-10 22:57:59 - SIGINT to 6488 failed - Killing as fallback 2020-06-10 22:57:59 - Stopping process 7348 2020-06-10 22:57:59 - Send SIGINT 7348 2020-06-10 22:57:59 - SIGINT to 7348 failed - Killing as fallback 2020-06-10 22:57:59 - Finished globalapi.exe 2020-06-10 22:58:00 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:58:00 - Started 13172 2020-06-10 22:58:48 - Stopping globalapi.exe 2020-06-10 22:58:48 - ProcessKill 13172 2020-06-10 22:58:49 - Found child process: 8660 Name: conhost.exe 2020-06-10 22:58:49 - Found child process: 5700 Name: node.exe 2020-06-10 22:58:49 - Stopping process 8660 2020-06-10 22:58:49 - Send SIGINT 8660 2020-06-10 22:58:49 - SIGINT to 8660 failed - Killing as fallback 2020-06-10 22:58:49 - Stopping process 5700 2020-06-10 22:58:49 - Send SIGINT 5700 2020-06-10 22:58:49 - SIGINT to 5700 failed - Killing as fallback 2020-06-10 22:58:49 - Stopping process 13172 2020-06-10 22:58:49 - Send SIGINT 13172 2020-06-10 22:58:49 - SIGINT to 13172 failed - Killing as fallback 2020-06-10 22:58:49 - Finished globalapi.exe 2020-06-10 22:58:50 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:58:50 - Started 12064 2020-06-10 22:59:28 - Stopping globalapi.exe 2020-06-10 22:59:28 - ProcessKill 12064 2020-06-10 22:59:28 - Found child process: 11920 Name: conhost.exe 2020-06-10 22:59:28 - Found child process: 12104 Name: node.exe 2020-06-10 22:59:28 - Stopping process 11920 2020-06-10 22:59:28 - Send SIGINT 11920 2020-06-10 22:59:28 - SIGINT to 11920 failed - Killing as fallback 2020-06-10 22:59:28 - Stopping process 12104 2020-06-10 22:59:28 - Send SIGINT 12104 2020-06-10 22:59:28 - SIGINT to 12104 failed - Killing as fallback 2020-06-10 22:59:28 - Stopping process 12064 2020-06-10 22:59:28 - Send SIGINT 12064 2020-06-10 22:59:28 - SIGINT to 12064 failed - Killing as fallback 2020-06-10 22:59:28 - Finished globalapi.exe 2020-06-10 22:59:29 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 22:59:29 - Started 4036 2020-06-10 23:00:35 - Stopping globalapi.exe 2020-06-10 23:00:35 - ProcessKill 4036 2020-06-10 23:00:36 - Found child process: 12668 Name: conhost.exe 2020-06-10 23:00:36 - Found child process: 11924 Name: node.exe 2020-06-10 23:00:36 - Stopping process 12668 2020-06-10 23:00:36 - Send SIGINT 12668 2020-06-10 23:00:36 - SIGINT to 12668 failed - Killing as fallback 2020-06-10 23:00:36 - Stopping process 11924 2020-06-10 23:00:36 - Send SIGINT 11924 2020-06-10 23:00:36 - SIGINT to 11924 failed - Killing as fallback 2020-06-10 23:00:36 - Stopping process 4036 2020-06-10 23:00:36 - Send SIGINT 4036 2020-06-10 23:00:36 - SIGINT to 4036 failed - Killing as fallback 2020-06-10 23:00:36 - Finished globalapi.exe 2020-06-10 23:00:37 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 23:00:37 - Started 1460 2020-06-10 23:00:59 - Stopping globalapi.exe 2020-06-10 23:00:59 - ProcessKill 1460 2020-06-10 23:00:59 - Found child process: 7040 Name: conhost.exe 2020-06-10 23:00:59 - Found child process: 10340 Name: node.exe 2020-06-10 23:00:59 - Stopping process 7040 2020-06-10 23:00:59 - Send SIGINT 7040 2020-06-10 23:00:59 - SIGINT to 7040 failed - Killing as fallback 2020-06-10 23:00:59 - Stopping process 10340 2020-06-10 23:00:59 - Send SIGINT 10340 2020-06-10 23:00:59 - SIGINT to 10340 failed - Killing as fallback 2020-06-10 23:00:59 - Stopping process 1460 2020-06-10 23:00:59 - Send SIGINT 1460 2020-06-10 23:00:59 - SIGINT to 1460 failed - Killing as fallback 2020-06-10 23:00:59 - Finished globalapi.exe 2020-06-10 23:01:00 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-10 23:01:00 - Started 10328 2020-06-16 12:21:15 - Stopping globalapi.exe 2020-06-16 12:21:15 - ProcessKill 10328 2020-06-16 12:21:16 - Found child process: 5556 Name: conhost.exe 2020-06-16 12:21:16 - Found child process: 6192 Name: node.exe 2020-06-16 12:21:16 - Stopping process 5556 2020-06-16 12:21:16 - Send SIGINT 5556 2020-06-16 12:21:16 - SIGINT to 5556 failed - Killing as fallback 2020-06-16 12:21:17 - Stopping process 6192 2020-06-16 12:21:17 - Send SIGINT 6192 2020-06-16 12:21:17 - SIGINT to 6192 failed - Killing as fallback 2020-06-16 12:21:17 - Stopping process 10328 2020-06-16 12:21:17 - Send SIGINT 10328 2020-06-16 12:21:17 - SIGINT to 10328 failed - Killing as fallback 2020-06-16 12:21:17 - Finished globalapi.exe 2020-06-16 12:21:18 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-16 12:21:18 - Started 3968 2020-06-24 22:25:54 - Stopping globalapi.exe 2020-06-24 22:25:54 - ProcessKill 3968 2020-06-24 22:25:55 - Found child process: 9860 Name: conhost.exe 2020-06-24 22:25:55 - Found child process: 10728 Name: node.exe 2020-06-24 22:25:55 - Stopping process 9860 2020-06-24 22:25:55 - Send SIGINT 9860 2020-06-24 22:25:55 - SIGINT to 9860 failed - Killing as fallback 2020-06-24 22:25:55 - Stopping process 10728 2020-06-24 22:25:55 - Send SIGINT 10728 2020-06-24 22:25:55 - SIGINT to 10728 failed - Killing as fallback 2020-06-24 22:25:55 - Stopping process 3968 2020-06-24 22:25:55 - Send SIGINT 3968 2020-06-24 22:25:55 - SIGINT to 3968 failed - Killing as fallback 2020-06-24 22:25:55 - Finished globalapi.exe 2020-06-24 22:25:56 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-24 22:25:56 - Started 9672 2020-06-25 18:47:38 - Stopping globalapi.exe 2020-06-25 18:47:38 - ProcessKill 9672 2020-06-25 18:47:38 - Found child process: 12536 Name: conhost.exe 2020-06-25 18:47:38 - Found child process: 6760 Name: node.exe 2020-06-25 18:47:39 - Stopping process 12536 2020-06-25 18:47:39 - Send SIGINT 12536 2020-06-25 18:47:39 - SIGINT to 12536 failed - Killing as fallback 2020-06-25 18:47:39 - Stopping process 6760 2020-06-25 18:47:39 - Send SIGINT 6760 2020-06-25 18:47:39 - SIGINT to 6760 failed - Killing as fallback 2020-06-25 18:47:39 - Stopping process 9672 2020-06-25 18:47:39 - Send SIGINT 9672 2020-06-25 18:47:39 - SIGINT to 9672 failed - Killing as fallback 2020-06-25 18:47:39 - Finished globalapi.exe 2020-06-25 18:47:45 - Starting C:\Program Files\nodejs\node.exe --harmony C:\GlobalAPI\dist\node_modules\node-windows\lib\wrapper.js --file C:\GlobalAPI\dist\src\server.js --scriptoptions= --log "GlobalAPI wrapper" --grow 0.25 --wait 1 --maxrestarts 3 --abortonerror n --stopparentfirst undefined 2020-06-25 18:47:45 - Started 9040

coreybutler commented 4 years ago

Have you seen this? https://github.com/coreybutler/node-windows/wiki#my-script-installs-but-stops-after-a-few-seconds-why

These types of issues are almost always caused by something within the script (i.e. your server.js file), because there is nothing in node-windows that will stop the process. Behavior like this usually happens when your script exits for any reason (including uncaught errors, permissions, etc).

dhamodharaanbm commented 4 years ago

Issue is not related with node-windows, solved by fixing a runtime error