Ad Widget

Collapse

zabbix agent (linux no ssl) started to fail

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ThierryIT
    Junior Member
    • Feb 2025
    • 6

    #1

    zabbix agent (linux no ssl) started to fail

    Bonjour, Nouveau sur ce forum, nouveau chez zabbix.
    J'ai un serveur Zabbix (appliance) qui fonctionne correctement, j'ai installé sans aucun sopucis le zabbix agent sur mon serveur web (ubuntu).
    Les deux machines font parti du même réseau, sur la partie serveur Zabbix, je n'ai pas encore activé le fw, contrairement à mon serveur web qui a les ports 10050 et 10051 en TCP d'ouvert.

    Config agent:

    Code:
    Server=192.168.202.XX
    ServerActive=192.168.202.XX
    Hostname=appliance
    Serveur web IP: 192.168.202.XX

    Ping du serveur Zabbix vers le web serveur OK
    Ping du serveur web vers le serveur Zabbix OK

    logs de l'agent:

    Code:
    tail zabbix_agentd.log
    2461:20250206:104405.636 TLS support: YES
    2461:20250206:104405.636 **************************
    2461:20250206:104405.636 using configuration file: /etc/zabbix/zabbix_agentd.conf
    2461:20250206:104405.638 agent #0 started [main process]
    2462:20250206:104405.643 agent #1 started [collector]
    2463:20250206:104405.646 agent #2 started[listener #1]
    2465:20250206:104405.649 agent #4 started[listener #3]
    2464:20250206:104405.651 agent #3 started[listener #2]
    2466:20250206:104405.652 agent #5 started [active checks #1]
    2466:20250206:104408.656 active check configuration update from [192.168.202.XX:10051] started to fail (cannot connect to [[192.168.202.XX]:10051]: [4] Interrupted system call)
    Code:
    ● zabbix-agent.service - Zabbix Agent
         Loaded: loaded (/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: enabled)
         Active: active (running) since Thu 2025-02-06 10:44:05 EET; 5h 55min ago
           Docs: man:zabbix_agentd
       Main PID: 2461 (zabbix_agentd)
          Tasks: 6 (limit: 9172)
         Memory: 3.4M
            CPU: 10.411s
         CGroup: /system.slice/zabbix-agent.service
                 ├─2461 /usr/sbin/zabbix_agentd --foreground
                 ├─2462 "/usr/sbin/zabbix_agentd: collector [idle 1 sec]"
                 ├─2463 "/usr/sbin/zabbix_agentd: listener #1 [waiting for connection]"
                 ├─2464 "/usr/sbin/zabbix_agentd: listener #2 [waiting for connection]"
                 ├─2465 "/usr/sbin/zabbix_agentd: listener #3 [waiting for connection]"
                 └─2466 "/usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]"
    
    Feb 06 10:44:05 pve-vmsweb systemd[1]: Started Zabbix Agent.
    Feb 06 10:44:05 pve-vmsweb zabbix_agentd[2461]: Starting Zabbix Agent [appliance]. Zabbix 5.0.17 (revision 0a4ac3dabc).
    Feb 06 10:44:05 pve-vmsweb zabbix_agentd[2461]: Press Ctrl+C to exit.
    Une idée ?
    Merci
    Last edited by ThierryIT; 07-02-2025, 10:52.
  • ThierryIT
    Junior Member
    • Feb 2025
    • 6

    #2
    Bonjour,
    Donc je suis reparti sur des bases saines.

    1) réinstallation du zabbix-agent sur mon serveur web (package debian - même config que précédament avec cependant la modification du numéro IP du nouveau serveur Zabbix)
    2) reinstallation de l'appliance Zabbix server
    3) modification du fw de mon Proxmox (datacenter fw NO - pve fw NO - zabbix VM fw YES) -> in accept TCP from anywhere port 10050 (pour test)
    4) ajout host - utilisation template linux by zabbix agent groupe host: linux server + ajout interface n°IP du serveur web et port par defaut (10050)
    4) restart Zabbix-agent de mon serveur web (aucune erreur cette fois ci)

    Résultat 'availability ZBX' est rouge: Get value from agent failed: cannot establish TCP connection to [[ip serveur web]:10050]: timed out

    Merci

    Zabbix agent zabbix serveur

    Code:
     tail -f /var/log/zabbix/zabbix_agentd.log
      2542:20250207:080322.150 agent #8 started[listener #7]
      2543:20250207:080322.150 agent #9 started[listener #8]
      2544:20250207:080322.151 agent #10 started[listener #9]
      2545:20250207:080322.151 agent #11 started[listener #10]
      2546:20250207:080322.151 agent #12 started [active checks #1]
      2546:20250207:080322.151 Unable to connect to [127.0.0.1]:10051 [cannot connect to [[127.0.0.1]:10051]: connection error (POLLERR,POLLHUP)]
      2546:20250207:080322.151 Unable to send heartbeat message to [127.0.0.1]:10051 [cannot connect to [[127.0.0.1]:10051]: connection error (POLLERR,POLLHUP)]
      2546:20250207:080322.151 Unable to connect to [127.0.0.1]:10051 [cannot connect to [[127.0.0.1]:10051]: connection error (POLLERR,POLLHUP)]
      2546:20250207:080322.151 Active check configuration update started to fail
      2546:20250207:080647.187 Active check configuration update from [127.0.0.1:10051] is working again
    Zabbix agent serveur web:

    Code:
    tail -f  /var/log/zabbix-agent/zabbix_agentd.log
     14050:20250207:102847.111 IPv6 support:          YES
     14050:20250207:102847.111 TLS support:           YES
     14050:20250207:102847.111 **************************
     14050:20250207:102847.112 using configuration file: /etc/zabbix/zabbix_agentd.conf
     14050:20250207:102847.112 agent #0 started [main process]
     14051:20250207:102847.119 agent #1 started [collector]
     14053:20250207:102847.122 agent #3 started[listener #2]
     14052:20250207:102847.124 agent #2 started[listener #1]
     14054:20250207:102847.126 agent #4 started[listener #3]
     14055:20250207:102847.127 agent #5 started [active checks #1]​
    Last edited by ThierryIT; 07-02-2025, 10:54.

    Comment

    • ThierryIT
      Junior Member
      • Feb 2025
      • 6

      #3
      There is no fw on the zabbix server, as I wrote in french, this is a fresh install.

      Code:
      nmap -p 10051 192.168.206.15
      Starting Nmap 7.80 ( https://nmap.org ) at 2025-02-07 15:30 EET
      Nmap scan report for 192.168.206.15
      Host is up (0.0019s latency).
      
      PORT      STATE    SERVICE
      10051/tcp filtered zabbix-trapper
      
      Nmap done: 1 IP address (1 host up) scanned in 0.41 seconds
      Last edited by ThierryIT; 07-02-2025, 15:33.

      Comment

      • ThierryIT
        Junior Member
        • Feb 2025
        • 6

        #4
        Oupps what i have said is wrong, I am using the default fw of zabbix server, I have done a fresh install of Proxmox and Zabbix server, still the same pb ...

        Original fw rules:

        Code:
        :INPUT ACCEPT [0:0]
        :FORWARD ACCEPT [0:0]
        :OUTPUT ACCEPT [0:0]
        :ICMP - DROP [0:0]
        :NTP - DROP [0:0]
        :SSH - DROP [0:0]
        :ZBX - DROP [0:0]
        :WEB - DROP [0:0]
        :SNMPTRAP - DROP [0:0]
        :SQL - DROP [0:0]
        
        ### ICMP-chain
        -A ICMP -p icmp -m limit --limit 5/s --limit-burst 5 -j ACCEPT
        
        ### NTP-chain
        
        ### SSH-chain
        -A SSH -s 0/0 -p tcp --dport 22 -j ACCEPT
        
        ### ZBX-chain
        -A ZBX -s 0/0 -p tcp --dport 10050 -j ACCEPT
        -A ZBX -s 0/0 -p tcp --dport 10051 -j ACCEPT
        
        ### WEB-chain
        -A WEB -s 0/0 -p tcp -m multiport --dports 80,443 -j ACCEPT
        
        ### WEB-chain
        -A WEB -s 0/0 -p udp --dport 162 -j ACCEPT
        
        ### Lo
        -A INPUT -i lo -j ACCEPT
        
        ### DNS notrack
        -A INPUT -s 8.8.8.8 -p udp --sport 53 -j ACCEPT
        -A INPUT -s 8.8.4.4 -p udp --sport 53 -j ACCEPT
        
        ### ICMP
        -A INPUT -s 0/0 -p icmp -j ICMP
        
        ### NTP
        -A INPUT -s 0/0 -p udp --dport 123 -j NTP
        
        ### SSH
        -A INPUT -s 0/0 -p tcp --dport 20:22 -j SSH
        
        ### ZBX
        -A INPUT -s 0/0 -p tcp -m multiport --dports 10050,10051 -j ZBX
        
        ### WEB/HTTP/HTTPS
        -A INPUT -s 0/0 -p tcp -m multiport --dports 80,443 -j WEB
        
        ### SNMP Traps
        -A INPUT -s 0/0 -p udp --dport 162 -j SNMPTRAP
        
        ### OUT-for-notrack
        -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT
        -A OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT
        
        ### DROP
        -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -j DROP
        -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
        COMMIT[B][/B]
        When running the webserver zabbix agent to LogLevel=4

        Code:
         23748:20250208:180458.318 zbx_setproctitle() title:'collector [idle 1 sec]'
         23752:20250208:180458.319 In send_buffer() host:'192.168.206.53' port:10051 entries:0/100
         23752:20250208:180458.319 End of send_buffer():SUCCEED
         23752:20250208:180458.319 zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
         23748:20250208:180459.318 zbx_setproctitle() title:'collector [processing data]'
         23748:20250208:180459.318 In update_cpustats()
         23748:20250208:180459.319 End of update_cpustats()
         23748:20250208:180459.319 zbx_setproctitle() title:'collector [idle 1 sec]'
         23752:20250208:180459.320 In send_buffer() host:'192.168.206.53' port:10051 entries:0/100
         23752:20250208:180459.320 End of send_buffer():SUCCEED
         23752:20250208:180459.320 zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
         23748:20250208:180500.320 zbx_setproctitle() title:'collector [processing data]'
         23748:20250208:180500.320 In update_cpustats()
         23748:20250208:180500.320 End of update_cpustats()
         23748:20250208:180500.320 zbx_setproctitle() title:'collector [idle 1 sec]'
         23752:20250208:180500.321 In send_buffer() host:'192.168.206.53' port:10051 entries:0/100
         23752:20250208:180500.321 End of send_buffer():SUCCEED
         23752:20250208:180500.321 zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
         23748:20250208:180501.321 zbx_setproctitle() title:'collector [processing data]'
         23748:20250208:180501.321 In update_cpustats()
        Last edited by ThierryIT; 08-02-2025, 18:06.

        Comment

        • ThierryIT
          Junior Member
          • Feb 2025
          • 6

          #5
          Bonjour,
          Personne ?
          Je pense qu'il, y a peut être une interférence avec les FW de proxmox ...

          Comment

          Working...