Ad Widget

Collapse

Postgres database upgrade failed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MuRo
    Junior Member
    • Nov 2022
    • 4

    #1

    Postgres database upgrade failed

    Hi everyone,

    I have a Zabbix server with Docker container and upgraded from version 6.0.4 to 6.4.10 following the procedure

    - stop container
    - remove container
    - start container with previous paameters

    But I receive this error:

    Code:
    Starting Zabbix Server. Zabbix 6.4.10 (revision 4da16fb).
    
    Press Ctrl+C to exit.
    
    
    
    8:20240124:115320.607 Starting Zabbix Server. Zabbix 6.4.10 (revision 4da16fb).
    
    8:20240124:115320.607 ****** Enabled features ******
    
    8:20240124:115320.607 SNMP monitoring: YES
    
    8:20240124:115320.607 IPMI monitoring: YES
    
    8:20240124:115320.607 Web monitoring: YES
    
    8:20240124:115320.608 VMware monitoring: YES
    
    8:20240124:115320.608 SMTP authentication: YES
    
    8:20240124:115320.608 ODBC: YES
    
    8:20240124:115320.608 SSH support: YES
    
    8:20240124:115320.608 IPv6 support: YES
    
    8:20240124:115320.608 TLS support: YES
    
    8:20240124:115320.608 ******************************
    
    8:20240124:115320.608 using configuration file: /etc/zabbix/zabbix_server.conf
    
    8:20240124:115320.724 current database version (mandatory/optional): 06010005/06010005
    
    8:20240124:115320.724 required mandatory version: 06040000
    
    8:20240124:115320.724 mandatory patches were found
    
    8:20240124:115320.728 starting automatic database upgrade
    
    8:20240124:115320.729 [Z3005] query failed: [0] PGRES_FATAL_ERROR:ERROR: relation "userdirectory" already exists
    
    [create table userdirectory (
    
    userdirectoryid bigint not null,
    
    name varchar(128) default '' not null,
    
    description text default '' not null,
    
    host varchar(255) default '' not null,
    
    port integer default '389' not null,
    
    base_dn varchar(255) default '' not null,
    
    bind_dn varchar(255) default '' not null,
    
    bind_password varchar(128) default '' not null,
    
    search_attribute varchar(128) default '' not null,
    
    start_tls integer default '0' not null,
    
    search_filter varchar(255) default '' not null,
    
    primary key (userdirectoryid)
    
    )]
    
    8:20240124:115320.729 database upgrade failed on patch 06010006, exiting in 10 seconds
    
    8:20240124:115330.730 Zabbix Server stopped. Zabbix 6.4.10 (revision 4da16fb).

    The following are the env of my zabbix-server container
    Code:
    env:
    DB_SERVER_HOST: 'postgres'
    DB_SERVER_PORT: '5432'
    DB_SERVER_SCHEMA: 'zabbix-server'
    POSTGRES_DB: 'zabbix-server'
    POSTGRES_USER: 'admin'
    POSTGRES_PASSWORD: '{{POSTGRES_PASSWORD}}'
    ​
    And these are those of the postgres container
    Code:
    env:
    POSTGRES_USER: admin
    POSTGRES_PASSWORD: '{{POSTGRES_PASSWORD}}'
    POSTGRES_DB: zabbix-server
    ZBX_HOSTNAME: "Zabbix server"


    I tried to manual deleting the relation "userdirectory" but without succes.
    Can you help me, please?

    Thanks in advance!​
    Last edited by MuRo; 24-01-2024, 14:29.
Working...