Ad Widget

Collapse

error in zabbix installation. need urgent help.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nafeeskhan
    Junior Member
    • Dec 2022
    • 2

    #1

    error in zabbix installation. need urgent help.

    I was installing zabbix 6.2 at oracle linux 9 and got this error in zcat command
    zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysq l --default-character-set=utf8mb4 -uzabbix -p zabbix
    Enter password:
    ERROR 1050 (42S01) at line 1: Table 'role' already exists


    I am showing zabbix server status. and in the end show the zabbix logs.

    $ systemctl status zabbix-server.service
    ● zabbix-server.service - Zabbix Server
    Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; enabled; vendor preset: disabled)
    Active: activating (auto-restart) (Result: protocol) since Tue 2022-12-13 12:06:19 PKT; 4s ago
    Process: 111647 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
    CPU: 20ms​



    tail -f /var/log/zabbix/zabbix_server.log
    111705:20221213:120945.059 Web monitoring: YES
    111705:20221213:120945.059 VMware monitoring: YES
    111705:20221213:120945.059 SMTP authentication: YES
    111705:20221213:120945.059 ODBC: YES
    111705:20221213:120945.059 SSH support: YES
    111705:20221213:120945.059 IPv6 support: YES
    111705:20221213:120945.059 TLS support: YES
    111705:20221213:120945.059 ******************************
    111705:20221213:120945.059 using configuration file: /etc/zabbix/zabbix_server.conf
    111705:20221213:120945.061 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
    111715:20221213:120957.308 Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
    111715:20221213:120957.308 ****** Enabled features ******
    111715:20221213:120957.308 SNMP monitoring: YES
    111715:20221213:120957.308 IPMI monitoring: YES
    111715:20221213:120957.308 Web monitoring: YES
    111715:20221213:120957.308 VMware monitoring: YES
    111715:20221213:120957.308 SMTP authentication: YES
    111715:20221213:120957.308 ODBC: YES
    111715:20221213:120957.308 SSH support: YES
    111715:20221213:120957.308 IPv6 support: YES
    111715:20221213:120957.308 TLS support: YES
    111715:20221213:120957.308 ******************************
    111715:20221213:120957.308 using configuration file: /etc/zabbix/zabbix_server.conf
    111715:20221213:120957.310 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
    111719:20221213:121009.362 Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
    111719:20221213:121009.362 ****** Enabled features ******
    111719:20221213:121009.362 SNMP monitoring: YES
    111719:20221213:121009.362 IPMI monitoring: YES
    111719:20221213:121009.362 Web monitoring: YES
    111719:20221213:121009.362 VMware monitoring: YES
    111719:20221213:121009.362 SMTP authentication: YES
    111719:20221213:121009.362 ODBC: YES
    111719:20221213:121009.362 SSH support: YES
    111719:20221213:121009.362 IPv6 support: YES
    111719:20221213:121009.362 TLS support: YES
    111719:20221213:121009.362 ******************************
    111719:20221213:121009.362 using configuration file: /etc/zabbix/zabbix_server.conf
    111719:20221213:121009.364 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
    111722:20221213:121021.556 Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
    111722:20221213:121021.556 ****** Enabled features ******
    111722:20221213:121021.556 SNMP monitoring: YES
    111722:20221213:121021.556 IPMI monitoring: YES
    111722:20221213:121021.556 Web monitoring: YES
    111722:20221213:121021.556 VMware monitoring: YES
    111722:20221213:121021.556 SMTP authentication: YES
    111722:20221213:121021.556 ODBC: YES
    111722:20221213:121021.556 SSH support: YES
    111722:20221213:121021.556 IPv6 support: YES
    111722:20221213:121021.556 TLS support: YES
    111722:20221213:121021.556 ******************************
    111722:20221213:121021.556 using configuration file: /etc/zabbix/zabbix_server.conf
    111722:20221213:121021.559 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
    111725:20221213:121033.808 Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
    111725:20221213:121033.808 ****** Enabled features ******
    111725:20221213:121033.808 SNMP monitoring: YES
    111725:20221213:121033.808 IPMI monitoring: YES
    111725:20221213:121033.808 Web monitoring: YES
    111725:20221213:121033.808 VMware monitoring: YES
    111725:20221213:121033.808 SMTP authentication: YES
    111725:20221213:121033.808 ODBC: YES
    111725:20221213:121033.808 SSH support: YES
    111725:20221213:121033.808 IPv6 support: YES
    111725:20221213:121033.808 TLS support: YES
    111725:20221213:121033.808 ******************************
    111725:20221213:121033.808 using configuration file: /etc/zabbix/zabbix_server.conf
    111725:20221213:121033.810 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
    111728:20221213:121046.057 Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).
    111728:20221213:121046.057 ****** Enabled features ******
    111728:20221213:121046.057 SNMP monitoring: YES
    111728:20221213:121046.057 IPMI monitoring: YES
    111728:20221213:121046.058 Web monitoring: YES
    111728:20221213:121046.058 VMware monitoring: YES
    111728:20221213:121046.058 SMTP authentication: YES
    111728:20221213:121046.058 ODBC: YES
    111728:20221213:121046.058 SSH support: YES
    111728:20221213:121046.058 IPv6 support: YES
    111728:20221213:121046.058 TLS support: YES
    111728:20221213:121046.058 ******************************
    111728:20221213:121046.058 using configuration file: /etc/zabbix/zabbix_server.conf
    111728:20221213:121046.060 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
    111731:20221213:121058.307 Starting Zabbix Server. Zabbix 6.2.6 (revision 6981d8b729a).

    NOW I want to resolve my issue. plz help.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    The table is created, but it seems that the data is not registered. Wasn't an error output when you first registered the initial data? Please try recreating the database.

    Comment

    • nafeeskhan
      Junior Member
      • Dec 2022
      • 2

      #3
      Originally posted by Atsushi
      The table is created, but it seems that the data is not registered. Wasn't an error output when you first registered the initial data? Please try recreating the database.
      Yes want help in recreating database. as I have no proper knowledge of database.
      tried executing the command again and it gives error

      zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysq l --default-character-set=utf8mb4 -uzabbix -p zabbix
      Enter password:
      ERROR 1050 (42S01) at line 1: Table 'role' already exists

      Comment

      • Atsushi
        Senior Member
        • Aug 2013
        • 2028

        #4
        Delete the database with the drop database command, and then create the database again with the create database command.

        ex.
        Code:
        # mysql -uroot -p
        password
        mysql> drop database zabbix;
        mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
        mysql> set global log_bin_trust_function_creators = 1;
        mysql> quit;​

        Comment

        Working...