Hello,
I tried the third weekend in a row to upgrade our zabbix which runs on 6.0 via docker-compose to the version 6.4.
I made a lot of tries:
- stop only web service and zabbix-server service and let database service running, update service definition in docker-compose and start again
- I tried to stop all services, update the definitions in docker-compose and start every service together
- I set the mysql variable log_bin_trust_function_creators via docker-compose or directly in database container (without recreating or stop)
- and a lot more stuff...
At the moment my docker-compose looks like this:
My understanding is that I actually just have to change the image from zabbix/zabbix-server-mysql:alpine-6.0-latest to 6.4 (zabbix/zabbix-server-mysql:alpine-6.4-latest) and need to recreate the container.
After every try the result was the following message:
Does anyone have an idea?
Thanks a lot!
Best wishes
I tried the third weekend in a row to upgrade our zabbix which runs on 6.0 via docker-compose to the version 6.4.
I made a lot of tries:
- stop only web service and zabbix-server service and let database service running, update service definition in docker-compose and start again
- I tried to stop all services, update the definitions in docker-compose and start every service together
- I set the mysql variable log_bin_trust_function_creators via docker-compose or directly in database container (without recreating or stop)
- and a lot more stuff...
At the moment my docker-compose looks like this:
Code:
version: '3.5'
services:
mysql-server:
image: mysql:8.0-oracle
restart: unless-stopped
networks:
- ${INTERNAL_NETWORK}
cap_add:
- SYS_NICE # CAP_SYS_NICE
command:
- mysqld
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_bin
- --skip-character-set-client-handshake
- --default-authentication-plugin=mysql_native_password
- --log_bin_trust_function_creators
volumes:
- ${MYSQLDIR}:/var/lib/mysql:rw
env_file:
- ".env"
stop_grace_period: 1m
zabbix-server:
image: zabbix/zabbix-server-mysql:alpine-6.0-latest
restart: unless-stopped
networks:
- ${INTERNAL_NETWORK}
- ${EXTERNAL_NETWORK}
ports:
- "10051:10051"
volumes:
- /etc/localtime:/etc/localtime
- /etc/timezone:/etc/timezone
- ./zbx_env/usr/lib/zabbix/alertscripts:/usr/lib/zabbix/alertscripts
- ./zbx_env/usr/lib/zabbix/externalscripts:/usr/lib/zabbix/externalscripts
- ./zbx_env/var/lib/zabbix/export:/var/lib/zabbix/export
- ./zbx_env/var/lib/zabbix/modules:/var/lib/zabbix/modules
- ./zbx_env/var/lib/zabbix/enc:/var/lib/zabbix/enc
- ./zbx_env/var/lib/zabbix/ssh_keys:/var/lib/zabbix/ssh_keys
- ./zbx_env/var/lib/zabbix/mibs:/var/lib/zabbix/mibs
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
env_file:
- ".env"
depends_on:
- mysql-server
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
zabbix-web-nginx-mysql:
image: zabbix/zabbix-web-nginx-mysql:alpine-6.0-latest
networks:
- ${INTERNAL_NETWORK}
- ${EXTERNAL_NETWORK}
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./zbx_env/usr/share/zabbix/:/usr/share/zabbix/:ro
env_file:
- ".env"
depends_on:
- mysql-server
- zabbix-server
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
sysctls:
- net.core.somaxconn=65535
labels:
- "traefik.enable=true"
- "traefik.http.routers.${NGINX_SERVICE_NAME}.entrypoints=http"
- "traefik.http.routers.${NGINX_SERVICE_NAME}.rule=Host(`${NGINX_DOMAIN}`)"
- "traefik.http.middlewares.${NGINX_SERVICE_NAME}-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.${NGINX_SERVICE_NAME}.middlewares=${NGINX_SERVICE_NAME}-https-redirect"
- "traefik.http.routers.${NGINX_SERVICE_NAME}-secure.entrypoints=https"
- "traefik.http.routers.${NGINX_SERVICE_NAME}-secure.rule=Host(`${NGINX_DOMAIN}`)"
- "traefik.http.routers.${NGINX_SERVICE_NAME}-secure.tls=true"
- "traefik.http.routers.${NGINX_SERVICE_NAME}-secure.tls.certresolver=http"
- "traefik.http.routers.${NGINX_SERVICE_NAME}-secure.service=${NGINX_SERVICE_NAME}"
- "traefik.http.services.${NGINX_SERVICE_NAME}.loadbalancer.server.port=${NGINX_LOADBALANCER_PORT}"
- "traefik.docker.network=${EXTERNAL_NETWORK}"
networks:
zabbix-net:
internal: true
driver_opts:
com.docker.network.enable_ipv6: "false"
traefik-proxy:
external: true
My understanding is that I actually just have to change the image from zabbix/zabbix-server-mysql:alpine-6.0-latest to 6.4 (zabbix/zabbix-server-mysql:alpine-6.4-latest) and need to recreate the container.
After every try the result was the following message:
Code:
zabbix Your database version: 6040000. Required version: 600000
Thanks a lot!
Best wishes
Comment