Ad Widget

Collapse

Zabbix server is running: No Localhost: 10051

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LordGraves
    Junior Member
    • Jan 2022
    • 17

    #1

    Zabbix server is running: No Localhost: 10051

    Hi all,

    Just finished my initial install today. Here is what I am using:

    RHEL7.9
    Zabbix 5.0
    Mariadb-Server 5.5.68
    Httpd 2.4.6-97

    Instructions Used: https://www.zabbix.com/download?zabb...ysql&ws=apache
    Only deviation from these instructions came when I had to manually install mariadb

    I was able to get through the frontend setup with no issues. However, on the dashboard, i am seeing that the zabbix server is not running
    • I have verified the service is running using systemctl
    • I currently have SELinux running in permissive mode in order to troubleshoot this issue.
    • The following ports are enabled on firewalld: 10050, 10051, 8080, and 80
    • DB and Zabbix are running on the same server.
    DB=zabbixdb
    User=zabbix

    Ive tried the following based on google research:
    • Changed from DBName=zabbix to DBName=zabbixdb in /etc/zabbix/zabbix_server.conf
    • Compared DB related info between zabbix_server.conf and zabbix.conf.php to make sure they match
    • Uncommented StartTrappers=5 in /etc/zabbix/zabbix_server.conf
    • Added the following to /etc/services:
      • zabbix-agent 10050/tcp # Zabbix Agent
      • zabbix-agent 10050/udp # Zabbix Agent
      • zabbix-trapper 10051/tcp # Zabbix Trapper
      • zabbix-trapper 10051/udp # Zabbix Trapper
    A check in the zabbix-server log shows the following repeating error:
    Zabbix-server log: 2251:20220113:145629.300 [Z3001] connection to database 'zabbixdb' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
    2251:20220113:145629.300 database is down: reconnecting in 10 seconds

    SHOW GRANTS FOR zabbix@localhost
    | GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY PASSWORD '*FD8F10A24C63E05629487D725D19855529EBC0B6' |
    | GRANT ALL PRIVILEGES ON `zabbixdb`.* TO 'zabbix'@'localhost'
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    Originally posted by LordGraves

    RHEL7.9
    Zabbix 5.0
    Mariadb-Server 5.5.68
    Httpd 2.4.6-97
    That's not far off from what I'm using in my work environment. Just keep in mind that although the Zabbix developers provide official packages for RHEL 7 for Zabbix 5.0 LTS, they stopped supporting RHEL 7 as a Zabbix server at 5.2, so you won't (easily) be able to upgrade your RHEL 7 server to Zabbix 6.0 when it comes out in a few days or weeks. RHEL 7 is still supported as a zabbix-client, but server support basically ends with the version you're deploying.

    I'm not trying to steer you away from RHEL (as I said that's what I'm using), just trying to make sure you're aware that you'll have a much easier path forward if you start with RHEL 8, instead.

    Originally posted by LordGraves

    I was able to get through the frontend setup with no issues. However, on the dashboard, i am seeing that the zabbix server is not running
    • I have verified the service is running using systemctl
    • I currently have SELinux running in permissive mode in order to troubleshoot this issue.
    • The following ports are enabled on firewalld: 10050, 10051, 8080, and 80
    • DB and Zabbix are running on the same server.
    DB=zabbixdb
    User=zabbix

    Ive tried the following based on google research:
    • Changed from DBName=zabbix to DBName=zabbixdb in /etc/zabbix/zabbix_server.conf
    • Compared DB related info between zabbix_server.conf and zabbix.conf.php to make sure they match
    • Uncommented StartTrappers=5 in /etc/zabbix/zabbix_server.conf
    • Added the following to /etc/services:
      • zabbix-agent 10050/tcp # Zabbix Agent
      • zabbix-agent 10050/udp # Zabbix Agent
      • zabbix-trapper 10051/tcp # Zabbix Trapper
      • zabbix-trapper 10051/udp # Zabbix Trapper
    A check in the zabbix-server log shows the following repeating error:
    Zabbix-server log: 2251:20220113:145629.300 [Z3001] connection to database 'zabbixdb' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
    2251:20220113:145629.300 database is down: reconnecting in 10 seconds

    SHOW GRANTS FOR zabbix@localhost
    | GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY PASSWORD '*FD8F10A24C63E05629487D725D19855529EBC0B6' |
    | GRANT ALL PRIVILEGES ON `zabbixdb`.* TO 'zabbix'@'localhost'
    Ok, you've done a lot of good debugging and research, you just have a couple of minor things to fix.

    First, your SQL shows that your 'zabbix@localhost' user has a password (which is good!), but your zabbix-server.log shows that your server is trying to connect without a password. That likely means you've failed to set 'DBPassword=your_cleartext_password_here' in /etc/zabbix/zabbix_server.conf. If you do that and restart zabbix-server, that will likely fix up that problem.

    The second issue, the web interface might be related to the first issue (so check to see if it goes away once you have the first issue fixed), but I think it's more likely that it's because you haven't set up something correctly in the front-end's config file. There's a separate 'zabbix.conf.php' file (probably in /usr/share/zabbix/conf/ , but that's just a guess) that needs to have configuration set so that the web component knows how to find the database and the server. The web component does not read /etc/zabbix/zabbix_server.conf.

    Comment

    • LordGraves
      Junior Member
      • Jan 2022
      • 17

      #3
      I just confirmed the password is there, HOWEVER, i did notice that everything is commented out.

      ### Option: DBPassword
      # Database password.
      # Comment this line if no password is used.
      #
      # Mandatory: no
      # Default:
      # DBPassword=ThePasswordGoesHere


      So I uncommented out the DBPassword line, and that seems to have worked!

      You mentioned a second issue. How would it manifest on the UI? What I am seeing now looks pretty darned good.

      Click image for larger version

Name:	Zabbix.PNG.jpg
Views:	18372
Size:	115.2 KB
ID:	438281

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        Originally posted by LordGraves
        You mentioned a second issue. How would it manifest on the UI? What I am seeing now looks pretty darned good.
        I thought you might have missed configuring parts of the front end, based on your problem description, but that turned out to not be the case. It was all related to zabbix-server not being able to connect to the database, which you've now fixed.

        Comment

        • LordGraves
          Junior Member
          • Jan 2022
          • 17

          #5
          You guys are awesome. Super happy with the results. Thanks a LOT, Tim.

          Comment

          Working...