Amna
Amna

Reputation: 611

Docker is giving error in running RabbitMQ

I have this issue that Docker is giving exception in RabbitMQ and not running the project. It was working fine like two days before

Error Code:

Severity    Code    Description Project File    Line    Source  Suppression State
Error       The DOCKER_REGISTRY variable is not set. Defaulting to a blank string.
Creating network "dockercompose17804906324906542053_default" with the default driver
Building syncserviceexchange
Building webapisyncserviceexchange
Creating dockercompose17804906324906542053_rabbit2_1 ... 
Creating elasticsearch                               ... 
Creating mysql1                                      ... 
Creating myadmin                                     ... 
Creating dockercompose17804906324906542053_rabbit2_1 ... error
ERROR: for dockercompose17804906324906542053_rabbit2_1  Cannot start service rabbit2: driver failed programming external connectivity on endpoint dockercompose17804906324906542053_rabbit2_1 (5ff7c5b4d0fa9db5bc8b35dc4010c306c0e357a97d1ea912bd9b290fdfa6f8fd): Error starting userland proxy: Bind for 0.0.0.0:5672 failed: port is already allocated
Creating mysql1                                      ... error
ERROR: for mysql1  Cannot start service db: error while creating mount source path '/host_mnt/g/Flexfone/Imp&Rec/Flexfone/SyncServiceExchange/datadir': mkdir /host_mnt/g: file exists
Creating elasticsearch                               ... done
Creating myadmin                                     ... done
ERROR: for rabbit2  Cannot start service rabbit2: driver failed programming external connectivity on endpoint dockercompose17804906324906542053_rabbit2_1 (5ff7c5b4d0fa9db5bc8b35dc4010c306c0e357a97d1ea912bd9b290fdfa6f8fd): Error starting userland proxy: Bind for 0.0.0.0:5672 failed: port is already allocated
ERROR: for db  Cannot start service db: error while creating mount source path '/host_mnt/g/Flexfone/Imp&Rec/Flexfone/SyncServiceExchange/datadir': mkdir /host_mnt/g: file exists
Encountered errors while bringing up the project..  

VS Image

Upvotes: 0

Views: 1342

Answers (1)

Bashar Ali Labadi
Bashar Ali Labadi

Reputation: 1074

it says the port already used, you have to stop the previous container first:

Bind for 0.0.0.0:5672 failed: port is already allocated

you can use docker-compose down if you use docker-compose it will also stop all the services in that compose

or

use docker stop <container_name> to stop specific container and if you updated the image remove it first and rebuild the image and rerun the containers, do any clean ups necessary but in this case you have to run it and configure it manually in the command line.

to see what docker containers running check docker ps .. if the port is not used there then another process took it in that machine OS check what could have done that

Upvotes: 2

Related Questions