DEV Community

Discussion on: Deploying Django with Celery and Redis on Ubuntu

Collapse
 
oscjara profile image
oscjara

thanks so much for the article, very useful and easy to follow. I did all the procedures but still getting un error on the worker log:

[2021-12-29 18:37:21,110: ERROR/MainProcess] consumer: Cannot connect to redis://redis:6379/0: Error -3 connecting to redis:6379. Temporary failure in name resolution..

how can I fix this error?

thanks in advance.

OJ

Collapse
 
idrisrampurawala profile image
Idris Rampurawala

Hey, thanks for reading through, glad you liked it.
For this error, you could check the following:

  • Is your redis server working on mentioned host and port?
  • Are you able to connect to it via cli?
  • Is there any firewall settings that is refusing your connection?

This issue is purely based on your redis configuration. Please check the respective documentations for the resolution :)

Collapse
 
oscjara profile image
oscjara

Hey Idris, well... my bad, I skipped the step ## since I had already redis on my app but after reading again carefully I realized I needed to install redis-server :).

All the services are running "sudo supervisorctl status all" but I am not getting the email. How can I double check redis is running the task? which documentations can I read?

Thread Thread
 
idrisrampurawala profile image
Idris Rampurawala

Hey, great that you were able to make if work! 👏

The testing of your code is fully dependent on your implementation. However, I can recommend you to monitor the celery logs for background tasks and also can refer to its documentation.