i used celery in my django project .django are running with uWSGI and can work with postgresql well but it's seem that celery can't connect to postgresql :
Traceback (most recent call last):
File "/home/classgram/www/env/lib/python3.6/site-packages/django/db/backends/base/base.py", line 216, in ensure_connection
self.connect()
File "/home/classgram/www/env/lib/python3.6/site-packages/django/db/backends/base/base.py", line 194, in connect
self.connection = self.get_new_connection(conn_params)
File "/home/classgram/www/env/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 178, in get_new_connection
connection = Database.connect(**conn_params)
File "/home/classgram/www/env/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL: password authentication failed for user "hamclassy"
FATAL: password authentication failed for user "hamclassy"
i'm working on host and host OS is Ubuntu 18.04 . thank you
hamclassyuser exists in Postgres.hamclassyexists you'll need to check if the host thatceleryis running from is allowed to log in ashamclassy. Could be that the django host has access and celery doesn't.hamclassyrole exist.when i runSELECT 1 FROM pg_roles WHERE rolname='hamclassy'return1.htopcommand i can see thatceleryanduwsgiboth are running with userclassgram, so what i must do to check if classgram can access postgresql or not?