Docker Question continued

I have Just redone the entire test setup from scratch with a new vm and it took a while downloading everything more than I remember for the other times ive tried and it seemed to be going well. I got to the last step sudo docker-compose up -d and got the same error I have been getting all along with the errors encountered bringing up the project etc. I cleared my virtualbox completely so I am unsure as to why this is happening as surely it should be a clean slate?


This is continued from another thread linked below as I am still struggling with it

Please can you copy and paste command line output instead of taking screenshots, they make it harder to help you. After pasting the text, select it and press Ctrl+E so that is formatted with a monospace font, e.g.

❯ echo foobar
foobar

The error message indicates a process is already listening on port 5000, so when Docker tries to bind to the port it receives an “address already in use” error.

Please run the following commands from within the musicbrainz-docker directory and paste the output:

sudo docker-compose stop
sudo lsof -Pi :5000
sudo docker ps
3 Likes
j@j-VirtualBox:~/musicbrainz-docker$ sudo docker-compose up -d
[sudo] password for j:    
musicbrainz-docker_db_1 is up-to-date
musicbrainz-docker_redis_1 is up-to-date
musicbrainz-docker_mq_1 is up-to-date
musicbrainz-docker_search_1 is up-to-date
Creating musicbrainz-docker_indexer_1 ... 
Creating musicbrainz-docker_musicbrainz_1 ... 
Creating musicbrainz-docker_musicbrainz_1 ... error

ERROR: for musicbrainz-docker_musicbrainz_1  Cannot start service musicbrainz: driver failed programming external connectivity on endpoint musicbrainz-docker_musicbrainz_1 (d1d9e22953372fa46186410b748b4886a939db1226748719cddad337596a42f2): Creating musicbrainz-docker_indexer_1     ... done
n use

ERROR: for musicbrainz  Cannot start service musicbrainz: driver failed programming external connectivity on endpoint musicbrainz-docker_musicbrainz_1 (d1d9e22953372fa46186410b748b4886a939db1226748719cddad337596a42f2): Error starting userland proxy: listen tcp4 0.0.0.0:5000: bind: address already in use
ERROR: Encountered errors while bringing up the project.
j@j-VirtualBox:~/musicbrainz-docker$ sudo docker-compose stop
Stopping musicbrainz-docker_indexer_1 ... done
Stopping musicbrainz-docker_redis_1   ... done
Stopping musicbrainz-docker_search_1  ... done
Stopping musicbrainz-docker_mq_1      ... done
Stopping musicbrainz-docker_db_1      ... done
j@j-VirtualBox:~/musicbrainz-docker$ sudo lsof -Pi :5000
COMMAND    PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
docker-re 4004 docker-registry    6u  IPv6  46839      0t0  TCP *:5000 (LISTEN)
j@j-VirtualBox:~/musicbrainz-docker$ sudo docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

HEre is the error and the response I got from the above commands thank you

2 Likes

As @atj noticed, you might have a running instance of Docker Registry which is using the port 5000 already.

You can change this setting in the file .env with a line such as

MUSICBRAINZ_WEB_SERVER_PORT=5050

See GitHub - metabrainz/musicbrainz-docker: Docker Compose project for the MusicBrainz Server with replication, search, and development setup for full instructions.

2 Likes

The output from lsof shows that you have a docker-registry binary running which is already bound to port 5000. This is the cause of the error when you run docker-compose up -d.

As @yvanzo mentioned above, you can change the port the MusicBrainz web server container listens on to get around this error, or alternatively you can stop the registry server (if you don’t need it).

2 Likes
j@j-VirtualBox:~/musicbrainz-docker$ MUSICBRAINZ_WEB_SERVER_PORT=5050
j@j-VirtualBox:~/musicbrainz-docker$ sudo docker-compose up -d
Starting musicbrainz-docker_mq_1     ... done
Starting musicbrainz-docker_redis_1   ... done
Starting musicbrainz-docker_db_1     ... done
Starting musicbrainz-docker_search_1 ... done
Starting musicbrainz-docker_indexer_1 ... 
Starting musicbrainz-docker_musicbrainz_1 ... 
Starting musicbrainz-docker_musicbrainz_1 ... error

ERROR: for musicbrainz-docker_musicbrainz_1  Cannot start service musicbrainz: driver failed programming external connectivity on endpoint musicbrainz-docker_musicbrainz_1 (a3ab5ff452d3a5256c7f85f5da91c7eb50abe70fb7e2ebccb30dd6eed862966e): Starting musicbrainz-docker_indexer_1     ... done
n use

ERROR: for musicbrainz  Cannot start service musicbrainz: driver failed programming external connectivity on endpoint musicbrainz-docker_musicbrainz_1 (a3ab5ff452d3a5256c7f85f5da91c7eb50abe70fb7e2ebccb30dd6eed862966e): Error starting userland proxy: listen tcp4 0.0.0.0:5000: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Still having the same issue despite changing the port

You misread it, the variable doesn’t have to be set in the shell.
Please follow the given link for full instructions.

2 Likes

Still getting the same error trying both that just happened to be the one I copied and pasted and I am still getting the error

I’m sorry, but we are unable help further than we already have. Consider starting from scratch following the well documented instructions which have worked for other users.

5 Likes