Ad Widget

Collapse

docker after upgrade image: ** Table 'zabbix.dbversion' already exists.

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • zabbix-peter
    Junior Member
    • Nov 2024
    • 12

    #1

    docker after upgrade image: ** Table 'zabbix.dbversion' already exists.

    After upgrading docker image 7.2-latest i get error in log: zabbix-server | ** Table 'zabbix.dbversion' already exists.
    I have never encountered this error before with upgrade in the major.minor version.
    It is obvious that the table dbversion exists, because it is a running installation.

    I deleted the table and started the containers , but the error is persistant (table dbversion is recreated).

    Containers i use :
    image: zabbix/zabbix-server-pgsql:ubuntu-7.2-latest
    image: zabbix/zabbix-web-nginx-pgsql:ubuntu-7.2-latest
    image: zabbix/zabbix-agent2:ubuntu-7.2-latest
    image: zabbix/zabbix-snmptraps:ubuntu-7.2-latest
    image: postgres:13-alpine

    Any tips welcome.
    Happy new year!
  • Answer selected by zabbix-peter at 06-01-2025, 10:59.
    fblank
    Junior Member
    • Dec 2023
    • 4

    Hi,
    solved the issue with commenting out the ZBX_JAVAGATEWAY_xxx lines in the .env_srv files (yes, I'm on a docker environment)
    sorry for the hassle!

    Comment

    • fblank
      Junior Member
      • Dec 2023
      • 4

      #2
      Happy new Year!
      Having the same problems.
      Containers I use:
      zabbix-docker-mysql-server-1
      zabbix-docker-zabbix-web-nginx-mysql-1
      zabbix-docker-db-data-mysql-1
      zabbix-docker-zabbix-agent-1
      zabbix-docker-zabbix-snmptraps-1
      zabbix-docker-zabbix-web-service-1
      zabbix-docker-zabbix-server-1

      The log file of the zabbix server shows the following lines repeating (blue colored):
      ** Preparing Zabbix server
      ** Preparing database
      ** Using MYSQL_USER variable from secret file
      ** Using MYSQL_PASSWORD variable from secret file
      ********************
      * DB_SERVER_HOST: mysql-server
      * DB_SERVER_PORT: 3306
      * DB_SERVER_DBNAME: zabbix
      ********************
      **** MySQL server is not available. Waiting 5 seconds...
      ** Database 'zabbix' already exists. Please be careful with database COLLATE!
      ** Table 'zabbix.dbversion' already exists.
      zabbix_server [1]: ERROR: "JavaGateway" configuration parameter is not specified or empty
      ** Preparing Zabbix server
      ** Preparing database
      ** Using MYSQL_USER variable from secret file
      ** Using MYSQL_PASSWORD variable from secret file
      ********************

      Tank you for your help in advance

      Comment

      • fblank
        Junior Member
        • Dec 2023
        • 4

        #3
        Hi,
        solved the issue with commenting out the ZBX_JAVAGATEWAY_xxx lines in the .env_srv files (yes, I'm on a docker environment)
        sorry for the hassle!

        Comment

        • zabbix-peter
          Junior Member
          • Nov 2024
          • 12

          #4
          Thanks for your reply!
          Unfortunately this does not fix my issue.

          This is my logging output for the container:

          zabbix-server exited with code 1
          zabbix-server | ** Using POSTGRES_PASSWORD variable from secret file
          zabbix-server | ********************
          zabbix-server | * DB_SERVER_HOST: postgres-server
          zabbix-server | * DB_SERVER_PORT: 5432
          zabbix-server | * DB_SERVER_DBNAME: zabbix
          zabbix-server | * DB_SERVER_SCHEMA: public
          zabbix-server | ********************
          zabbix-server | ** Database 'zabbix' already exists. Please be careful with database owner!
          zabbix-server | ** Table 'zabbix.dbversion' already exists.
          zabbix-server | zabbix_server [1]: ERROR: "JavaGateway" configuration parameter is not specified or empty

          I have disabled the JavaGateway, but the message shows up anyway.

          Testing and hoping on a swift solution ...

          Happy NewYear

          Comment

          • zabbix-peter
            Junior Member
            • Nov 2024
            • 12

            #5
            I solved it with the hint you gave fblank !

            I had to change uncomment all of these:
            ZBX_JAVAGATEWAY_ENABLE=false
            ZBX_JAVAGATEWAY=zabbix-java-gateway
            ZBX_JAVAGATEWAYPORT=10052

            I had only this line ZBX_JAVAGATEWAY_ENABLE=false enabled and the rest disabled, that was not enough.

            Anyways, it works now!

            Comment

            • viruslab
              Junior Member
              • Jul 2024
              • 4

              #6
              Originally posted by zabbix-peter
              I solved it with the hint you gave fblank !

              I had to change uncomment all of these:
              ZBX_JAVAGATEWAY_ENABLE=false
              ZBX_JAVAGATEWAY=zabbix-java-gateway
              ZBX_JAVAGATEWAYPORT=10052

              I had only this line ZBX_JAVAGATEWAY_ENABLE=false enabled and the rest disabled, that was not enough.

              Anyways, it works now!

              Thanks for the advice!
              I had the same thing. And that solution helped me.
              Last edited by viruslab; 28-01-2025, 15:59.

              Comment

              Working...