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

log errors from removing unix domain paths? #2141

Closed
slingamn opened this issue Apr 3, 2024 · 0 comments
Closed

log errors from removing unix domain paths? #2141

slingamn opened this issue Apr 3, 2024 · 0 comments

Comments

@slingamn
Copy link
Member

slingamn commented Apr 3, 2024

We got a bug report in #ergo like so:

  1. Ergo was accidentally run as root
  2. This created a root-owned unix domain socket path corresponding to one of the listeners
  3. Starting Ergo again as the unprivileged role user, os.Remove failed silently:
    os.Remove(addr)
  4. The server then failed to start with: Apr 03 13:02:20 hostname start.sh[1545]: 2024-04-03T13:02:20.983Z : error : server : Could not load server: listen unix /tmp/ergo_websocket: bind: address already in use
  5. Head scratching ensued

We don't want to log the error unconditionally since the file not existing is not an error, but we could maybe do a better job here

slingamn added a commit to slingamn/ergo that referenced this issue May 29, 2024
Log errors from attempting to delete a unix domain socket path
slingamn added a commit that referenced this issue May 29, 2024
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