Ad Widget

Collapse

Zabbix-server trying to reach zabbix db as root!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zoroastr
    Junior Member
    • Jan 2014
    • 6

    #1

    Zabbix-server trying to reach zabbix db as root!

    FIXED! ...see reply inline below.

    Hello. Noob here. I'm about to put my foot through the screen (no big deal, flat panel). I'm fairly certain I have everything in place to run z-server under my Arch Linux build. I followed their cookbook and double-checked everything, but for some inexplicable reason, z-server 2.2.1 is still throwing this up in my browser:

    Code:
    Database error: Error connecting to database [Access denied for user 'root'@'localhost' (using password: YES)]
    I KNOW the app is reading /etc/zabbix/zabbix_server.conf--see startup spew below, and the only enabled (uncommented) options are these:

    Code:
    LogFileSize=1024
    DebugLevel=3
    PidFile=/run/zabbix/zabbix_server.pid
    DBHost=localhost
    DBName=zabbix
    DBUser=zabbix
    DBPassword=test
    Startup:

    Code:
    3790:20140122:232651.324 Starting Zabbix Server. Zabbix 2.2.1 (revision 40808).
      3790:20140122:232651.325 ****** Enabled features ******
      3790:20140122:232651.325 SNMP monitoring:           YES
      3790:20140122:232651.325 IPMI monitoring:            NO
      3790:20140122:232651.325 WEB monitoring:            YES
      3790:20140122:232651.325 VMware monitoring:         YES
      3790:20140122:232651.325 Jabber notifications:      YES
      3790:20140122:232651.325 Ez Texting notifications:  YES
      3790:20140122:232651.325 ODBC:                       NO
      3790:20140122:232651.325 SSH2 support:              YES
      3790:20140122:232651.325 IPv6 support:              YES
      3790:20140122:232651.325 ******************************
      3790:20140122:23790:20140122:232651.329 current database version (mandatory/optional): 02020000/02020000
      3790:20140122:232651.329 required mandatory version: 02020000
      3794:20140122:232651.337 server #1 started [configuration syncer #1]
      3795:20140122:232651.337 server #2 started [db watchdog #1]
      3805:20140122:232651.339 server #11 started [trapper #3]
      3808:20140122:232651.339 server #14 started [icmp pinger #1]
      3806:20140122:232651.339 server #12 started [trapper #4]
      3790:20140122:232651.342 server #0 started [main process]
      3810:20140122:232651.342 server #16 started [housekeeper #1]
      3810:20140122:232651.342 executing housekeeper32651.325 using configuration file: /etc/zabbix/zabbix_server.conf
    Database Details:

    Code:
    MariaDB [mysql]> show grants for 'zabbix'@'localhost';
    +---------------------------------------------------------------------------------------------------------------+
    | Grants for zabbix@localhost                                                                                   |
    +---------------------------------------------------------------------------------------------------------------+
    | GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY PASSWORD '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29' |
    | GRANT ALL PRIVILEGES ON `zabbix`.* TO 'zabbix'@'localhost' WITH GRANT OPTION                                  |
    +---------------------------------------------------------------------------------------------------------------+
    2 rows in set (0.00 sec)
    
    
    MariaDB [mysql]> show grants for 'root'@'localhost';
    +----------------------------------------------------------------------------------------------------------------------------------------+
    | Grants for root@localhost                                                                                                              |
    +----------------------------------------------------------------------------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*217BDDD352738C0FCB6E54B0F7EDC8B20C6E5251' WITH GRANT OPTION |
    | GRANT ALL PRIVILEGES ON `zabbix`.* TO 'root'@'localhost' WITH GRANT OPTION                                                             |
    | GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION                                                                           |
    +----------------------------------------------------------------------------------------------------------------------------------------+
    3 rows in set (0.01 sec)
    I've been trying to come up with an explanation for this odd behavior, and I can't. I got the code from the Arch AUR and compiled it with defaults, but even if this was some kind of compile-time config error, the startup log would confirm that the wrong config was being read, right? It gets weirder:
    At one point in my initial setup, I actually finalized the install from the web interface, confirming all the prerequisites. I confirmed I was logged in as the Admin and I starting doing admin stuff. Something must have changed.
    I'm just setting this up on a small home network that I'm getting ready to add a NAS server to. I'm also sort of ignoring the z-agent for the time being, although I have it installed and confirgured.

    ...Any more info I can give? I would greatly appreciate any help on this before I snap and run amok.
    Last edited by zoroastr; 24-01-2014, 02:45. Reason: FIXED
  • pc99096
    Senior Member
    • Oct 2011
    • 193

    #2
    sometimes there is one more zabbix_server.conf somewhere in /usr/local
    try "find / | grep zabbix_server"

    Comment

    • zoroastr
      Junior Member
      • Jan 2014
      • 6

      #3
      Yup...tried that. The only zabbix_server.conf files on the system are these three.
      Very odd. Changes to /etc/zabbix/zabbix_server.conf are definitely reflected in subsequent startups, but you're right, the app behaves as if it's reading another config, despite the fact that the log confirms it's reading the correct one. I'm baffled.
      thx for replying.

      $ sudo find / -type f -name zabbix_server.conf
      /home/.../AUR/zabbix-server-mysql/src/zabbix-2.2.1/conf/zabbix_server.conf
      /home/.../AUR/zabbix-server-mysql/pkg/zabbix-server-mysql/etc/zabbix/zabbix_server.conf
      /etc/zabbix/zabbix_server.conf

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        Try starting Zabbix server process by specifying the conf file in the start string...

        for instance, my Zabbix binary is in /usr/local/sbin and my conf file is in /usr/local/etc
        (And I believe these are the default locations as of some 2.x version or a bit earlier)

        So from /usr/local/sbin I run:
        ./zabbix_server -c /usr/local/etc/zabbix_server.conf

        Comment

        • pc99096
          Senior Member
          • Oct 2011
          • 193

          #5
          oh and 1 more thing:
          check zabbix.conf.php
          usually in /var/www/html/....

          Comment

          • zoroastr
            Junior Member
            • Jan 2014
            • 6

            #6
            YES!!! Thanks so much! It WAS the damned php config file...that's where the 'root' user reference was hiding! Very grateful for the assist!

            Comment

            Working...