Ad Widget

Collapse

zabbix installation error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mah
    Junior Member
    • Mar 2023
    • 13

    #1

    zabbix installation error

    hi,
    I had a problem installing the zabbix, is it possible for you to help me?
    I installed the zabbix 6.4 (proxy) on CentOs 7 with SQLite3, but it gives an error "database is down" and "unable to open database file"
    DBName=/usr/share/zabbix-sql-scripts/sqlite3​​
    Attached Files
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    I think the specification of DBName is wrong. Isn't that path the directory where the scripts for database creation are stored? Set DBName to the path to the database you created using the script. Try creating a database file using the sqlite3 command and setting the path for that file, as the manual says.


    Comment

    • mah
      Junior Member
      • Mar 2023
      • 13

      #3
      Dear Atsudhi Thanks for answer, i changed DBName to /usr/share/zabbix-sql-scripts/sqlite3 but give error "database is down" and "unable to open database file"
      i did cat /usr/share/zabbix-sql-scripts/sqlite3/proxy.sql | sqlite3 zabbix.db, There is both proxy.sql and zabbix.db (See in z2 image)
      Attached Files

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        DBname should point to the file, what is used for DB. Seems you are currently trying to point it to a directory... add a filename (maybe point to some other mountpoint, where you have dedicated room for it)...

        I have never used a script to separately create schema in sqlite3 db... It is created automatically during proxy startup.

        Code:
        9803:20230227:144210.552 Starting Zabbix Proxy (passive) [proxy host]. Zabbix 6.0.13 (revision fdfa8cef9ce).
        9803:20230227:144210.553 **** Enabled features ****
        9803:20230227:144210.553 SNMP monitoring: YES
        9803:20230227:144210.553 IPMI monitoring: YES
        9803:20230227:144210.553 Web monitoring: YES
        9803:20230227:144210.554 VMware monitoring: YES
        9803:20230227:144210.554 ODBC: YES
        9803:20230227:144210.554 SSH support: YES
        9803:20230227:144210.554 IPv6 support: YES
        9803:20230227:144210.554 TLS support: YES
        9803:20230227:144210.554 **************************
        9803:20230227:144210.554 using configuration file:proxy.conf
        9803:20230227:144210.554 cannot open database file "<db file name>": [2] No such file or directory
        9803:20230227:144210.554 creating database ...
        9803:20230227:144210.645 current database version (mandatory/optional): 06000000/06000018
        9803:20230227:144210.645 required mandatory version: 06000000
        ​

        Comment

        • mah
          Junior Member
          • Mar 2023
          • 13

          #5
          Hi Dear cyber,
          I put the name of the DBName as a /usr/share/zabbix-sql-scripts/sqlite3/proxy.sql, it did not work
          I put the name of the DBName as proxy.sql, it did not work
          I put the name of the zabbix.db, it did not work
          I put the name of the zabbix, it did not work
          What else can the name of the database be?

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            Have you tried to set it for example "/tmp/proxy.db" ?

            Comment

            • mah
              Junior Member
              • Mar 2023
              • 13

              #7
              The zabbix database file is located at the root, see z3 image
              but I put the name of the zabbix.db or root/zabbix.db, it did not work
              Attached Files

              Comment

              • Atsushi
                Senior Member
                • Aug 2013
                • 2028

                #8
                Is the proxy running as the zabbix user? Shouldn't the /root directory be accessible by the zabbix user? Try creating a database file with permissions editable by the zabbix user in a directory accessible by the zabbix user.

                Comment

                • mah
                  Junior Member
                  • Mar 2023
                  • 13

                  #9
                  i used below command for create zabbix database:
                  yum install zabbix-proxy-sqlite3 zabbix-selinux-policy zabbix-sql-scripts
                  cat /usr/share/zabbix-sql-scripts/sqlite3/proxy.sql | sqlite3 zabbix.db
                  Can you tell me the commands for creating a database file with permissions editable by the zabbix user?

                  Comment

                  • cyber
                    Senior Member
                    Zabbix Certified SpecialistZabbix Certified Professional
                    • Dec 2006
                    • 4807

                    #10
                    If you really insist on preconfiguring that db ...
                    cat /usr/share/zabbix-sql-scripts/sqlite3/proxy.sql | sqlite3 /tmp/zabbix.db
                    Set DBName in proxy config to /tmp/zabbix.db

                    But as I said, it is enough to set your DBname to a file (with full path), what is acessible and writeable to zabbix user.

                    Comment

                    • mah
                      Junior Member
                      • Mar 2023
                      • 13

                      #11
                      Thank you, I will delete the zabbix and sqlite and install it again

                      Comment

                      Working...