Ad Widget

Collapse

New Install. Database creation error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ascii2k24
    Junior Member
    • Jul 2022
    • 3

    #1

    New Install. Database creation error



    Hello! First time user of Zabbix.

    Trying to populate the database for a fresh install of Zabbix. The user 'zuser' has full privileges on 'zabbix' database


    user@mysql-cl-master:~$ cat server.sql | mysql -u zuser zabbix -p
    Enter password:
    ERROR 3098 (HY000) at line 2504: The table does not comply with the requirements by an external plugin.
    user@mysql-cl-master:~$


    Any suggestions on how I might correct this?
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    What version of Zabbix are you starting with (6.0.6?) and what derivation (MySQL, MariaDB, Percona) and version of the database are you using, and on what OS distro and version?

    Is your database using Group Replication? It seems that there are many examples of the same error for other SQL (not just Zabbix) if certain things are attempted when Group Replication is enabled.

    Comment

    • ascii2k24
      Junior Member
      • Jul 2022
      • 3

      #3
      I am using which ever version of Zabbix I would get when following the install instructions for Ubuntu 22.04. Since I never got past database creation I'm not sure of the exact version. Using MySQL 8.0.29. Yes, I am using Group Replication in a cluster setting. Already stated but using Ubuntu server 22.04. My research found that the error may have something to do with tables not having primary keys. Just thought there may be a solution for this with Zabbix. Thanks for the reply.

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        What's on or near line 2504 of server.sql? Maybe that will lead you for a solution or workaround with your clustering.

        Markku

        Comment

        • tim.mooney
          Senior Member
          • Dec 2012
          • 1427

          #5
          Originally posted by ascii2k24
          I am using which ever version of Zabbix I would get when following the install instructions for Ubuntu 22.04. Since I never got past database creation I'm not sure of the exact version. Using MySQL 8.0.29. Yes, I am using Group Replication in a cluster setting. Already stated but using Ubuntu server 22.04. My research found that the error may have something to do with tables not having primary keys. Just thought there may be a solution for this with Zabbix. Thanks for the reply.
          Prior to Zabbix 6.0, there are a few tables that do not have primary keys (I think it's the history-related tables, but I would have to look at the documentation again to be certain). Most tables did, but a few did not. This caused problems in some environments (probably including environments that are using Group Replication), so Zabbix 6.0's schema added primary keys to those tables. If you start with Zabbix 6.0, all (?) tables have primary keys. However, if you're upgrading from an earlier version, the upgrade process does not automatically add primary keys. That's a post-upgrade step that would have be performed manually (it can take a very long time). That is all covered in the upgrade notes: https://www.zabbix.com/documentation...0#primary-keys

          Since we don't know what version of Zabbix you're trying to install, it's hard to say if the problem you're running into is because you're trying to use an older version that won't work because it doesn't have primary keys on a few tables, or if your issue is something else. If you're starting fresh with 6.0.x, it shouldn't be a primary key issue, because a fresh install of 6.0.x should get primary keys on all tables.



          Comment

          • ascii2k24
            Junior Member
            • Jul 2022
            • 3

            #6
            I found this when searching my system for "zabbix"


            @meerkat:/storage/clusterio$ locate zabbix
            /etc/zabbix
            /etc/apt/sources.list.d/zabbix-agent2-plugins.list
            /etc/apt/sources.list.d/zabbix.list
            /etc/apt/trusted.gpg.d/zabbix-official-repo.gpg
            /etc/init.d/zabbix-agent
            /etc/init.d/zabbix-server
            /etc/logrotate.d/zabbix-agent
            /etc/systemd/system/zabbix-agent.service
            /etc/systemd/system/multi-user.target.wants/zabbix-agent.service
            /etc/zabbix/apache.conf
            /etc/zabbix/zabbix_agentd.conf
            /etc/zabbix/zabbix_server.conf
            /home/xxxx/zabbix-release_6.0-3+ubuntu22.04_all.deb *********************
            /usr/share/doc/zabbix-release
            /usr/share/doc/zabbix-release/README.Debian
            /usr/share/doc/zabbix-release/changelog.Debian
            /usr/share/doc/zabbix-release/copyright
            /var/lib/apache2/conf/disabled_by_admin/zabbix
            /var/lib/apt/lists/repo.zabbix.com_zabbix-agent2-plugins_1_ubuntu_dists_jammy_InRelease
            /var/lib/apt/lists/repo.zabbix.com_zabbix-agent2-plugins_1_ubuntu_dists_jammy_main_binary-amd64_Packages
            /var/lib/apt/lists/repo.zabbix.com_zabbix-agent2-plugins_1_ubuntu_dists_jammy_main_source_Sources
            /var/lib/apt/lists/repo.zabbix.com_zabbix_6.0_ubuntu_dists_jammy_InRe lease
            /var/lib/apt/lists/repo.zabbix.com_zabbix_6.0_ubuntu_dists_jammy_main _binary-amd64_Packages
            /var/lib/apt/lists/repo.zabbix.com_zabbix_6.0_ubuntu_dists_jammy_main _source_Sources
            ------------------------------------------------------------------------------------------


            It looks like ubuntu gave me 6.0.3 ??? If this is correct then the primary key would not be the problem.

            I ran the command again to populate the database. Some how it gave me the same error but a different line number. This time it was 3098. I looked up that line and it was this:

            INSERT INTO `media_type_param` (`mediatype_paramid`,`mediatypeid`,`name`,`value`) values ('568','32','alert_subject','{ALERT.SUBJECT}');


            I dont know why it would fail on this line. This was one of MANY satements that looked very similar.




            Comment

            Working...