question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't start service - WMI Operation failure: AccessDenied

See original GitHub issue

Hello! Having problems with actual version on Windows 2012 R2. Successfully installed service for nginx.exe with default minimal config. Starts with SYSTEM account.

If I start service (under administrator rights) with “net start” I got: System error 5 has occurred. Access is denied.

If I start service with “WinSW.NET4.exe start” I got: 2017-04-21 11:35:01,236 INFO - Starting ServiceWrapper in the CLI mode 2017-04-21 11:35:01,518 FATAL - WMI Operation failure: AccessDenied WMI.WmiException: AccessDenied at WMI.WmiRoot.BaseHandler.CheckError(ManagementBaseObject result) at WMI.WmiRoot.InstanceHandler.Invoke(Object proxy, MethodInfo method, Object[] args) at winsw.WrapperService.Run(String[] _args, ServiceDescriptor descriptor) at winsw.WrapperService.Main(String[] args) Thanks, sukinsky

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
mariafleetwoodcommented, Nov 28, 2018

I have Windows server 2016 and had the same problem with permissions(even I have admin rights on this server). I solving it by similar instructions

  • Create node with Remote root directory: C:\agents\agent_xx
  • Lunch node via web
  • Attempt to install as service via web (this part is failing but it generate jenkins-slave.exe in C:\agents\agent_xx\ folder)
  • Open command prompt as admin
  • sc.exe create Jenkins_agent_xx binPath= "C:\agents\agent_xx\jenkins-slave.exe"
  • Close windows where you lunch node, to take node offline
  • Go to services and change the properties (I would recommend change loging details to the same user as run jenkins and run services automatically)
  • Start service and enjoy 😃
7reactions
Ishan1987commented, Feb 20, 2018

HI @sukinsky ,

I had the similar issue that i fixed with below 2 steps:

  1. Added user in to admin group
  2. goto your downloaded jenkins-slave.exe Application file. goto properties -> compatibility -.> check run as administrator Then i retried installing jenkins as service resolved the issue. Make sure to click ok on prompt where service will be run as admin.
Read more comments on GitHub >

github_iconTop Results From Across the Web

WMI Troubleshooting - Win32 apps
When accessing WMI local or remote data in an application or script, you may encounter errors ranging from missing classes to access denied....
Read more >
How to restart Jenkins on Windows?
I get error "Jenkins cannot restart itself as currently configured." I still see command prompt is running. enter image description here. In ...
Read more >
Unable to restart Jenkins via URL - Ask a question
Hi, I am unable to restart Jenkins via the URL using ... 2022-10-18 13:17:33,708 FATAL - WMI Operation failure: AccessDenied. WMI.
Read more >
"Authentication Failed or Access denied" message is ...
"Authentication Failed or Access denied" message is shown, when trying to add the Server Monitor through WMI mode. · In case you encounter...
Read more >
How should I initialize a new local account for a Windows ...
I'm trying to figure out how I can create a user and their profile without having to manually log into that user so...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found