cloudflared icon indicating copy to clipboard operation
cloudflared copied to clipboard

🐛Service install stuck in half installed state due to EventLogger. Unable to either install or uninstall cloudflared service.

Open mikeball opened this issue 6 months ago • 1 comments

Describe the bug Our tunnels stopped working (for unknown reasons this weekend) and attempted update. Some issue occurred attempting to update and now repeated uninstall/install attempts fail. We now have a service in a halfway installed state and tunnel is offline.

To Reproduce Steps to reproduce the behavior:

  1. Download windows installer and run installer (tried both 64 and 32 bit installers) and cloudflared.exe is successfully installed.
  2. Attempt service install as admin with this commands
C:\>cloudflared.exe service install eyJ***redacted***
2025-06-30T16:49:40Z INF Installing cloudflared Windows service
2025-06-30T16:49:40Z INF cloudflared agent service is installed windowsServiceName=Cloudflared
Cannot install event logger: SYSTEM\CurrentControlSet\Services\EventLog\Application\Cloudflared registry key already exists
  1. Note cloudflared service does not show in the list of installed services and is unable to be started/stopped.

  2. Note that the SYSTEM\CurrentControlSet\Services\EventLog\Application\Cloudflared registry key does in fact exist.

  3. Attempt to uninstall service with this command

C:\>cloudflared service uninstall
2025-06-30T16:49:21Z INF Uninstalling cloudflared agent service windowsServiceName=Cloudflared
agent service Cloudflared is not installed, so it could not be uninstalled
  1. Note that uninstall does not remove the SYSTEM\CurrentControlSet\Services\EventLog\Application\Cloudflared registry key.

Expected behavior

  1. When installing new service, the event logger registry key could be reset if a service is not installed.
  2. When running uninstall and "agent service Cloudflared is not installed", the registry key for event logger should be removed.

Environment and versions

  • OS: Windows Server 2016
  • Architecture: AMD

mikeball avatar Jun 30 '25 17:06 mikeball

This has not been addressed? I'm seeing the same thing on Windows 11.

benfishbus avatar Nov 25 '25 13:11 benfishbus