ipfs / ipfs/kubo

unix domain socket not removed if it exists

Open
#6,856 4 comments 0 reactions 0 assignees View on GitHub
help wanted kind/enhancement topic/rpc-api
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

When using a unix domain socket, config:
"API": [ "/ip4/127.0.0.1/tcp/5001", "/unix/var/db/ipfs-go/socket/api.sock" ],

the first time it starts up, it works fine, but the second time it fails:
```
Error: serveHTTPApi: manet.Listen(/unix/var/db/ipfs-go/socket/api.sock) failed: listen unix /var/db/ipfs-go/socket/api.sock: bind: address already in use
```

It is common for programs to either use a lock file, or just simply remove it on start.

I've worked around the issue by removing it in my startup file, but a better solution that is more generic would be nice.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.