-
Incident report
-
Resolution: Duplicate
-
Trivial
-
6.0.1
-
Zabbix 6.0.1 using docker-compose.
hi,
I'm trying to my Zabbix containerized I've used a compose file and tweaked it accordingly to my environment;
Docker compose;
version: '3.5' services: zabbix-server: image: zabbix/zabbix-server-mysql:ubuntu-6.0-latest ports: - "10051:10051" volumes: - /etc/localtime:/etc/localtime:ro - ./zbx_env/var/lib/zabbix/export:/var/lib/zabbix/export:rw - ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro - ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro - ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro - /mnt/data/zabbix-server-mysql/alertscripts:/usr/lib/zabbix/alertscripts:ro - /mnt/data/zabbix-server-mysql/externalscripts:/usr/lib/zabbix/externalscripts:ro - /mnt/data/zabbix-server-mysql/snmptraps:/var/lib/zabbix/snmptraps:ro - /mnt/data/zabbix-server-mysql/mibs:/var/lib/zabbix/mibs:ro ulimits: nproc: 65535 nofile: soft: 20000 hard: 40000 deploy: resources: limits: cpus: '0.70' memory: 6G reservations: cpus: '0.5' memory: 5G env_file: - ./env_vars/.env_db_mysql - ./env_vars/.env_srv secrets: - MYSQL_USER - MYSQL_PASSWORD - MYSQL_ROOT_USER - MYSQL_ROOT_PASSWORD # - client-key.pem # - client-cert.pem # - root-ca.pem depends_on: - mysql-server networks: zbx_net_backend: aliases: - zabbix-server - zabbix-server-mysql - zabbix-server-ubuntu-mysql - zabbix-server-mysql-ubuntu zbx_net_frontend: # devices: # - "/dev/ttyUSB0:/dev/ttyUSB0" stop_grace_period: 30s sysctls: - net.ipv4.ip_local_port_range=1024 65000 - net.ipv4.conf.all.accept_redirects=0 - net.ipv4.conf.all.secure_redirects=0 - net.ipv4.conf.all.send_redirects=0 labels: com.zabbix.description: "Zabbix server with MySQL database support" com.zabbix.company: "Zabbix LLC" com.zabbix.component: "zabbix-server" com.zabbix.dbtype: "mysql" com.zabbix.os: "ubuntu" zabbix-web-apache-mysql: image: zabbix/zabbix-web-apache-mysql:ubuntu-6.0-latest ports: - "8081:8080" - "8443:8443" volumes: - /etc/localtime:/etc/localtime:ro - ./zbx_env/etc/ssl/apache2:/etc/ssl/apache2:ro - ./zbx_env/usr/share/zabbix/modules/:/usr/share/zabbix/modules/:ro deploy: resources: limits: cpus: '0.70' memory: 2G reservations: cpus: '0.5' memory: 1G env_file: - ./env_vars/.env_db_mysql - ./env_vars/.env_web secrets: - MYSQL_USER - MYSQL_PASSWORD # - client-key.pem # - client-cert.pem # - root-ca.pem depends_on: - mysql-server - zabbix-server healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/"] interval: 10s timeout: 5s retries: 3 start_period: 30s networks: zbx_net_backend: aliases: - zabbix-web-apache-mysql - zabbix-web-apache-ubuntu-mysql - zabbix-web-apache-mysql-ubuntu zbx_net_frontend: stop_grace_period: 10s sysctls: - net.core.somaxconn=65535 labels: com.zabbix.description: "Zabbix frontend on Apache web-server with MySQL database support" com.zabbix.company: "Zabbix LLC" com.zabbix.component: "zabbix-frontend" com.zabbix.webserver: "apache2" com.zabbix.dbtype: "mysql" com.zabbix.os: "ubuntu" zabbix-agent: image: zabbix/zabbix-agent:ubuntu-6.0-latest ports: - "10050:10050" volumes: - /etc/localtime:/etc/localtime:ro - ./zbx_env/etc/zabbix/zabbix_agentd.d:/etc/zabbix/zabbix_agentd.d:ro - ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules:ro - ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro - ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys:ro deploy: resources: limits: cpus: '0.2' memory: 265M reservations: cpus: '0.1' memory: 128M mode: global env_file: - ./env_vars/.env_agent privileged: true pid: "host" networks: zbx_net_backend: aliases: - zabbix-agent - zabbix-agent-passive - zabbix-agent-ubuntu stop_grace_period: 5s labels: com.zabbix.description: "Zabbix agent" com.zabbix.company: "Zabbix LLC" com.zabbix.component: "zabbix-agentd" com.zabbix.os: "ubuntu" zabbix-snmptraps: image: zabbix/zabbix-snmptraps:ubuntu-6.0-latest ports: - "162:1162/udp" volumes: - /mnt/data/zabbix-server-mysql/snmptraps:/var/lib/zabbix/snmptraps:rw #- snmptraps:/var/lib/zabbix/snmptraps:rw deploy: resources: limits: cpus: '0.5' memory: 256M reservations: cpus: '0.25' memory: 128M networks: zbx_net_frontend: aliases: - zabbix-snmptraps zbx_net_backend: stop_grace_period: 5s labels: com.zabbix.description: "Zabbix snmptraps" com.zabbix.company: "Zabbix LLC" com.zabbix.component: "snmptraps" com.zabbix.os: "ubuntu" zabbix-web-service: image: zabbix/zabbix-web-service:ubuntu-6.0-latest ports: - "10053:10053" volumes: - ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc:ro cap_add: - SYS_ADMIN deploy: resources: limits: cpus: '0.5' memory: 6G reservations: cpus: '0.25' memory: 3G env_file: - ./env_vars/.env_web_service networks: zbx_net_backend: aliases: - zabbix-web-service - zabbix-web-service-ubuntu stop_grace_period: 5s labels: com.zabbix.description: "Zabbix web service" com.zabbix.company: "Zabbix LLC" com.zabbix.component: "web-service" com.zabbix.os: "ubuntu" mysql-server: image: mysql:8.0 command: - mysqld - --character-set-server=utf8mb4 - --collation-server=utf8mb4_bin - --default-authentication-plugin=mysql_native_password # - --require-secure-transport # - --ssl-ca=/run/secrets/root-ca.pem # - --ssl-cert=/run/secrets/server-cert.pem # - --ssl-key=/run/secrets/server-key.pem volumes: - /mnt/data/zabbix-mysql-server:/var/lib/mysql:rw env_file: - ./env_vars/.env_db_mysql secrets: - MYSQL_USER - MYSQL_PASSWORD - MYSQL_ROOT_PASSWORD # - server-key.pem # - server-cert.pem # - root-ca.pem stop_grace_period: 1m networks: zbx_net_backend: aliases: - mysql-server - zabbix-database - mysql-database db_data_mysql: image: busybox volumes: - /mnt/data/zabbix-mysql-server:/var/lib/mysql:rw #- ./zbx_env/var/lib/mysql:/var/lib/mysql:rw# elasticsearch: # image: elasticsearch # environment: # - transport.host=0.0.0.0 # - discovery.zen.minimum_master_nodes=1 # networks: # zbx_net_backend: # aliases: # - elasticsearchnetworks: zbx_net_frontend: driver: bridge driver_opts: com.docker.network.enable_ipv6: "false" ipam: driver: default config: - subnet: 172.16.238.0/24 zbx_net_backend: driver: bridge driver_opts: com.docker.network.enable_ipv6: "false" internal: true ipam: driver: default config: - subnet: 172.16.239.0/24volumes: snmptraps:secrets: MYSQL_USER: file: ./env_vars/.MYSQL_USER MYSQL_PASSWORD: file: ./env_vars/.MYSQL_PASSWORD MYSQL_ROOT_USER: file: ./env_vars/.MYSQL_ROOT_USER MYSQL_ROOT_PASSWORD: file: ./env_vars/.MYSQL_ROOT_PASSWORD # client-key.pem: # file: ./env_vars/.ZBX_DB_KEY_FILE # client-cert.pem: # file: ./env_vars/.ZBX_DB_CERT_FILE # root-ca.pem: # file: ./env_vars/.ZBX_DB_CA_FILE # server-cert.pem: # file: ./env_vars/.DB_CERT_FILE # server-key.pem: # file: ./env_vars/.DB_KEY_FILE
When I run the command to bring it up, everything starts apart from the Zabbix server (backend), so I can access the web ui, see the DB is good, on the face of it anyway.
The error within the container doesn't really give me much to go on, I wondered if someone here may shed some light at least in the direction of where to look.
Full error:
Attached
Zabbix server variables;
**
ZBX_STARTPOLLERS=10 ZBX_STARTPINGERS=50 ZBX_CACHESIZE=2G ZBX_HISTORYCACHESIZE=1G ZBX_VALUECACHESIZE=2G ZBX_TIMEOUT=30
Steps to reproduce:
- start docker compose
- watch it burn
Result:
See Full error
Expected:
Compose will completely start and server will start gathering data
Any help appreciated.
- duplicates
-
ZBX-20697 Zabbix server crashes
- Closed