Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to connect to RabbitMQ cluster setup on Play with docker #83

Open
kailashyogeshwar85 opened this issue Nov 27, 2019 · 1 comment

Comments

@kailashyogeshwar85
Copy link

I have setup Cluster on DinD PWD which creates and run cluster i am able to use management ui and see members in cluster but I am not able to connect to it there is no response for connection and client hangs.

version: "3"
services:
  rabbit1:
    image: lucifer8591/rabbitmq-server:3.7.17
    hostname: rabbit1
    ports:
      - "5672:5672"
      - "15672:15672"
    environment:
      - RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER:-admin}
      - RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS:-admin}
  rabbit2:
    image: lucifer8591/rabbitmq-server:3.7.17
    hostname: rabbit2
    links:
      - rabbit1
    environment:
      - CLUSTERED=true
      - CLUSTER_WITH=rabbit1
      - RAM_NODE=true
    ports:
      - "5673:5672"
      - "15673:15672"
  rabbit3:
    image: lucifer8591/rabbitmq-server:3.7.17
    hostname: rabbit3
    links:
      - rabbit1
      - rabbit2
    environment:
      - CLUSTERED=true
      - CLUSTER_WITH=rabbit1
    ports:
      - "5674:5672"
  const connectOptions = {
    host: [
      { host: 'ip172-18-0-40-bnf0r3vad2eg00bttg0g-5672.direct.labs.play-with-docker.com', port:5672 },
      { host: 'ip172-18-0-42-bnf0r3vad2eg00bttg0g-5673.direct.labs.play-with-docker.com', port: '5673' },
{ host: 'ip172-18-0-42-bnf0r3vad2eg00bttg0g-5674.direct.labs.play-with-docker.com', port: '5674' },

    ],
    login: "admin",
    password: "admin",
    heartbeat: 60,
    reconnect: true,
  }

  const connection = new AMQP(connectOptions);

connection.on('ready', () => console.log('Connected))
connection.on('error', () => console.log('error'))
@Cdekkx456
Copy link

2023-05-24 14.18.31.pn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants