Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: Login fail - due to backend failing connection to db because of wrong psql version #114

Open
fungos opened this issue Aug 13, 2019 · 5 comments

Comments

@fungos
Copy link

fungos commented Aug 13, 2019

Trying to install using docker-compose was causing login error without much information. Checking logs from ownphotos-backend indicated a communication problem with ownphotos-db. Checking ownphotos-db showed this:

2019-08-13 00:37:54.806 UTC [1] FATAL:  database files are incompatible with server
2019-08-13 00:37:54.806 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 11.5 (Debian 11.5-1.pgdg90+1).

docker-compose.yml file does not specifies which postgres image version to use. So when docler-compose downloaded postgres image, it got latest (https://hub.docker.com/_/postgres) which at current time is 11.5.

Please specify a version to all your external dependencies where you do not have control to avoid future issues.

The fix to this is to put postgres:9.6 for the image on ownphotos-db container section of docker-compose.yml

@hartmark
Copy link

hartmark commented Sep 5, 2019

Thanks for the tip, but it seems to not be working anyway. I'm getting it stuck in restarting now:

9eba20998fa0 postgres:9.6 "docker-entrypoint.s…" About a minute ago Restarting (1) 24 seconds ago ownphotos-db

@fungos

@hartmark
Copy link

hartmark commented Sep 5, 2019

I removed all containers and the volumes and started from scratch, now it shows all containers as running, but I still get the message "No connection to backend server"

@hartmark
Copy link

hartmark commented Sep 5, 2019

please ignore me, it's working now, I had misunderstood the BACKEND_HOST variable, so setting it to my host made it working.

@atl-code
Copy link

atl-code commented Jun 4, 2020

@hartmark what is the value that needs to go into BACKEND_HOST ? i tried my Docker Host (Synology DNS name), i tried the Docker Host IP address, both result in "No Connection to Backend". Thanks

@hartmark
Copy link

hartmark commented Jun 4, 2020

I'm not using ownphotos any longer and I don't remember, but I think it was just the dns-name of the docker-host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants