Ad Widget

Collapse

After installation cannot configure via web interface

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • simonfb
    Junior Member
    • Jul 2024
    • 5

    #1

    After installation cannot configure via web interface

    I found a very similar thread, but it did not resolve my issue.
    After installation of Zabbix, opening the web page to configure it fails on the "Configure DB Connection" page.
    It says "Cannot connect to the database" and "Unable to select configuration"

    Details of the installation are as follows:
    Code:
    installed from
    zabbix-release_7.0-2+debian12_all.deb
    
    uname -a
    Linux hostname 6.8.11-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.8.11-1kali2 (2024-05-30) x86_64 GNU/Linux
    
    mysql --version
    mysql Ver 15.1 Distrib 10.11.8-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
    (note: looking at the files for mysql, all the mysql binaries appear to actually just be sym links to the mariadb binaries, I assume that is what the installation process does?)
    
    apache2 --version
    [Thu Jul 18 12:54:48.940825 2024] [core:warn] [pid 39066] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
    apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
    (note: despite the error above, apache appears to be working and all the configureations mentioned are set correctly in the apache files.)

    Based on questions asked on other threads, this further information may assist:
    Code:
    I can successfully log into mysql/mariadb as root, using the password I configures, and I can successfully log in as zabbix, using the password configured for that.
    
    sudo mysql -uroot -p
    
    MariaDB [(none)]> show databases;
    +--------------------+
    | Database |
    +--------------------+
    | information_schema |
    | mysql |
    | performance_schema |
    | sys |
    | zabbix |
    +--------------------+
    5 rows in set (0.000 sec)
    ​
    
    mysql -uzabbix -p zabbix
    
    MariaDB [zabbix]> select * from users;
    Empty set (0.001 sec)
    
    ​
    MariaDB [zabbix]> show tables;
    +----------------------------+
    | Tables_in_zabbix           |
    +----------------------------+
    | acknowledges               |
    | actions                    |
         ....
    | widget_field               |
    +----------------------------+
    203 rows in set (0.002 sec)
    
    
    grep DBPassword /etc/zabbix/zabbix_server.conf
    ### Option: DBPassword
    DBPassword=password
    
    MariaDB [zabbix]> show grants;
    +---------------------------------------------------------------------------------------------------------------+
    | Grants for zabbix@localhost                                                                                   |
    +---------------------------------------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO `zabbix`@`localhost` IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' |
    | GRANT ALL PRIVILEGES ON `zabbix`.* TO `zabbix`@`localhost`                                                    |
    +---------------------------------------------------------------------------------------------------------------+
    2 rows in set (0.000 sec)
    
    
    dpkg-query -l | grep zabbix
    ii  zabbix-agent                                   1:7.0.0+dfsg-2                           amd64        network monitoring solution - agent
    ii  zabbix-apache-conf                             1:7.0.0-1+debian12                       all          Zabbix network monitoring solution - apache configuration for front-end
    ii  zabbix-frontend-php                            1:7.0.0+dfsg-2                           all          network monitoring solution - PHP front-end
    ii  zabbix-release                                 1:7.0-2+debian12                         all          Zabbix official repository configuration
    ii  zabbix-sender                                  1:7.0.0+dfsg-2                           amd64        Zabbix network monitoring solution - sender
    ii  zabbix-server-mysql                            1:7.0.0+dfsg-2                           amd64        network monitoring solution - server (using MySQL)
    ii  zabbix-sql-scripts                             1:7.0.0-1+debian12                       all          Zabbix network monitoring solution - sql-scripts
    ​
    
    tail /var/log/zabbix-server/zabbix_server.log
     18695:20240718:121343.060 Web monitoring:            YES
     18695:20240718:121343.060 VMware monitoring:         YES
     18695:20240718:121343.060 SMTP authentication:       YES
     18695:20240718:121343.060 ODBC:                      YES
     18695:20240718:121343.060 SSH support:               YES
     18695:20240718:121343.060 IPv6 support:              YES
     18695:20240718:121343.060 TLS support:               YES
     18695:20240718:121343.060 ******************************
     18695:20240718:121343.060 using configuration file: /etc/zabbix/zabbix_server.conf
     18695:20240718:121343.064 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
  • alif.a
    Junior Member
    • Jul 2024
    • 1

    #2
    Hi, can you teach me how post something in Zabbix forum

    Comment

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

      #3
      Your Zabbix packages look messed up, there are both Debian-based and Zabbix-based packages. I'd recommend this kind of operation:

      sudo apt purge zabbix\*
      wget <the zabbix 7.0 release deb from Zabbix>
      sudo dpkg -i <the deb file>
      sudo apt update
      sudo apt install zabbix-server-mysql <and other packages needed>


      Also follow the install steps, including importing the Zabbix SQL schema.

      Markku

      Comment

      • simonfb
        Junior Member
        • Jul 2024
        • 5

        #4
        Thanks for the suggestion, tried it, followed installation guide as per https://www.zabbix.com/download?zabb...ysql&ws=apache but still end up in the same state.

        Comment

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

          #5
          Oh, you seem to be using Kali and not Debian, so I don't know how to fix the broken package installation then. Asking anyway: did you let the sql script to run all the way through? It may take some moment.

          Markku

          Comment

          • simonfb
            Junior Member
            • Jul 2024
            • 5

            #6
            HI, yes, it all ran cleanly with plenty of time.
            The last line in the log file:
            18695:20240718:121343.064 cannot use database "zabbix": its "users" table is empty (is this the Zabbix proxy database?)
            might be the problem.
            I'm not really a database type, I thought the installation process created the users - is there a manual way to populate the users table in the zabbix database?
            Willing to give anything a try, worst case scenario I wipe the machine and reinstall.
            Cheers.

            Comment

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

              #7
              Well, I have installed Zabbix tens of times during years (with the instructions in the Download page) and every time it has worked and no errors about database contents in Zabbix server, so I have no idea what you (or Kali) are doing differently. I can only recommend using an officially supported Linux distro and following the instructions.

              Markku

              Comment

              • simonfb
                Junior Member
                • Jul 2024
                • 5

                #8
                As suggested, I have installed on Ubuntu, but am seeing the exact same result. I am following the instructions from the Zabbix web site.

                As per previous message, the log file records that the users table in the zabbix database is empty, and I can see that it is.

                What should have populated this table, what with, and can I just manually insert the data?

                If anyone has any suggestions I would be grateful.

                Comment

                • simonfb
                  Junior Member
                  • Jul 2024
                  • 5

                  #9
                  OK, that seems to have allowed me to complete the installation and the setup.

                  Reviewing your instructions and the original set, the only difference is the apostrophes around 'zabbix' and 'localhost' that are not there in the onlines instructions.

                  Could it be that simple?
                  Will try my Kali server again later and see if it works there.

                  Thank You

                  Comment

                  Working...