Please don't use screenshots for plain text. Screenshots are hard to read and we can't copy/paste the text in the image.
The error says it can't connect to 172.21.0.1 port 5672. Do you perhaps have the port numbers reversed in your "yml compose file"? Is the IP address correct? On Mon, Mar 25, 2024 at 10:55 PM Alex Kiprono <a...@touchvas.com> wrote: > am having this error despite setting up environments on yml file and even > testing by login into the rabbitMq localhost of the rabbitmq container. > > > any assistance will be highly appreciated > > yml compose file > version: "3" > > services: > > # Create service with RabbitMQ. > message-broker: > image: rabbitmq:3-management-alpine > ports: > - "5673:5672" # Corrected port mapping for AMQP connections > - "15673:15672" # for serving RabbitMQ GUI > volumes: > - ${HOME}/rabbitmq2/data/:/var/lib/rabbitmq > - ${HOME}/rabbitmq2/log/:/var/log/rabbitmq > restart: always > networks: > - dev1-network > > # Create service with sender. > sender: > build: > context: . > dockerfile: Dockerfile-sender > ports: > - "3000:3000" > environment: > AMQP_SERVER_URL: amqp://guest:guest@localhost:5672/ # Use localhost for > connection > restart: always > networks: > - dev1-network > depends_on: > - message-broker > > # Create service with message consumer. > consumer: > build: > context: . > dockerfile: Dockerfile-consumer > environment: > AMQP_SERVER_URL: amqp://guest:guest@localhost:5672/ # Use localhost for > connection > restart: always > networks: > - dev1-network > depends_on: > - sender > - message-broker > > networks: > # Create a new Docker network. > dev1-network: > driver: bridge > > > > > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/0d8bf2eb-6600-4f0b-bf07-06fef5a185c1n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/0d8bf2eb-6600-4f0b-bf07-06fef5a185c1n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD8q3R3v7F4u_MYW7qiR2JBRCXEmeOiFj3yuDX4Jav%3DN%3DQ%40mail.gmail.com.