docker-pgbouncer: Failure to generate userlist.txt
Steps to reproduce:
docker run --rm \
-e DB_USER=****** \
-e DB_PASSWORD=******** \
-e DB_HOST=******** \
-e DB_NAME=postgres \
-p 5432:5432 \
edoburu/pgbouncer
Gives the following error:
2021-01-23 16:08:45.798 UTC [1] ERROR could not open auth_file /etc/pgbouncer/userlist.txt: No such file or directory
Subsequently, connecting to the database fails:
2021-01-23 16:09:06.757 UTC [1] LOG C-0x7f04932a30f0: (nodb)/(nouser)@127.0.0.1:46564 no such user: ******
Shouldn’t that be done automatically?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 18
- Comments: 27 (3 by maintainers)
@cheungpat The new code was pushed on the same tags which created existing containers to fail as well.
I made a Dockerfile from the sha of the working one and pushed it to my own docker repository.
It appears recent changes caused
userlist.txtto be absent, and theentrypoint.shdo not create the file if it is missinghttps://github.com/edoburu/docker-pgbouncer/commit/d33ec7c6416f5dc9d5947caab1c3f46a8bd16528
Any workaround that places
userlist.txtunder/etc/pgbouncerwould work, I changed my run command totouch /etc/pgbouncer/userlist.txtbefore running the entrypoint script.@esalter I think the images are indeed properly tagged using semver, and you should still be getting
1.14.0if you pullededoburu/pgbouncer:1.14.0.EDIT: See #35 for proposal for immutable tags
I appreciate all the work maintainers do but in the future please tag releases using semver. It would have helped us as we were targeting 1.14.0, not latest, so I would not have expected that to update.
When I try to mount a volume with an empty userlist.txt file I get the following error:
/entrypoint.sh: line 49: can't create /etc/pgbouncer/userlist.txt: Permission deniedIMO, even if we have a bug or security vulnerabilities - we should not push a new image with the same tag. Override existing image losing the point of versioning.