docker-mailman
docker-mailman copied to clipboard
[BUG] psql: could not connect to server: Host is unreachable
Tag/version of Container Images 0.3
docker logs gives this error for core AND web, using bot mysql and postgres (sqlite never came close) :
psql: could not connect to server: Host is unreachable
Is the server running on host "172.16.238.10" and accepting
TCP/IP connections on port 5432?
Postgres is unavailable - sleeping
I've exposed the port and changed the IP and manually added the ip
mailman-web:
image: maxking/postorius:0.3
container_name: mailman-web
hostname: mailman-web
depends_on:
- database
links:
- mailman-core:mailman-core
- database:database
volumes:
- /opt/mailman/web:/opt/mailman-web-data
environment:
- DATABASE_TYPE=postgres
- DATABASE_URL=postgres://mailman:[email protected]:5432/mailmandb
- HYPERKITTY_API_KEY=someapikey
- SECRET_KEY=ksjdbaksdba
- UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static
networks:
mailman:
ipv4_address: 172.16.238.11
database:
container_name: database
hostname: postgres
environment:
POSTGRES_DB: mailmandb
POSTGRES_USER: mailman
POSTGRES_PASSWORD: mailmanpass
restart: always
ports:
- 5432:5432
image: postgres
volumes:
- /opt/mailman/database:/var/lib/postgresql/data
networks:
mailman:
ipv4_address: 172.16.238.10
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.88. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
@iot-resister Did you resolve this? I found a similar issue. I isolated it to the mailman database password that I had selected.
The function in entrypoint.sh that parses the database connection string was returning the incorrect database hostname. I found that it was because I had a '#' symbol in my chosen password. After I removed that character, things started normally.
I'm planning to file a separate issue, but wanted to mention it here in case it is the root cause of what you saw.
This issue has not been updated for more than 1year