[ZBX-18007] Installation from containers need a correction Created: 2020 Jul 02  Updated: 2024 Apr 10  Resolved: 2021 Feb 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Documentation (D)
Affects Version/s: 5.0.1
Fix Version/s: 5.2 (plan)

Type: Documentation task Priority: Trivial
Reporter: Evgeny Yurchenko Assignee: Martins Valkovskis
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team D
Sprint: Sprint 66 (Jul 2020), Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021)

 Description   

Example 2 on this page https://[www.zabbix.com/documentation/current/manual/installation/containers|http://www.zabbix.com/documentation/current/manual/installation/containers] does not provide correct deployment.

Both zabbix-server-pgsql and zabbix-web-nginx-pgsql endlessly report

**** PostgreSQL server is not available. Waiting 5 seconds...

This is due to /usr/bin/docker-entrypoint.sh has following code to check connectivity to DB:

psql "$ssl_opts" --host ${DB_SERVER_HOST} --port ${DB_SERVER_PORT} --username ${DB_SERVER_ROOT_USER} --list --quiet

If dbname is not specified at the command line then psql uses user_name as dbname but DB zabbix does not exist, we created zabbix_dmp database instead. So this needs to be changed:

--- POSTGRES_DB="zabbix_pwd"
+++ POSTGRES_DB="zabbix"

The second problem is with zabbix-web-nginx-pgsql container exposing wrong port, if we deploy this container as it is right now in documentation then ngnx is listening on port 8080, so this needs to be changed:

--- -p 443:8443
+++ -p <some_host_port>:8080

Bottom line, these are steps to deploy working configuration (without snmp_trapper):

docker run --name postgres-server -t -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -e POSTGRES_DB="zabbix" --restart unless-stopped -d postgres:latest

docker run --name zabbix-server-pgsql -t -e DB_SERVER_HOST="postgres" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -e POSTGRES_DB="zabbix" --link postgres-server:postgres -p 11051:10051 --restart unless-stopped -d zabbix/zabbix-server-pgsql:latest

docker run --name zabbix-web-nginx-pgsql -t -e DB_SERVER_HOST="postgres" -e POSTGRES_USER="zabbix" -e POSTGRES_PASSWORD="zabbix" -e POSTGRES_DB="zabbix" --link postgres-server:postgres --link zabbix-server-pgsql:zabbix-server -p 8080:8080 -v /etc/ssl/nginx:/etc/ssl/nginx:ro --restart unless-stopped -d zabbix/zabbix-web-nginx-pgsql:latest

 



 Comments   
Comment by Martins Valkovskis [ 2021 Feb 04 ]

Added to the upgrade notes for 3.0.31, 4.0.20, 4.4.8, 5.0.0.

Generated at Sat Aug 02 09:01:14 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.