0

I have a production RabbitMQ system on a server on cloud and there is a Nodejs application which is using this RabbitMQ server. The problem is the Nodejs application which is running on the cloud is connected fine to the RabbitMQ but the same Nodejs application in my local machine shows me this error:

Error: Heartbeat timeout
   at Heart.<anonymous> (C:\Nodejs\my-app\node_modules\amqplib\lib\connection.js:435:19)
   at Heart.emit (node:events:513:28)
   at Heart.runHeartbeat (C:\Nodejs\my-app\node_modules\amqplib\lib\heartbeat.js:88:17)
   at listOnTimeout (node:internal/timers:559:17)
   at processTimers (node:internal/timers:502:7)
   2023-07-12 03:07 -07:00: Uncought Exception: Error: Heartbeat timeout

This is how I connect to AMQP:

const amqp = require("amqplib/callback_api");
amqp.connect( amqp://USERNME:PASSWORD@amqp-server.com/main_queue, function (err, conn) {
  ...
}

No other configuration.

The point is this app used to be working fine no local too but not anymore! The port 5672 is open on the server. And I can ping the server from local machine. Can you help me?

Abdol Seed
  • 1,227
  • 1
  • 14
  • 23

0 Answers0