🐛Service install stuck in half installed state due to EventLogger. Unable to either install or uninstall cloudflared service.
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:
- Download windows installer and run installer (tried both 64 and 32 bit installers) and cloudflared.exe is successfully installed.
- 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
-
Note cloudflared service does not show in the list of installed services and is unable to be started/stopped.
-
Note that the
SYSTEM\CurrentControlSet\Services\EventLog\Application\Cloudflaredregistry key does in fact exist. -
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
- Note that uninstall does not remove the
SYSTEM\CurrentControlSet\Services\EventLog\Application\Cloudflaredregistry key.
Expected behavior
- When installing new service, the event logger registry key could be reset if a service is not installed.
- 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
This has not been addressed? I'm seeing the same thing on Windows 11.