Reputation: 139
I'm trying to install selenium-server-standalone-3.141.59.jar as an nssm service. It installs fine but when I try to run it, I get an error.
I installed via: PS C:\Users\MyUser> nssm install selenium-server java -jar "C:\selenium\selenium-server-standalone-3.141.59.jar
Then running nssm start selenium-server
gives me OpenService(): Access is denied.
I tried to follow this but linking to the batch file didn't work either: NSSM: Can't edit a service I created
Upvotes: 2
Views: 14051
Reputation: 3
Struggled with the same issue. Fixed it!
The reason was, that the nssm executable also has to be accessible by the given service user, which was not the case in my setting.
Resolution:
Upvotes: 0
Reputation: 6170
I was facing same issue, I did following steps:
1)Check the current status of service using nssm status service_name
2)Close command prompt
3)Run command prompt in Administrator mode
4)Execute nssm start service_name
Upvotes: 0
Reputation: 139
The problem seems to have fixed itself, I restarted my computer and it seems to be running! Previously, it didn't let me run it on demand so anyone having this problem can just try a restart.
UPDATE: I believe it's because I did not launch Powershell in admin mode on Windows 10, try that if you have problems.
Upvotes: 2