Ad Widget

Collapse

Zabbix server is running NO

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Razoon
    Junior Member
    • Feb 2019
    • 9

    #1

    Zabbix server is running NO

    Всем привет, установил себе забикс на raspberrypi 3 и столкнулся с двумя проблемами.
    Первая при входе на вебморду пишет 403 ошибку nginx лечится входом по http://192.168.2.20/zabbix/zabbix.php тогда открывается панель управления.
    Вторая
    Zabbix server is running No localhost:10051
    по телнету на 10051 забикс не отвечает, хотя
    root@raspberrypi:~# service zabbix-server status
    ● zabbix-server.service - Zabbix Server
    Loaded: loaded (/etc/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
    Active: active (exited) since Tue 2019-02-19 17:09:55 GMT; 11min ago
    Process: 761 ExecStart=/usr/local/sbin/zabbix_server -c /usr/local/etc/zabbix_server.conf (code=exited, status=0/SUCCESS)
    Main PID: 761 (code=exited, status=0/SUCCESS)
    CGroup: /system.slice/zabbix-server.service
    └─763 /usr/local/sbin/zabbix_server -c /usr/local/etc/zabbix_server.conf

    Feb 19 17:09:55 raspberrypi systemd[1]: Starting Zabbix Server...
    Feb 19 17:09:55 raspberrypi systemd[1]: Started Zabbix Server.
    root@raspberrypi:~# uname -a
    Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux

    Куда копать?
  • Razoon
    Junior Member
    • Feb 2019
    • 9

    #2
    Админ, удали пожалуйста старую тему, она глючная и не открывается

    Comment

    • kulpin
      Junior Member
      • Nov 2018
      • 18

      #3
      В логах сервера что-то есть? /var/log/zabbix/zabbix_server.log

      Comment

      • Razoon
        Junior Member
        • Feb 2019
        • 9

        #4
        Originally posted by kulpin
        В логах сервера что-то есть? /var/log/zabbix/zabbix_server.log
        Вообще нету такой папки.

        Comment

        • kulpin
          Junior Member
          • Nov 2018
          • 18

          #5
          Странное место для конф файла... Он вообще там есть? /usr/local/etc/zabbix_server.conf

          Comment

          • Razoon
            Junior Member
            • Feb 2019
            • 9

            #6
            Originally posted by kulpin
            В логах сервера что-то есть? /var/log/zabbix/zabbix_server.log
            в tmp/zabbix_server.log вот это

            763:20190220:130234.436 cannot set MySQL character set to "utf8"
            763:20190220:130234.436 database is down: reconnecting in 10 seconds
            763:20190220:130244.438 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130244.438 cannot set MySQL character set to "utf8"
            763:20190220:130244.438 database is down: reconnecting in 10 seconds
            763:20190220:130254.439 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130254.439 cannot set MySQL character set to "utf8"
            763:20190220:130254.439 database is down: reconnecting in 10 seconds
            763:20190220:130304.440 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130304.441 cannot set MySQL character set to "utf8"
            763:20190220:130304.441 database is down: reconnecting in 10 seconds
            763:20190220:130314.442 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130314.442 cannot set MySQL character set to "utf8"
            763:20190220:130314.442 database is down: reconnecting in 10 seconds
            763:20190220:130324.443 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130324.443 cannot set MySQL character set to "utf8"
            763:20190220:130324.443 database is down: reconnecting in 10 seconds
            763:20190220:130334.444 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130334.444 cannot set MySQL character set to "utf8"
            763:20190220:130334.445 database is down: reconnecting in 10 seconds
            763:20190220:130344.446 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130344.446 cannot set MySQL character set to "utf8"
            763:20190220:130344.446 database is down: reconnecting in 10 seconds
            763:20190220:130354.447 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130354.447 cannot set MySQL character set to "utf8"
            763:20190220:130354.447 database is down: reconnecting in 10 seconds
            763:20190220:130404.448 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130404.449 cannot set MySQL character set to "utf8"
            763:20190220:130404.449 database is down: reconnecting in 10 seconds
            763:20190220:130414.450 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130414.450 cannot set MySQL character set to "utf8"
            763:20190220:130414.450 database is down: reconnecting in 10 seconds
            763:20190220:130424.451 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130424.451 cannot set MySQL character set to "utf8"
            763:20190220:130424.451 database is down: reconnecting in 10 seconds
            763:20190220:130434.452 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130434.452 cannot set MySQL character set to "utf8"
            763:20190220:130434.452 database is down: reconnecting in 10 seconds
            763:20190220:130444.454 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130444.454 cannot set MySQL character set to "utf8"
            763:20190220:130444.454 database is down: reconnecting in 10 seconds
            763:20190220:130454.455 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130454.455 cannot set MySQL character set to "utf8"
            763:20190220:130454.455 database is down: reconnecting in 10 seconds
            763:20190220:130504.457 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130504.457 cannot set MySQL character set to "utf8"
            763:20190220:130504.457 database is down: reconnecting in 10 seconds
            763:20190220:130514.458 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130514.458 cannot set MySQL character set to "utf8"
            763:20190220:130514.458 database is down: reconnecting in 10 seconds
            763:20190220:130524.459 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130524.459 cannot set MySQL character set to "utf8"
            763:20190220:130524.459 database is down: reconnecting in 10 seconds
            763:20190220:130534.460 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130534.460 cannot set MySQL character set to "utf8"
            763:20190220:130534.460 database is down: reconnecting in 10 seconds
            763:20190220:130544.462 [Z3001] connection to database 'localhost' failed: [1044] Access denied for user 'zabbix'@'localhost' to database 'localhost'
            763:20190220:130544.462 cannot set MySQL character set to "utf8"

            Comment

            • kulpin
              Junior Member
              • Nov 2018
              • 18

              #7
              А с mysql что? Он живой?

              Comment

              • Razoon
                Junior Member
                • Feb 2019
                • 9

                #8
                Originally posted by kulpin
                А с mysql что? Он живой?
                service mysql status
                ● mariadb.service - MariaDB 10.1.37 database server
                Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
                Active: active (running) since Tue 2019-02-19 17:09:55 GMT; 1 day 1h ago
                Docs: man:mysqld(8)
                A comprehensive guide to managing MariaDB with systemd, including unit file customization, startup timeouts, and handling multiple instances.

                Process: 757 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
                Process: 716 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
                Process: 447 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
                Process: 436 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
                Process: 408 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
                Main PID: 532 (mysqld)
                Status: "Taking your SQL requests now..."
                CGroup: /system.slice/mariadb.service
                └─532 /usr/sbin/mysqld

                Feb 19 17:09:49 raspberrypi systemd[1]: Starting MariaDB 10.1.37 database server...
                Feb 19 17:09:52 raspberrypi mysqld[532]: 2019-02-19 17:09:52 1995910960 [Note] /usr/sbin/mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 532 ...
                Feb 19 17:09:55 raspberrypi systemd[1]: Started MariaDB 10.1.37 database server.

                Comment

                • kulpin
                  Junior Member
                  • Nov 2018
                  • 18

                  #9
                  В conf файле настройки сделаны насчет базы? conf файл вообще настраивался?

                  Comment

                  • kulpin
                    Junior Member
                    • Nov 2018
                    • 18

                    #10
                    База создана? Судя по логам заббикс пытается обратится к базе localhost, что странно

                    Comment

                    • Razoon
                      Junior Member
                      • Feb 2019
                      • 9

                      #11
                      Originally posted by kulpin
                      В conf файле настройки сделаны насчет базы? conf файл вообще настраивался?
                      <?php
                      // Zabbix GUI configuration file.
                      global $DB;

                      $DB['TYPE'] = 'MYSQL';
                      $DB['SERVER'] = 'localhost';
                      $DB['PORT'] = '0';
                      $DB['DATABASE'] = 'zabbix';
                      $DB['USER'] = 'zabbix';
                      $DB['PASSWORD'] = 'zabbix';

                      // Schema name. Used for IBM DB2 and PostgreSQL.
                      $DB['SCHEMA'] = '';

                      $ZBX_SERVER = 'localhost';
                      $ZBX_SERVER_PORT = '10051';
                      $ZBX_SERVER_NAME = 'zabbix';

                      $IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;

                      Comment

                      • Razoon
                        Junior Member
                        • Feb 2019
                        • 9

                        #12
                        Originally posted by kulpin
                        База создана? Судя по логам заббикс пытается обратится к базе localhost, что странно
                        mysql -uroot -p$MYSQL_ROOT_PASSWORD << EOF CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin; GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY 'zabbix'; EOF mysql -uzabbix -pzabbix zabbix < database/mysql/schema.sql mysql -uzabbix -pzabbix zabbix < database/mysql/images.sql mysql -uzabbix -pzabbix zabbix < database/mysql/data.sql

                        Comment

                        • kulpin
                          Junior Member
                          • Nov 2018
                          • 18

                          #13
                          Это не conf файл. См. https://www.zabbix.com/documentation.../debian_ubuntu
                          Там и про малинку появилось

                          Comment

                          • Razoon
                            Junior Member
                            • Feb 2019
                            • 9

                            #14
                            Originally posted by kulpin
                            Это не conf файл. См. https://www.zabbix.com/documentation.../debian_ubuntu
                            Там и про малинку появилось
                            LogFile=/tmp/zabbix_server.log
                            DBName=localhost
                            DBUser=zabbix
                            DBPassword=zabbix
                            Timeout=4

                            ### Option: TrapperTimeout
                            # Specifies how many seconds trapper may spend processing new data.
                            #
                            # Mandatory: no
                            # Range: 1-300
                            # Default:
                            # TrapperTimeout=300

                            ### Option: UnreachablePeriod
                            # After how many seconds of unreachability treat a host as unavailable.
                            #
                            # Mandatory: no
                            # Range: 1-3600
                            # Default:
                            # UnreachablePeriod=45

                            ### Option: UnavailableDelay
                            # How often host is checked for availability during the unavailability period, in seconds.
                            #
                            # Mandatory: no
                            # Range: 1-3600
                            # Default:
                            # UnavailableDelay=60

                            ### Option: UnreachableDelay
                            # How often host is checked for availability during the unreachability period, in seconds.
                            #
                            # Mandatory: no
                            # Range: 1-3600
                            # Default:
                            # UnreachableDelay=15

                            ### Option: AlertScriptsPath
                            # Full path to location of custom alert scripts.
                            # Default depends on compilation options.
                            #
                            # Mandatory: no
                            # Default:
                            # AlertScriptsPath=${datadir}/zabbix/alertscripts

                            ### Option: ExternalScripts
                            # Full path to location of external scripts.
                            # Default depends on compilation options.
                            #
                            # Mandatory: no
                            # Default:
                            # ExternalScripts=${datadir}/zabbix/externalscripts

                            ### Option: FpingLocation
                            # Location of fping.
                            # Make sure that fping binary has root ownership and SUID flag set.
                            #

                            Comment

                            • kulpin
                              Junior Member
                              • Nov 2018
                              • 18

                              #15
                              Originally posted by Razoon

                              LogFile=/tmp/zabbix_server.log
                              DBName=localhost
                              DBUser=zabbix
                              DBPassword=zabbix
                              Timeout=4
                              БД zabbix создаете, а в конфе к базе localhost говорите ходить, как-то не сходиться

                              Comment

                              Working...