nssm | Non-Sucking Service Manager | HTTP library

 by   kirillkovalenko C++ Version: v2.23 License: No License

kandi X-RAY | nssm Summary

kandi X-RAY | nssm Summary

nssm is a C++ library typically used in Networking, HTTP applications. nssm has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

NSSM: The Non-Sucking Service Manager Version 2.24, 2014-08-31. NSSM is a service helper program similar to srvany and cygrunsrv. It can start any application as an NT service and will restart the service if it fails for any reason. NSSM also has a graphical service installer and remover. Full documentation can be found online at. Since version 2.0, the GUI can be bypassed by entering all appropriate options on the command line. Since version 2.1, NSSM can be compiled for x64 platforms. Thanks Benjamin Mayrargue. Since version 2.2, NSSM can be configured to take different actions based on the exit code of the managed application. Since version 2.3, NSSM logs to the Windows event log more elegantly. Since version 2.5, NSSM respects environment variables in its parameters. Since version 2.8, NSSM tries harder to shut down the managed application gracefully and throttles restart attempts if the application doesn't run for a minimum amount of time. Since version 2.11, NSSM respects srvany's AppEnvironment parameter. Since version 2.13, NSSM is translated into French. Thanks François-Régis Tardy. Since version 2.15, NSSM is translated into Italian. Thanks Riccardo Gusmeroli. Since version 2.17, NSSM can try to shut down console applications by simulating a Control-C keypress. If they have installed a handler routine they can clean up and shut down gracefully on receipt of the event. Since version 2.17, NSSM can redirect the managed application's I/O streams to an arbitrary path. Since version 2.18, NSSM can be configured to wait a user-specified amount of time for the application to exit when shutting down. Since version 2.19, many more service options can be configured with the GUI installer as well as via the registry. Since version 2.19, NSSM can add to the service's environment by setting AppEnvironmentExtra in place of or in addition to the srvany-compatible AppEnvironment. Since version 2.22, NSSM can set the managed application's process priority and CPU affinity. Since version 2.22, NSSM can apply an unconditional delay before restarting an application which has exited. Since version 2.22, NSSM can rotate existing output files when redirecting I/O. Since version 2.22, NSSM can set service display name, description, startup type, log on details and dependencies. Since version 2.22, NSSM can manage existing services. Since version 2.25, NSSM can execute commands in response to service events. Since version 2.25, NSSM can list services it manages. Since version 2.25, NSSM can dump the configuration of services it manages. Since version 2.25, NSSM can show the processes managed by a service.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              nssm has a low active ecosystem.
              It has 572 star(s) with 113 fork(s). There are 18 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 1 open issues and 27 have been closed. On average issues are closed in 158 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of nssm is v2.23

            kandi-Quality Quality

              nssm has 0 bugs and 0 code smells.

            kandi-Security Security

              nssm has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              nssm code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              nssm does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              nssm releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nssm
            Get all kandi verified functions for this library.

            nssm Key Features

            No Key Features are available at this moment for nssm.

            nssm Examples and Code Snippets

            Validates XSD .
            javadot img1Lines of Code : 9dot img1License : Permissive (MIT License)
            copy iconCopy
            public boolean isValid() throws IOException, SAXException {
                    Validator validator = initValidator(xsdPath);
                    try {
                        validator.validate(new StreamSource(getFile(xmlPath)));
                        return true;
                    } catch (SAXException  

            Community Discussions

            QUESTION

            How to hide terminal shell on server application like Warp in Windows?
            Asked 2022-Mar-27 at 06:03

            I have a small warp server project on Windows that listen to a particular port and do something whenever I send a command to it by REST (for example: POST http://10.10.10.1:5000/print). It's a small client for printing PDF / receipt directly from another computer.

            It works. But my problem is when I had to package the whole project, the Rust compiler give me an executable file (.exe). The application displays a terminal window when I run it. I want this terminal to be hidden somehow.

            I try to run the program as a windows service (by using NSSM). It doesn't work for me since I had to access the printer. Windows doesn't allow my app to access any devices or any other executable as a windows service. (The reasons are explained here: How can I run an EXE program from a Windows Service using C#?)

            So I plan to run my app as a tray-icon application so user can control or close the app. (https://github.com/olback/tray-item-rs) Unfortunately, I still cannot hide the app's terminal window.

            Another solution that I found is hstart (https://www.ntwind.com/software/hstart.html). But I would like to use this as "the last resort" solution since many antivirus/windows defender mark it as a malware.

            Do anyone know how to hide or get rid of it ?

            ...

            ANSWER

            Answered 2022-Mar-25 at 00:46

            Start program in background.

            Source https://stackoverflow.com/questions/71610964

            QUESTION

            failed to create release artifact directory because it is being used by another process Azure-Devops
            Asked 2022-Mar-16 at 02:56

            I have faced this error when I get a release. I am not able to figure it out why this is happening.

            I have a service which run websocket api. When I stop the service, release is successfull.

            The interesting thing is.
            project location: C:\Projects\Platform360.RTLS.MapDisplay.WebSocket
            agent location: C:\vstsagent\A4_work\r41\a

            service
            C:\Projects\nssm-2.24-101-g897c7ad\nssm-2.24-101-g897c7ad\win64\nssm.exe

            bat script:

            ...

            ANSWER

            Answered 2022-Mar-16 at 02:56

            The error occurs when the Release directory is opened in Windows explorer or any other folders and during deployment, AzureDevOps agent tries to delete the Release artifact directory and recreate it. Since the artifact directory is already open under some user’s account, it wont get deleted.

            My conclusion is that somehow the agent process got hung with the artifact Windows folder. You can see that with programs like https://lockhunter.com/.

            Solution 1 : Restart the machine, so all the users will be logged out and the folder won’t be opened in any users account

            Solution 2: Logout the users you suspect who might have opened this folder.

            Source https://stackoverflow.com/questions/71435231

            QUESTION

            how to run a program on start up as an administrator using NSIS and NSSM?
            Asked 2021-Dec-06 at 19:47

            I am using nsis to create installer for windows and I am using NSSM to run the application.

            everything is fine when I install my server , but the problem my server needs to run as admin in order to use some functionalities. I solved my problem by manually going to "services" then Logon tab to enter my username and password.

            However , I do not want to do that, I want the installer to ask the user to enter his admin credentials right after installing or before installing.

            thanks in advance for your time and efforts

            ...

            ANSWER

            Answered 2021-Dec-06 at 15:50

            According to their documentation, NSSM already knows how to set service credentials so all you need is the custom page to tie it all together:

            Source https://stackoverflow.com/questions/70247547

            QUESTION

            npm http-server as a Windows Service
            Asked 2021-Sep-24 at 09:11

            I am using http-server to host one of my local folders:

            ...

            ANSWER

            Answered 2021-Sep-24 at 09:11

            I tried it by taking the following steps:

            1. Creating a batch file(script.bat) in the directory with the command:

              http-server .

            2. Adding npm bin directory to environment variable for the binaries to be available from the command prompt.

            3. Starting nssm.exe with the following command:

              nssm.ext install service_name

            4. In the Path, providing the path to the batch file created in step 1.

            5. In the I/O section, providing the paths to stdin, stdout and stderr to check on the output.

            6. Click Install service.

            7. Start the service.

            Source https://stackoverflow.com/questions/69250028

            QUESTION

            How does PowerShell display the output string resulting from invoking an external terminal application (nssm.exe)
            Asked 2021-Jul-02 at 07:27

            In PowerShell (5.1):

            Calling an external command (in this case nssm.exe get logstash-service Application) the output is displayed in PowerShell as I would have expected (ASCII-string "M:\logstash-7.1.1\bin\logstash.bat"):

            ...

            ANSWER

            Answered 2021-Jun-30 at 19:14

            Yes, the problem is one of character encoding, and the problem often only surfaces when an external program's output is either captured in a variable, sent through the pipeline, or redirected to a file.

            Only in these cases does PowerShell get involved and decodes the output into .NET strings before any further processing.

            This decoding happens based on the encoding stored in the [Console]::OutputEncoding property, so for affected programs you'll have to set this property to match the actual character encoding used by external program at hand.

            Your symptom implies that nssm.exe outputs UTF-16LE-encoded ("Unicode") strings[1], so to capture them properly you'll have to do something like the following:

            Source https://stackoverflow.com/questions/68199739

            QUESTION

            desktop notifications in service
            Asked 2021-Apr-26 at 13:07

            I wrote a python program that get messages from server and invokes windows notification.

            I turned the program into a one file executable using pyinstaller, the program works perfect when running as an app.

            when I turned it into a service on windows 10 using nssm.exe, the service still works well(listen & response to the server) but the notifications do not displayed.

            I tried to

            • allow service interact with desktop under the service properties > log on.
            • change the registry HKEY_LOCAL_MACHINE>SYSTEM>CurrentControlSet>Control>Windows>NoInteractiveService = 0(False)

            Is there anything else I can try to solve this problem?

            Edit - the program works great (communication & notification) as a script(.py), and as an executable(.exe), the problem is that the notification do not displayed when the executable is running as a service using nssm.

            ...

            ANSWER

            Answered 2021-Apr-26 at 09:48

            Try using the python module win10toast or wintoast

            Links: -

            Here's a related video

            Hope it solves your problem!

            Source https://stackoverflow.com/questions/67264169

            QUESTION

            "No input file specified" for some versions of PHP
            Asked 2021-Feb-24 at 17:22

            I have multiple versions of PHP installed as per this guide, that I wrote. Basically, it is an ApacheLounge installation talking to PHP via FastCGI on Windows 10. This used to let me run these PHP versions at the same time on different VirtualHosts. Apache calls the proper PHP version via FastCGI on these ports:

            • PHP 5.2.17 on port 9052
            • PHP 5.3.29 on port 9053
            • PHP 5.4.45 on port 9054
            • PHP 5.5.38 on port 9055
            • PHP 5.6.40 on port 9056
            • PHP 7.0.33 on port 9070
            • PHP 7.1.33 on port 9071
            • PHP 7.2.31 on port 9072
            • PHP 7.3.19 on port 9073
            • PHP 7.4.7 on port 9074

            Everything Some of these had been working for a while after the installation. Yesterday I had to test a website on PHP 5.6, but the ouput was just a "No input file specified message" which, turns out, is not that much descriptive, as a quick google search confirmed.

            So I started a systematic approach. I created a VirtualHost for every PHP version, with just a index.php file with an echo statement. I tested all PHP versions installed, and all PHP5 versions did not work, while PHP7 versions worked as usual.

            I removed all custom configuration files. No change.

            I served a simple index.html file, and that works on all VirtualHosts. About PHP, no change.

            I thought it was PHP 5.x bug, but after I rebooted my PC, the PHP 5.2 version started working. I stopped, removed and reinstalled some of the Windows Services create via NSSM, with no change.

            This is what I think I know:

            • it is not a PHP 5.x issue, because PHP 5.2 works;
            • it is not a FastCGI problem, because all VirtualHosts have the same configuration, except for the port number;
            • it is not an Apache configuration problem, because it starts and stops and reboots and serves;
            • it is not a PHP configuration problem, beacuse all configuration is standard;
            • it is not a .htaccess configuration problem, because there are no .htaccess files;

            Any idea about how to debug this configuration, or about what is going wrong is appreciated.

            Thank you.

            ...

            ANSWER

            Answered 2021-Feb-24 at 17:22

            This answer is about what I discovered above the issue, and how it is working for me.

            On this post and elsewhere on the net I found the advice to leave the doc_root in php.ini commented out:

            Source https://stackoverflow.com/questions/66140241

            QUESTION

            FastAPI as a Windows service
            Asked 2021-Jan-29 at 14:19

            I am trying to run FastAPI as a windows service.Couldn't find any documentation or any article to run Uvicorn as a Window's service. I tried using NSSM as well but my windows service stops.

            ...

            ANSWER

            Answered 2021-Jan-29 at 14:19

            I managed to run FastAPI with uvicorn as a Windows Service using NSSM.

            I had to deploy uvicorn programatically, basically run uvicorn directly from your Python script, then create and install a custom service with NSSM.

            Here's a small example based on FastAPI's example, but instead of running it with uvicorn main:app --reload from the command line, you add uvicorn.run(app, **config) with your own config.

            Source https://stackoverflow.com/questions/65591630

            QUESTION

            server fail while running as windows service
            Asked 2020-May-03 at 00:07

            I have a jboss EAP7.1 server that connect to windows sql server management studio 18 with windows authentification and start correctly . But when i've added the jboss server as a windows service with nssm https://nssm.cc/ so that the server restart automatically when the vm/computer restart . it fail when the computer restart .

            ...

            ANSWER

            Answered 2020-May-03 at 00:07

            i have changed the authentification in the standalone.xml from wivdows authentification to a user/passwd authentification and it's solved

            Source https://stackoverflow.com/questions/61526684

            QUESTION

            Install metabase using nssm and Inno Setup script
            Asked 2020-Jan-19 at 07:56

            I want to open an administrative CMD window using Inno Setup and want to install:

            ...

            ANSWER

            Answered 2020-Jan-17 at 12:33

            You are effectively executing:

            Source https://stackoverflow.com/questions/59683991

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install nssm

            To install a service, run. You will be prompted to enter the full path to the application you wish to run and any command line options to pass to that application. Use the system service manager (services.msc) to control advanced service properties such as startup method and desktop interaction. NSSM may support these options at a later time...
            To install a service, run. NSSM will then attempt to install a service which runs the named application with the given options (if you specified any).

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/kirillkovalenko/nssm.git

          • CLI

            gh repo clone kirillkovalenko/nssm

          • sshUrl

            git@github.com:kirillkovalenko/nssm.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link