question-mark

Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Catch if Rabbit server is down

See original GitHub issue

Issue Description

How can I check if the RabbitMQ server is down? In the client, I shutdown RabbitMQ local server to check if I can catch the error but all I receive is:

(node:90094) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:5672
    at Object._errnoException (util.js:992:11)
    at _exceptionWithHostPort (util.js:1014:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
(node:90094) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:90094) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:90094) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:5672
    at Object._errnoException (util.js:992:11)
    at _exceptionWithHostPort (util.js:1014:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14)
(node:90094) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)

This happens as a response to

    this.client = new ClientRMQ({
      url: `${process.env.CLOUDAMQP_URL}`,
      queue: 'ampanova_mails',
      queueOptions: { durable: false }
    })

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ebadiacommented, Sep 10, 2018

@AlariCode Sorry, my fault… I did not upgrade the package to incude the changes… Now the error message has disapeared. Thanks!

0reactions
AlariCodecommented, Sep 11, 2018

Thanks for bug report! I’m closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I find out that the server with the rabbitmq consumer is ...
You can retry if the message fails and after a number of retry send the messages to a separate dead letter queue. –...
Read more >
Troubleshooting Network Connectivity - RabbitMQ
Verifying server configuration helps prove that RabbitMQ is running with the expected set of settings related to networking. It also verifies that the...
Read more >
Troubleshooting RabbitMQ - SolarWinds Success Center
RabbitMQ is installed ONLY ON THE PRIMARY/MAIN POLLER (and standby server if in High Availability) as a windows service.
Read more >
Rabbit eventually unresponsive. Status reports node down but ...
Before rabbit becomes unresponsive, I see consumers registered with rabbit through the management ui and work, if there, is pulled off the queue....
Read more >
Handling Failure Successfully in RabbitMQ - Medium
Again, if there's a dead letter exchange the message goes there, so we'll be able to see what didn't get processed. Choosing Failure...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found