When the agent crashes or is forcefully shutdown in cannot restart due to:
agent aborted (listen unix /root/.zrok2/agent.socket: bind: address already in use)
The agent prints out:
{"time":"2026-04-10T07:00:19.294510047Z","level":"INFO","source":{"function":"``github.com/openziti/zrok/v2/agent.(*Agent).Run","file":"/__w/zrok/zrok/agent/agent.go","line":59},"msg":"started``"}
In the agent systemd-service this is solved by:
ExecStartPre=/usr/bin/env rm --force %h/.zrok2/agent.socket
but I think this should be done in the agent itself.
Best regards,
David