cloudflare / cloudflare/cloudflared
🐛Service install stuck in half installed state due to EventLogger. Unable to either install or uninstall cloudflared service.
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**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
```
4. Note cloudflared service does not show in the list of installed services and is unable to be started/stopped.
5. Note that the `SYSTEM\CurrentControlSet\Services\EventLog\Application\Cloudflared` registry key does in fact exist.
6. 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
```
7. 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
Contributor guide
Assessment
This issue has not been assessed yet.