GW will not start after upgrade, DJANGO cannot find POSTGRES username
See original GitHub issueHi all!
I attempted an upgrade from a very old version of GW to the latest and now I can’t get GW to start. Issues I’ve found are:
-
DJANGO did not have the right username/password for PostGres. I noted from the Wiki FAQ that this could be resolved by logging into the POSTGRES docker instance and running psql as postgres to update the password. This not work for me as the user for POSTGRES was different than the defaults, and so I would repeatedly get a “Fatal: role postgres does not exist” error. For anyone else struggling with this, the solution is to locate the username in the “.envs/.production/.postgres” file, and then run
docker exec -it ghostwriter_postgres_1 bash
and thenpsql -U <username you just got> -d postgres
which will allow you to change/set the password. For me, the username was ‘changeme’ -
DJango will not start (constantly restarts) with the following error displayed when I run
docker run -ti --entrypoint /bin/sh ghostwriter_production_django
“/entrypoint: line 10: POSTGRES_USER: parameter not set”. I have tried running./ghostwriter-cli-linux config set POSTGRES_USER <username previously used to login to postgres>
and taking the containers up and down with no success. The FAQ says “you must transfer your PostgreSQL username and password to the new configuration file.” When I run./ghostwriter-cli-linux config
I can see that the username and password have been defined correctly and match the ones I previously used to login to POSTGRES
Any debugging I can do to work out why the DJANGO container doesn’t seem to be able to start up?
Issue Analytics
- State:
- Created a year ago
- Comments:11
Top GitHub Comments
Yep!
I had to change some file system permissions as I couldn’t upload templates anymore but apart from that all seems to be working correctly.
Thanks for sharing, @AnubisSec! I have added an FAQ section in the wiki with an in-depth discussion of transferring the Postgres configuration. Hopefully, that will help anyone running into this in the future.
https://www.ghostwriter.wiki/getting-help/faq#ghostwriter-cli-reports-an-issue-with-postgresql