Running a service using NSSM (Windows)

The easiest way to install services written in Python on a Windows machine is to use Non-Sucking Service Manager (NSSM). NSSM provides a simple way to wrap a specific executable (the main python.exe file, in this case), along with arguments (the testdaemon.py script), and make them available as a Windows service. Starting NSSM with nssm install provides a window with all of the fields needed for basic service setup, as follows:

Once the Install service button is clicked, the service is available in the Windows Services manager, where its Startup Type can be altered, if needed, along with all of the other standard Windows service settings and properties:

Changes can also be made to the NSSM-created properties of the service, by running nssm install <service-name>, which presents the same UI that was used to create the service entry.

If an NSSM-packaged service fails to start, it will log useful information to the standard Windows Event Log; debugging startup problems should start there. Odds are good that if there are any issues, they will be permissions-related, such as the service's account not having access to the script file, a configuration file, and so on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.15.160.43