Ad Widget

Collapse

Upgrade 6.0 to 6.4 docker-compose failed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IP-Fan96
    Junior Member
    • Sep 2022
    • 4

    #1

    Upgrade 6.0 to 6.4 docker-compose failed

    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:

    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
    Does anyone have an idea?

    Thanks a lot!

    Best wishes
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    I assume the error comes from Frontend, in which case it looks like you forgot to upgrade it also.

    Comment


    • IP-Fan96
      IP-Fan96 commented
      Editing a comment
      Hi dimir,
      thanks a lot for you answer.
      What do you mean with upgrading the frontend?
      I changed both images (zabbix-server & zabbix-web-nginx-mysql) from 6.0 to 6.4.
      In my understanding the zabbix-web-nginx-mysql is the "frontend" service right?

    • dimir
      dimir commented
      Editing a comment
      Correct. And to me it looks like zabbix-web-nginx-mysql is not 6.4 . Do you confirm that you see this error in the browser (not the log file)?

    • IP-Fan96
      IP-Fan96 commented
      Editing a comment
      Yes, I see the error in browser and not in log files.
      I stopped the service, changed the Image(to 6.4) and recreated the container with "docker-compose up -d zabbix-web-nginx-mysql"
  • IP-Fan96
    Junior Member
    • Sep 2022
    • 4

    #3
    I tried again yesterday several times, but I still get the same error.
    I am now very sure that this failure is caused by zabbix-web-nginx-mysql service.
    Is it possible that the database information is not being written correctly to a configuration file?​
    Can someone tell me where the configuration file is located?

    Thanks!

    Comment

    Working...