ERROR:__main__:(psycopg2.OperationalError) could not translate host name "db" to address
Jelle3345 opened this issue · comments
I followed all instructions in the development-guide however when running docker-compose I run into this error:
test-celeryworker-1 | ERROR:main:(psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
test-celeryworker-1 |
test-celeryworker-1 | (Background on this error at: https://sqlalche.me/e/20/e3q8)
test-celeryworker-1 | WARNING:main:Finished call to 'main.init' after 26.012(s), this was the 3rd time calling it.
test-celeryworker-1 |
test-celeryworker-1 | INFO:main:Starting call to 'main.init', this is the 4th time calling it.
test-backend-1 | ERROR:main:(psycopg2.OperationalError) could not translate host name "db" to address: Temporary failure in name resolution
test-backend-1 |
test-backend-1 | (Background on this error at: https://sqlalche.me/e/14/e3q8)
test-backend-1 | WARNING:main:Finished call to 'main.init' after 35.030(s), this was the 4th time calling it.
test-backend-1 |
test-backend-1 | INFO:main:Starting call to 'main.init', this is the 5th time calling it.
I think this is the cause of the error:
The data directory was initialized by PostgreSQL version 12, which is not compatible with this version 14.8 (Debian 14.8-1.pgdg120+1).
However I dont know how to fix it
Removing all images and rebuilding the project seems to have fixed the problem
@Jelle3345 Hi ... yes, what you've described is a Docker issue rather than anything relating to the stack. You've got multiple images for PostgreSQL there and Docker got confused. Sometimes just removing all the images and rebuilding solves the problem.