-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace nssm.exe and install the Windows service differently #1303
Comments
I spent a bit of time today looking at this and considering http:https://erlang.org/doc/man/erlsrv.html as an alternative. The problem is that Specifically, users can modify that file (or write their own) to change environment variables for the JS/CoffeeScript query servers and the Fauxton docroot, plus of course change the config file search path/chain. Also, Here's a better option: https://github.com/oze4/New-PSService |
Unfortunately that last link depends on https://github.com/DSorlov/Sorlov.PowerShell which is GPL v3. :( |
An alternative: https://github.com/kohsuke/winsw This requires the .NET Framework as a dependency, though, which would balloon our installer. It also doesn't natively support overriding of parameters. I think writing a custom C# wrapper like https://docs.microsoft.com/en-us/archive/msdn-magazine/2016/may/windows-powershell-writing-windows-services-in-powershell would be best. Full example code is here: https://github.com/JFLarvoire/SysToolsLib/blob/master/PowerShell/PSService.ps1 Apache License v2 |
@wohali Hey, I found this ticket by chance on Google and just wanted to suggest a project of mine that could hopefully be useful to you: https://github.com/mtkennerly/shawl . It should have enough customization to cover what you mentioned above, but let me know if you see any gaps. Plus it's MIT and designed to be bundleable with other apps. I have McAfee on my work laptop, so I double checked and it doesn't complain about the exe, and VirusTotal is happy with it too (32-bit scan, 64-bit scan). |
Thanks, @mtkennerly . I'd really, REALLY rather not add yet another runtime environment to our build chain, and we build all of our dependencies from scratch (including Rust), but I'll keep this in mind. Thanks. |
The right path forward here is probably using We need to move the goop living currently in |
Carbon Black flags the nssm.exe software as well. Is there an ETA to get this taken care of? |
@nicpenning Pull requests welcome. |
How do you start nssm.exe manually? It got blocked by Carbon Black when I installed CouchDB. I have since got our IT department to whitelist nssm.exe, but now I don't know what to do. |
The installer does something like
to install the service. Like
You can also start CouchDB manually with the provided cmd-file. |
Issue #1302 (and others in the past) highlight that nssm, an application we use to run
couchdb.cmd
as the service launcher for CouchDB, is sometimes detected as risky software by 3rd party virus detectors. This is because Microsoft Windows doesn't allow registration of batch/command/shell script files as services - only .exes.We can work around this by writing a standalone exe that replaces
couchdb.cmd
. This can be installed as the service instead.Alternative solutions may also be possible.
The text was updated successfully, but these errors were encountered: