Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustica-agent-cli doens't clean-up its socket on exit, if fixed, and fails on next start #55

Open
andrevmatos opened this issue Nov 6, 2024 · 1 comment

Comments

@andrevmatos
Copy link
Contributor

When specifying a constant socket path to rustica-agent-cli, either through socket = in environment file or --socket service option, it creates on first start, but doesn't rm on exit/termination, and next start fails with:

thread 'main' panicked at /build/source/rustica-agent/src/sshagent/agent.rs:38:56:
called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Workaround for now is to rm the socket explicitly before starting the service again.

@andrevmatos
Copy link
Contributor Author

Just as a side-note: it'd be nice if, instead of e.g. simply removing the existing socket, the app could bind to it directly

Rationale: systemd socket activation creates the specified socket path, and listens to it; when anyone tries to attach to that socket, it buffers its io, activates the specified service (on demand) and gives control to it.

This would allow rustica-agent to not be started until requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant