Ad Widget

Collapse

docker: front end cannot detect backend: Server is running: No

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • grayaii
    Junior Member
    • Nov 2020
    • 3

    #1

    docker: front end cannot detect backend: Server is running: No

    Hi,
    I am trying to get zabbix to work with docker.

    I have a simple script that starts the frontend and the backend, but when I log into the frontend, it says:
    Zabbix server is running No

    For some reason, the frontend cannot find the backend, even though I put the "--link" option in docker:

    Code:
    #!/bin/bash
    
    ZABBIX_TAG=ubuntu-5.2.0
    SERVER_NAME_BACKEND=zabbix-backend
    SERVER_NAME_FRONTEND=zabbix-frontend
    
    docker run --name ${SERVER_NAME_BACKEND} \
    -p 10051:10051 \
    -p 10050:10050 \
    -e DB_SERVER_HOST=zabbix.mycompany.com \
    -e POSTGRES_DB=zabbix \
    -e POSTGRES_USER=zabbix \
    -e POSTGRES_PASSWORD="xxx" \
    -d zabbix/zabbix-server-pgsql:${ZABBIX_TAG}
    
    docker run --name ${SERVER_NAME_FRONTEND} \
    --link ${SERVER_NAME_BACKEND}:${SERVER_NAME_BACKEND} \
    -p 8080:8080 \
    -e DB_SERVER_HOST=zabbix.mycompany.com \
    -e POSTGRES_DB=zabbix \
    -e POSTGRES_USER=zabbix \
    -e POSTGRES_PASSWORD="xxx" \
    -e PHP_TZ="America/Los_Angeles" \
    -d zabbix/zabbix-web-nginx-pgsql:${ZABBIX_TAG}
    When I do a docker ps, i see the frontend/backend running happily:
    Code:
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    2152fd82849f zabbix/zabbix-web-nginx-pgsql:ubuntu-5.2.0 "docker-entrypoint.sh" 12 hours ago Up 12 hours 0.0.0.0:8080->8080/tcp, 8443/tcp zabbix-frontend
    061a32b9c4e6 zabbix/zabbix-server-pgsql:ubuntu-5.2.0 "/usr/bin/tini -- /u…" 12 hours ago Up 12 hours 0.0.0.0:10050-10051->10050-10051/tcp zabbix-backend
    I don't see anything obvious in the logs too, but if you want I can post them here too.
Working...