Ad Widget

Collapse

Servidor Zabbix no se está ejecutandp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rbngv
    Junior Member
    • Dec 2023
    • 20

    #1

    Servidor Zabbix no se está ejecutandp

    Buenos días,

    Tengo un problema de que no recibo ninguna información de mi agente de prueba.

    y el servidor siempre está en este estado:

    Click image for larger version

Name:	image.png
Views:	3528
Size:	12.4 KB
ID:	476399
    tengo estos puertos abiertos en el servidor, la ip que debería oír es 192.168.1.8.
    Click image for larger version

Name:	image.png
Views:	3335
Size:	23.6 KB
ID:	476400​
    Lo tengo montado en una maquina virtual Vmware linux server ubuntu IP 192.168.72.132. En el panel Zabbix no aparece información en los gráficos.

    Puedo añadir el host a mano, no se enlaza automáticamente y no recibo información de él pero si aparece activo.
    Click image for larger version

Name:	image.png
Views:	3442
Size:	17.6 KB
ID:	476402​​


    ​¿Alguien sabe la razón?

    Gracias de ante mano y un saludo.
    Attached Files
  • solution
    Senior Member
    • Jun 2020
    • 272

    #2
    Compruebe si el servicio zabbix_server se está ejecutando.
    systemctl status zabbix_server

    Y el log zabbix_server:
    var/log/zabbix/zabbix_server.log

    Wellington​

    Comment


    • Lucio.Gr
      Lucio.Gr commented
      Editing a comment
      buenos días! yo tengo el mismo problema. y cuando pongo systemctl status zabbix_server me devuelve>> "Unit zabbix_server.service coul not be found." por qué será?

    • Lucio.Gr
      Lucio.Gr commented
      Editing a comment
      cuando pongo "var/log/zabbix/zabbix_server.log" me devuelve " bash: var/log/zabbix/zabbix_server.log: no such file or directory"

    • markfree
      markfree commented
      Editing a comment
      Lucio.Gr, prueba "systemctl status zabbix-server" (con guión [ - ]) para comprobar el estado del Zabbix Server.
      Y "less /var/log/zabbix/zabbix_server.log" (con una barra [ / ] ) para ver el log.
      Si tiene dificultades, intente abrir otro tópico en el foro describiendo su problema específico.
  • Rbngv
    Junior Member
    • Dec 2023
    • 20

    #3
    Originally posted by solution
    Compruebe si el servicio zabbix_server se está ejecutando.
    systemctl status zabbix_server

    Y el log zabbix_server:
    var/log/zabbix/zabbix_server.log

    Wellington​
    Gracias por contestar.

    Este es el log del servidor:

    28456:20231226:151656.445 Starting Zabbix Server. Zabbix 6.4.10 (revision 4da16fb82f5).
    28456:20231226:151656.445 ****** Enabled features ******
    28456:20231226:151656.445 SNMP monitoring: YES
    28456:20231226:151656.445 IPMI monitoring: YES
    28456:20231226:151656.445 Web monitoring: YES
    28456:20231226:151656.445 VMware monitoring: YES
    28456:20231226:151656.445 SMTP authentication: YES
    28456:20231226:151656.445 ODBC: YES
    28456:20231226:151656.445 SSH support: YES
    28456:20231226:151656.445 IPv6 support: YES
    28456:20231226:151656.445 TLS support: YES
    28456:20231226:151656.445 ******************************
    28456:20231226:151656.445 using configuration file: /etc/zabbix/zabbix_server.conf
    WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
    28456:20231226:151656.452 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1]
    28456:20231226:151656.452 cannot use database "zabbix": database is not a Zabbix database
    28483:20231226:151708.747 Starting Zabbix Server. Zabbix 6.4.10 (revision 4da16fb82f5).

    Click image for larger version

Name:	image.png
Views:	3262
Size:	52.7 KB
ID:	476476​

    Y este el servicio del servidor.

    No se si algo está mal.

    Gracias.
    ​

    Comment

    • solution
      Senior Member
      • Jun 2020
      • 272

      #4
      Como puede ver, hay un problema con la base de datos.
      ...
      28456:20231226:151656.452 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1]
      28456:20231226:151656.452 cannot use database "zabbix": database is not a Zabbix database​
      ...
      ¿Nueva instalación?
      Elimine la base de datos y siga los pasos C y D desde el enlace de instalación: https://www.zabbix.com/download​


      Wellington

      Comment

      • Rbngv
        Junior Member
        • Dec 2023
        • 20

        #5
        Originally posted by solution
        Como puede ver, hay un problema con la base de datos.


        ¿Nueva instalación?
        Elimine la base de datos y siga los pasos C y D desde el enlace de instalación: https://www.zabbix.com/download​


        Wellington
        Buenos días, gracias por contestar.

        He creado de nuevo el servidor con el mismo nombre y sigue haciendo lo mismo y dando el mismo error:

        Click image for larger version

Name:	image.png
Views:	3301
Size:	14.0 KB
ID:	476522
        Click image for larger version

Name:	image.png
Views:	3199
Size:	80.2 KB
ID:	476523
        28456:20231226:151656.445 Starting Zabbix Server. Zabbix 6.4.10 (revision 4da16fb82f5).
        28456:20231226:151656.445 ****** Enabled features ******
        28456:20231226:151656.445 SNMP monitoring: YES
        28456:20231226:151656.445 IPMI monitoring: YES
        28456:20231226:151656.445 Web monitoring: YES
        28456:20231226:151656.445 VMware monitoring: YES
        28456:20231226:151656.445 SMTP authentication: YES
        28456:20231226:151656.445 ODBC: YES
        28456:20231226:151656.445 SSH support: YES
        28456:20231226:151656.445 IPv6 support: YES
        28456:20231226:151656.445 TLS support: YES
        28456:20231226:151656.445 ******************************
        28456:20231226:151656.445 using configuration file: /etc/zabbix/zabbix_server.conf
        WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
        28456:20231226:151656.452 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1]
        28456:20231226:151656.452 cannot use database "zabbix": database is not a Zabbix database
        28483:20231226:151708.747 Starting Zabbix Server. Zabbix 6.4.10 (revision 4da16fb82f5).
        ​

        Gracias por responder.

        Un saludo.



        ​

        Comment

        • solution
          Senior Member
          • Jun 2020
          • 272

          #6
          systemctl stop zabbix-server zabbix-agent
          eliminar la base de datos zabbix
          y recrear la base de datos siguiendo los pasos de instalación​
          https://www.zabbix.com/download?zabb...ubuntu&os_vers ion=22.04&components=server_frontend_agent&db=mysq l&ws=apache

          Code:
          # mysql -uroot -p
          password
          mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
          mysql> create user zabbix@localhost identified by 'password';
          mysql> grant all privileges on zabbix.* to zabbix@localhost;
          mysql> set global log_bin_trust_function_creators = 1;
          mysql> quit;
          importar esquema y datos iniciales:
          Code:
          # zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
          Deshabilite la opción log_bin_trust_function_creators después de importar el esquema de la base de datos
          Code:
          # mysql -uroot -p
          password
          mysql> set global log_bin_trust_function_creators = 0;
          mysql> quit;
          ahora inicia el servicio
          systemctl start zabbix-server zabbix-agent

          status:
          systemctl status zabbix-server zabbix-agent


          Wellington​

          Comment

          • Rbngv
            Junior Member
            • Dec 2023
            • 20

            #7
            Originally posted by solution
            systemctl stop zabbix-server zabbix-agent
            eliminar la base de datos zabbix
            y recrear la base de datos siguiendo los pasos de instalación​
            https://www.zabbix.com/download?zabb...ubuntu&os_vers ion=22.04&components=server_frontend_agent&db=mysq l&ws=apache

            Code:
            # mysql -uroot -p
            password
            mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
            mysql> create user zabbix@localhost identified by 'password';
            mysql> grant all privileges on zabbix.* to zabbix@localhost;
            mysql> set global log_bin_trust_function_creators = 1;
            mysql> quit;
            importar esquema y datos iniciales:
            Code:
            # zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
            Deshabilite la opción log_bin_trust_function_creators después de importar el esquema de la base de datos
            Code:
            # mysql -uroot -p
            password
            mysql> set global log_bin_trust_function_creators = 0;
            mysql> quit;
            ahora inicia el servicio
            systemctl start zabbix-server zabbix-agent

            status:
            systemctl status zabbix-server zabbix-agent


            Wellington​

            Hola, Gracias por contestar:

            Después de realizar lo que indicas, al iniciar los servicios me salta este error:


            root@zabbix1:~# systemctl start zabbix-server zabbix-agent
            Job for zabbix-agent.service failed because the control process exited with error code.
            See "systemctl status zabbix-agent.service" and "journalctl -xeu zabbix-agent.service" for details.
            Job for zabbix-server.service failed because the service did not take the steps required by its unit configuration.
            See "systemctl status zabbix-server.service" and "journalctl -xeu zabbix-server.service" for details.
            root@zabbix1:~# systemctl status zabbix-server zabbix-agent
            ● zabbix-server.service - Zabbix Server
            Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
            Active: activating (auto-restart) (Result: protocol) since Tue 2024-01-09 12:30:57 UTC; 8s ago
            Process: 4067 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
            CPU: 116ms

            ● zabbix-agent.service - Zabbix Agent
            Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled)
            Active: activating (auto-restart) (Result: exit-code) since Tue 2024-01-09 12:31:03 UTC; 2s ago
            Process: 4070 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=1/FAILURE)
            CPU: 56ms

            ene 09 12:31:03 zabbix1 systemd[1]: Failed to start Zabbix Agent.
            ​
            Y así viendo el status:


            root@zabbix1:~# systemctl status zabbix-server zabbix-agent
            ● zabbix-server.service - Zabbix Server
            Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
            Active: activating (auto-restart) (Result: protocol) since Tue 2024-01-09 12:32:35 UTC; 8s ago
            Process: 4104 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
            CPU: 138ms

            ene 09 12:32:35 zabbix1 systemd[1]: Failed to start Zabbix Server.

            ● zabbix-agent.service - Zabbix Agent
            Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled)
            Active: activating (auto-restart) (Result: exit-code) since Tue 2024-01-09 12:32:35 UTC; 7s ago
            Process: 4107 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=1/FAILURE)
            CPU: 31ms

            ene 09 12:32:35 zabbix1 systemd[1]: Failed to start Zabbix Agent.
            root@zabbix1:~#
            ​
            Gracias por la atención.

            Un saludo.

            Comment

            • solution
              Senior Member
              • Jun 2020
              • 272

              #8
              consulte los logs/registros de zabbix en: /var/log/zabbix

              Wellingto

              Comment

              • Rbngv
                Junior Member
                • Dec 2023
                • 20

                #9
                Originally posted by solution
                consulte los logs/registros de zabbix en: /var/log/zabbix

                Wellingto
                Gracias por la respuesta.

                Esto es lo que me aparece en el log.

                28456:20231226:151656.445 Starting Zabbix Server. Zabbix 6.4.10 (revision 4da16fb82f5).
                28456:20231226:151656.445 ****** Enabled features ******
                28456:20231226:151656.445 SNMP monitoring: YES
                28456:20231226:151656.445 IPMI monitoring: YES
                28456:20231226:151656.445 Web monitoring: YES
                28456:20231226:151656.445 VMware monitoring: YES
                28456:20231226:151656.445 SMTP authentication: YES
                28456:20231226:151656.445 ODBC: YES
                28456:20231226:151656.445 SSH support: YES
                28456:20231226:151656.445 IPv6 support: YES
                28456:20231226:151656.445 TLS support: YES
                28456:20231226:151656.445 ******************************
                28456:20231226:151656.445 using configuration file: /etc/zabbix/zabbix_server.conf
                WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version.
                28456:20231226:151656.452 [Z3005] query failed: [1146] Table 'zabbix.users' doesn't exist [select userid from users limit 1]
                28456:20231226:151656.452 cannot use database "zabbix": database is not a Zabbix database
                28483:20231226:151708.747 Starting Zabbix Server. Zabbix 6.4.10 (revision 4da16fb82f5).
                28483:20231226:151708.747 ****** Enabled features ******
                28483:20231226:151708.747 SNMP monitoring: YES
                28483:20231226:151708.747 IPMI monitoring: YES
                28483:20231226:151708.747 Web monitoring: YES
                28483:20231226:151708.747 VMware monitoring: YES
                28483:20231226:151708.747 SMTP authentication: YES
                28483:20231226:151708.747 ODBC: YES
                28483:20231226:151708.747 SSH support: YES
                28483:20231226:151708.747 IPv6 support: YES
                28483:20231226:151708.747 TLS support: YES
                28483:20231226:151708.747 ******************************
                ​

                Gracias!!

                Comment

                • Rbngv
                  Junior Member
                  • Dec 2023
                  • 20

                  #10
                  Me esta dando también este error si os sirve de algo, Gracias!
                  ░░ Subject: A start job for unit zabbix-server.service has begun execution
                  ░░ Defined-By: systemd
                  ░░ Support: http://www.ubuntu.com/support
                  ░░
                  ░░ A start job for unit zabbix-server.service has begun execution.
                  ░░
                  ░░ The job identifier is 20116.
                  ene 17 11:31:46 zabbix1 zabbix_server[3573]: zabbix_server [3573]: cannot open >
                  ene 17 11:31:48 zabbix1 systemd[1]: zabbix-server.service: Can't open PID file >
                  ene 17 11:31:48 zabbix1 systemd[1]: zabbix-server.service: Failed with result '>
                  ░░ Subject: Unit failed
                  ░░ Defined-By: systemd
                  ░░ Support: http://www.ubuntu.com/support
                  ░░
                  ░░ The unit zabbix-server.service has entered the 'failed' state with result 'p>
                  ene 17 11:31:48 zabbix1 systemd[1]: Failed to start Zabbix Server.
                  ░░ Subject: A start job for unit zabbix-server.service has failed
                  ░░ Defined-By: systemd
                  ░░ Support: http://www.ubuntu.com/support
                  ░░
                  ░░ A start job for unit zabbix-server.service has finished with a failure.
                  ░░
                  ░░ The job identifier is 20116 and the job result is failed.
                  ​

                  Comment

                  • solution
                    Senior Member
                    • Jun 2020
                    • 272

                    #11
                    revisa la información:
                    ¿Hay tablas en la base de datos de Zabbix?
                    Code:
                    mysql> use zabbix;
                    mysql>show tables;
                    mysql> select * from users;
                    que hay: ls -alh
                    /usr/share/zabbix-sql-scripts/mysql/

                    si es necesario, elimine y reinstale zabbix-sql-scripts
                    Code:
                    apt remove zabbix-sql-scripts
                    apt install zabbix-sql-scripts
                    y siga el paso C de la instalación: https://www.zabbix.com/download

                    Wellington​

                    Comment

                    • Rbngv
                      Junior Member
                      • Dec 2023
                      • 20

                      #12
                      Originally posted by solution
                      revisa la información:
                      ¿Hay tablas en la base de datos de Zabbix?
                      Code:
                      mysql> use zabbix;
                      mysql>show tables;
                      mysql> select * from users;
                      que hay: ls -alh
                      /usr/share/zabbix-sql-scripts/mysql/

                      si es necesario, elimine y reinstale zabbix-sql-scripts
                      Code:
                      apt remove zabbix-sql-scripts
                      apt install zabbix-sql-scripts
                      y siga el paso C de la instalación: https://www.zabbix.com/download

                      Wellington​
                      Ahora el error que aparece es:
                      MariaDB 11.02.02 Error! Unable to start Zabbix server. Unsupported MariaDB database server version. Must not be higher than 11.01.xx.
                      ​
                      No se que versión debería instalar de MariaDB para que funcionase. ¿Si me pueden indicar por favor?

                      Gracias.

                      Un saludo.

                      Comment

                      • solution
                        Senior Member
                        • Jun 2020
                        • 272

                        #13
                        11.02 aún no es compatible con el servidor zabbix 6.4
                        Tabla con los mínimos y máximos soportados:



                        Wellington

                        Comment

                        • Rbngv
                          Junior Member
                          • Dec 2023
                          • 20

                          #14
                          Originally posted by solution
                          11.02 aún no es compatible con el servidor zabbix 6.4
                          Tabla con los mínimos y máximos soportados:



                          Wellington
                          Gracias, lo haré con mysql, un saludo.

                          Comment

                          Working...