Unable to start node: Bind for 0.0.0.0:28967 failed: port is already allocated

A friend of mine is trying to run a node is receiving this error when trying to run the node:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
container-station/docker: Error response from daemon: driver failed programming external connectivity on endpoint storagenode (1
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx): Bind for 0.0.0.0:28967 failed: port is already allocated.
CONTAINER ID        IMAGE                          COMMAND             CREATED             STATUS              PORTS
   NAMES
xxxxxxxxxxx        storjlabs/storagenode:latest   "/entrypoint"       3 minutes ago       Created
   storag

The commands run:

docker run --rm -e SETUP="true" \
--mount type=bind,source="/root/.local/share/storj/identity/storagenode",destination=/app/identity \
--mount type=bind,source="/share/Storj-one-node",destination=/app/config \
--name storagenode storjlabs/storagenode:latest
docker run -d --restart unless-stopped --stop-timeout 300 \
    -p 28967:28967 \
    -p 14002:14002 \
    -e WALLET="0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
    -e EMAIL="xxx@domain.tld" \
    -e ADDRESS="xxx.ddns.net:28967" \
    -e STORAGE="3400GB" \
    --mount type=bind,source="/root/.local/share/storj/identity/storagenode",destination=/app/identity \
    --mount type=bind,source="/share/Storj-one-node",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

This suggests that another application (possibly another Storj node?) is already listening on port 28967.

If it’s another node, each additional node should listen on a new port to avoid such conflict.

If it’s another application, just choose another port for the Storj node.

Either way, here is an example for customizing a Storj node’s port:

-p 20001:28967 \
[...]
-e ADDRESS="xxx.ddns.net:20001" \

(20001 being the arbitrary port I chose for the example)

Check what’s running on port 28967 with

netstat -tulpn|grep 28967

3 Likes