Ad Widget

Collapse

Server - agent cannot communicate - ServerReceived empty response from Zabbix Agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anahitka9
    Junior Member
    • Jul 2020
    • 2

    #1

    Server - agent cannot communicate - ServerReceived empty response from Zabbix Agent

    Hello Everybody,

    I am a new Zabbix user and really, really want to like it.
    After an initial good start I run into problems when monitoring remote hosts.

    My high level architecture:

    Code:
    [FONT=Calibri][FONT=Arial]Zabbix server ---- Firewalls --- hosts I want to monitor[/FONT][/FONT]
    I'm having problems setting up agents so server and agents can talk to each other.
    After opening firewall ports I run into the below error:

    Received empty response from Zabbix Agent at [XX.XX.XX.XX]. Assuming that agent dropped connection because of access permissions.
    I am running fully containerized setup, so for agents I wanted to use the below:

    Code:
    [FONT=Calibri][FONT=Arial]docker run --name zabbix-agent \
                                   -e ZBX_HOSTNAME="Zabbix server" \
                                   -e ZBX_SERVER_HOST="SERVER_IP"
                                   -d zabbix/zabbix-agent:alpine-5.0.1[/FONT][/FONT]
    docker ps result:

    Code:
    [FONT=Calibri][FONT=Arial]# docker ps[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]799b7aeb997c zabbix/zabbix-agent:alpine-5.0.1 "/sbin/tini -- /us..." 11 hours ago Up 11 hours 10050/tcp zabbix-agent[/FONT][/FONT]
    docker logs look as follows:

    Code:
    [FONT=Calibri][FONT=Arial]** Updating '/etc/zabbix/zabbix_agentd.conf' parameter "TLSPSKFile": ''... removed[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]** Updating '/etc/zabbix/zabbix_agentd.conf' parameter "User": 'zabbix'... added[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]Starting Zabbix Agent [Zabbix server]. Zabbix 5.0.1 (revision c2a0b03).[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]Press Ctrl+C to exit.[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]5:20200706:200957.274 Starting Zabbix Agent [Zabbix server]. Zabbix 5.0.1 (revision c2a0b03).[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]5:20200706:200957.274 **** Enabled features ****[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]5:20200706:200957.274 IPv6 support: YES[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]5:20200706:200957.274 TLS support: YES[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]5:20200706:200957.274 **************************[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]5:20200706:200957.274 using configuration file: /etc/zabbix/zabbix_agentd.conf[/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]5:20200706:200957.274 agent #0 started [main process][/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]74:20200706:200957.275 agent #4 started[listener #3][/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]71:20200706:200957.277 agent #1 started [collector][/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]72:20200706:200957.277 agent #2 started[listener #1][/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]73:20200706:200957.278 agent #3 started[listener #2][/FONT][/FONT]
    [FONT=Calibri][FONT=Arial]75:20200706:200957.280 agent #5 started [active checks #1][/FONT][/FONT]
    Questions

    1. Is there a way to change log level via command line’s environmental parameter e.g.:

    Code:
    [FONT=Calibri][FONT=Arial]-e DEBUG_LEVEL=5 ?[/FONT][/FONT]
    2. How can I get server talking to the agent. Traffic on the firewall is open.

    Port 10050 is exposed but I cannot publish it, so it’s kind of closed from outside.
    I was thinking about either:
    • customizing docker image (what would be the best one to use as a base?)
    • spinning up a proxy on the agent host on the same docker network and proxy outside traffic on 10050 to the container (not to reasonable if I plan to monitor a lot of different hosts).

    This cannot be that difficult, what am I missing?

    Appreciate your help

    Thanks!
    Last edited by anahitka9; 07-07-2020, 13:41.
  • anahitka9
    Junior Member
    • Jul 2020
    • 2

    #2
    Damn... it's my just being plain wrong

    Everything is alright now. For reasons unknown sth was using port 10050 on the host so I could not bind it to container's 10050.Working run command for this case is :

    Code:
    docker run --name zabbix-agent \
                                   -p 10051:10050 \
                                   -e ZBX_HOSTNAME="Zabbix server" \
                                   -e ZBX_SERVER_HOST="XX.XX.XX.XX" \
                                   -d zabbix/zabbix-agent:alpine-5.0.1
    Of course I had 10050 opened on the FW as well.
    I just have to figure out what other agent was using 10050 port on the host!

    The below has helped me to figure out the port is used by another zabbix agent!!!

    Code:
    netstat -pna | grep 10050
    Last edited by anahitka9; 07-07-2020, 13:43.

    Comment

    Working...