Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
So I need to run a custom server. It worked on other machines, but not on mine (all of them are on Windows).
My input:
nssm start custom-server
Error message:
custom-server: Unexpected status SERVICE_PAUSED in response to START control.
I tried to re-start it, but got the same message.
–
Use the following instructions to change I/O redirects:
nssm set [SERVICE_NAME] AppStdout [APP_PATH_INSTALL]\logs\service.log
nssm set [SERVICE_NAME] AppStderr [APP_PATH_INSTALL]\logs\service-error.log
Check the service log files to find the failure.
In my case, the failure was caused by a dependency on Python libraries.
–
–
As Garric15 states it is probably your install command.
This could be for example a StdOut redirect to a path / file that does not exist on your local machine.
Look in the Application event log for errors where the source is nssm around the time you installed the service.
–
–
–
It's probably a bad syntax/entry somewhere along your code, could be an issue with the path or arguments, I'd test the service manually a bunch before putting on NSSM, make sure you have the correct flags/options
You can also set Standard Output through NSSM and that would give you a clue of what's going on.
If there's anything that'd interrupt the dependencies for that service to run, you'd also get that error.
This is how I install a service using NSSM with Powershell (make sure nssm is added to the PATH):
nssm.exe install "SERVICE NAME" "PATH TO FILE"
nssm.exe set "SERVICE NAME" AppParameters "<CHECK YOUR FILE OPTIONS>"
nssm.exe set "SERVICE NAME" AppStderr "PATH TO SAVE OUTPUT"
nssm.exe start "SERVICE NAME"
If you or anyone happens to see this post and need assistance, I can probably help you, just post more details on what needs to be done and what you're EXACTLY trying to do.
In my case, the problem was that after the service was installed using nssm.exe, the program name was changed. This caused service to always go to paused state after start or restart the service, using either services.msc or nssm.exe command line.
Editing service nssm.exe startup parameters solved the problem for me.
App directory not provided or doesn't exist
nssm nssm set xyz-service AppDirectory "D:\Work\ShoppingKart"
File which is given for service may be corrupted (rebuild code)
The application trying to run is not proper or corrupted. Try to run without windows service once.
Program (.exe) file path not found (in this case look for the solution, or else give full path, if java not found even if it is there in env, just add full path)
I solved it by using no mws
(Managed Windows Service?) release,
gogs_0.12.10_windows_amd64
works
gogs_0.12.10_windows_amd64_mws
not working
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.