Hi zrok team,
I’m reporting a recurring problem with named public shares after restarting the zrok2 agent. The agent starts, but a public share can remain in retrying because the previous share still holds its reserved name on the controller. Every retry then fails with 409 shareConflict, and the public URL stays unavailable.
Here is a step-by-step example of the failure:
- Start a local HTTP service at
http://127.0.0.1:8080. - Reserve a name:
zrok2 create name restart-repro. - Start
zrok2 agent startunder a process supervisor. - Register the share:
zrok2 share public http://127.0.0.1:8080 --name-selection public:restart-repro --open --headless --force-agent. - Confirm that the URL works and
zrok2 agent statusshows the share as active. - Restart the agent. The failure occurs when shutdown does not finish cleanly, including a supervisor timeout or an abrupt host shutdown.
- After the agent starts again,
zrok2 agent statusshows the share asretrying, whilezrok2 list sharesstill shows the previous share holding the name. The agent repeatedly receives:409 shareConflict: name 'restart-repro' in namespace 'public' is already in use by another share.
Expected: The agent restores the public URL automatically, either by reattaching to the existing share or safely reconciling the stale controller record.
Actual: Retries cannot resolve the conflict. Recovery requires manually deleting the previous share and letting the agent create another one. Deleting and recreating every public share after an agent restart is unacceptable for endpoints that are expected to remain available.
My current setup is macOS, zrok2 v2.0.8, with the agent managed by PM2. I have experienced this 409 during restarts, but have not intentionally repeated the restart on the current build because it would interrupt active public shares. The behavior also matches GitHub issue #1259 and this Discourse report.
Is reliable reattachment of named public shares supported today? If not, is there a fix planned? Please also provide a supported recovery procedure that does not require deleting every share in the account on each startup.