celery.node icon indicating copy to clipboard operation
celery.node copied to clipboard

UnhandledPromiseRejectionWarning error

Open Kainar01 opened this issue 5 years ago • 2 comments

Description

  • What is the current behavior? After creating client and task, when task.applyAsync called, the UnhandledPromiseRejectionWarning error raises. It says "Error: connect ECONNREFUSED 127.0.0.1:5672", but my broker URL is pointing to cloudamqp instance.

  • What is the expected behavior?

In documentation, it is said that it should connect to broker_url, but it tries to connect to localhost on port 5672

  • Please tell us about your environment:

    • Version: Ubuntu 18.04
    • OS: linux
    • Language: Javascript
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)

Kainar01 avatar Nov 06 '20 17:11 Kainar01

Hi! Thank you for reporting the bug so clear.

But unfortunately, I couldn't reproduce the issue you described. Can you share your codes that produce the problem?

actumn avatar Nov 07 '20 14:11 actumn

@actumn I'm also getting this same issue (MacOS). I did not specify a backend url. Maybe if it is not specified it is defaulting to localhost? (127.0.0.1).

Here is a bit of the code I'm using:

const celery = require('celery-node');
const config = require('../config');
const debug = require('debug')('project:celery');


debug(config);
const client = celery.createClient(
    config.celeryBroker,
);

client.isReady().then(() => {
    debug('Connected to Celery successfully');
}).catch(error => console.log('Got an error', error))

Juanpam avatar Aug 11 '21 21:08 Juanpam