ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    need help with Zabbix server

    IT Discussion
    centos zabbix monitoring
    9
    62
    19.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Mike DavisM
      Mike Davis @coliver
      last edited by

      @coliver I think % is the wildcard from what I read. Not good practice, but I was trying to get it working.

      coliverC 1 Reply Last reply Reply Quote 1
      • coliverC
        coliver @Mike Davis
        last edited by

        @Mike-Davis said in need help with Zabbix server:

        @coliver I think % is the wildcard from what I read. Not good practice, but I was trying to get it working.

        Ah, that makes sense. So that should work.

        1 Reply Last reply Reply Quote 0
        • dafyreD
          dafyre
          last edited by

          You can also attempt to log in from the CLI from the Zabbix server...

          mysql -u zabbix -p -h ip.add.14.212
          

          And see if it lets you connect.

          1 Reply Last reply Reply Quote 0
          • Mike DavisM
            Mike Davis
            last edited by

            sudo mysql -u zabbix -p -h xx.xx.14.212​
            Enter password:
            ERROR 2005 (HY000): Unknown MySQL server host 'xx.xx.14.212​' (0)

            DustinB3403D dafyreD 2 Replies Last reply Reply Quote 0
            • DustinB3403D
              DustinB3403 @Mike Davis
              last edited by DustinB3403

              @Mike-Davis said in need help with Zabbix server:

              sudo mysql -u zabbix -p -h xx.xx.14.212​
              Enter password:
              ERROR 2005 (HY000): Unknown MySQL server host 'xx.xx.14.212​' (0)

              Enter in your servers' IP address not the literal "xx.xx.14.212"

              1 Reply Last reply Reply Quote 0
              • Mike DavisM
                Mike Davis
                last edited by

                I did enter the real IP address.

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • DustinB3403D
                  DustinB3403
                  last edited by

                  Did you fill in the user password?

                  1 Reply Last reply Reply Quote 0
                  • coliverC
                    coliver
                    last edited by

                    I wonder if Firewalld is blocking this. Zabbix should really be using 'zabbix'@'localhost' instead of the IP address.

                    1 Reply Last reply Reply Quote 0
                    • dafyreD
                      dafyre @Mike Davis
                      last edited by

                      @Mike-Davis said in need help with Zabbix server:

                      sudo mysql -u zabbix -p -h xx.xx.14.212​
                      Enter password:
                      ERROR 2005 (HY000): Unknown MySQL server host 'xx.xx.14.212​' (0)

                      I'm assuming that this mysql server is not on the same server as Zabbix?

                      So check your firewall, and check /etc/mysql/my.cnf and make sure that it's set to listen on the IP address and not 127.0.0.1.

                      1 Reply Last reply Reply Quote 0
                      • DustinB3403D
                        DustinB3403
                        last edited by

                        I just tested this on my zabbix system and got

                        0_1476976272132_XenCenterMain_2016-10-20_11-10-46.png

                        He received 2005

                        1 Reply Last reply Reply Quote 0
                        • Mike DavisM
                          Mike Davis
                          last edited by

                          it is on the same server.
                          I just edited:
                          sudo ​vi /etc/zabbix/zabbix_server.conf
                          and set :
                          DBhost=​localhost

                          dafyreD 1 Reply Last reply Reply Quote 0
                          • dafyreD
                            dafyre @Mike Davis
                            last edited by

                            @Mike-Davis said in need help with Zabbix server:

                            it is on the same server.
                            I just edited:
                            sudo ​vi /etc/zabbix/zabbix_server.conf
                            and set :
                            DBhost=​localhost

                            Then go back and run the Grant commands again, adjusting the IP accordingly.

                            1 Reply Last reply Reply Quote 0
                            • DustinB3403D
                              DustinB3403
                              last edited by

                              It looks like this was a housekeeper / permissions issue.

                              It was resolved several years ago, so I'm guessing permissions.

                              1 Reply Last reply Reply Quote 0
                              • Mike DavisM
                                Mike Davis
                                last edited by

                                sudo ​mysql -u zabbix -p -h localhost
                                Enter password:
                                ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)

                                scottalanmillerS 1 Reply Last reply Reply Quote 0
                                • scottalanmillerS
                                  scottalanmiller @Mike Davis
                                  last edited by

                                  @Mike-Davis said in need help with Zabbix server:

                                  I did enter the real IP address.

                                  Should be 127.0.0.1

                                  1 Reply Last reply Reply Quote 0
                                  • scottalanmillerS
                                    scottalanmiller @Mike Davis
                                    last edited by

                                    @Mike-Davis said in need help with Zabbix server:

                                    sudo ​mysql -u zabbix -p -h localhost
                                    Enter password:
                                    ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: YES)

                                    Need to grant permissions to the correct user. You have two overlapping users created in that database. Remove them both and start over ONLY with the localhost one.

                                    Mike DavisM 1 Reply Last reply Reply Quote 2
                                    • DustinB3403D
                                      DustinB3403
                                      last edited by

                                      Can you confirm the running services against what I have here.

                                      0_1476976649795_putty_2016-10-20_11-17-07.png

                                      1 Reply Last reply Reply Quote 0
                                      • Mike DavisM
                                        Mike Davis @scottalanmiller
                                        last edited by Mike Davis

                                        @scottalanmiller
                                        since I have 3 accounts, I tried:

                                        MariaDB [(none)]> drop user zabbix;
                                        Query OK, 0 rows affected (0.00 sec)

                                        MariaDB [(none)]> select user, host from mysql.user;
                                        +--------+--------------------+
                                        | user | host |
                                        +--------+--------------------+
                                        | root | 127.0.0.1 |
                                        | root | ::1 |
                                        | root | localhost |
                                        | zabbix | localhost |
                                        | zabbix | ​xx.xx.14.212​ |
                                        +--------+--------------------+
                                        5 rows in set (0.00 sec)

                                        MariaDB [(none)]> drop user zabbix@localhost;
                                        Query OK, 0 rows affected (0.00 sec)

                                        MariaDB [(none)]> select user, host from mysql.user;
                                        +--------+--------------------+
                                        | user | host |
                                        +--------+--------------------+
                                        | root | 127.0.0.1 |
                                        | root | ::1 |
                                        | root | localhost |
                                        | zabbix | xx.xx.14.212​ |
                                        +--------+--------------------+
                                        4 rows in set (0.00 sec)

                                        MariaDB [(none)]> drop user [email protected]​;
                                        ERROR 1396 (HY000): Operation DROP USER failed for 'zabbix'@'xx.xx.14.212​'
                                        MariaDB [(none)]> select user, host from mysql.user;
                                        +--------+--------------------+
                                        | user | host |
                                        +--------+--------------------+
                                        | root | 127.0.0.1 |
                                        | root | ::1 |
                                        | root | localhost |
                                        | zabbix | ​xx.xx.14.212​ |
                                        +--------+--------------------+
                                        4 rows in set (0.00 sec)

                                        MariaDB [(none)]> drop user 'zabbix'@'xx.xx.14.212​';
                                        ERROR 1396 (HY000): Operation DROP USER failed for 'zabbix'@'xx.xx.14.212​'

                                        Can't seem to delete the last one.

                                        1 Reply Last reply Reply Quote 0
                                        • DustinB3403D
                                          DustinB3403
                                          last edited by

                                          Here is a report (2007) of the syntax to be used to provide access to the database for a user.

                                          Mike DavisM 1 Reply Last reply Reply Quote 0
                                          • Mike DavisM
                                            Mike Davis @DustinB3403
                                            last edited by

                                            to delete the last account, it didn't like that I specified the host, even though it was listed. I did:
                                            delete from mysql.user where user='zabbix' ;

                                            and that took.

                                            now I just have the user zabbix@localhost

                                            I restarted services and in the log I'm getting:
                                            1141:20161020:154817.079 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
                                            1141:20161020:154817.086 database is down: reconnecting in 10 seconds
                                            1141:20161020:154827.330 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: YES)

                                            travisdh1T scottalanmillerS 3 Replies Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post