Ad Widget

Collapse

Im cannot connect my web with zabbix "[111] Connection refused" (not just this)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dudexter
    Junior Member
    • Nov 2019
    • 2

    #1

    Im cannot connect my web with zabbix "[111] Connection refused" (not just this)

    Hello everyone, I'm here watching the forum about 1 month.
    I try ever not post to ask my troubles, because I know it look a bit lazy somethimes.
    I think, this post is not the case.

    I'm trying to interconnect my shop web with zabbix software. Have more than one shopspot to connect. More than one mikrotik router.
    The trouble apear when I try to get information from a agent in another shop. But this not occurs when I ask the same information to a local agent, an agent in the my web for example.
    I think this can be the mikrotiks firewall, create a rule who display a lot of data using the rule, but this still not enought to comunication between server and agent.

    This is more strange because telnet test are fine, ssh fine, ping fine, the web is fully operational, but zabbix cannot be inside it.
    I can show any log you guys ask, I'm working on this problem about 2 weeks.



    Error in zabbix get :
    zabbix_get -s [IPAGENT] -p 10050 -k "system.cpu.all,avg1]"
    zabbix_get [7379]: Check access restrictions in Zabbix agent configuration
    Telnet test
    telnet [IPSERVER] 10050
    Trying [IPSERVER]...
    Connected to 10.xxx.
    Escape character is '^]'.
    Connection closed by foreign host.

    telnet [IPSERVER] 10051
    Trying [IPSERVER]...
    Connected to [IPSERVER].
    Escape character is '^]'.

    telnet [IPAGENT] 10051<Same port 10050>
    Trying [IPAGENT]...
    Connected to [IPAGENT].
    Escape character is '^]'.
    Connection closed by foreign host.
    Ping totally fine, the web is working fine, but something on zabbix configurations im missin.
    If someone could help me in this I will be very grateful.
    Thanks for the zabbix software.

    This is in agent log
    3178:20191125:112802.111 active check configuration update from [[IPSERVER]:10051] started to fail (bind() failed: [99] Cannot assign requested address)
    3172:20191125:113451.488 Got signal [signal:15(SIGTERM),sender_pid:3263,sender_uid:0,re ason:0]. Exiting ...
    ....
    923:20191126:075646.470 listener failed: bind() for [[[IPSERVER]]:10050] failed: [99] Cannot assign requested address
    923:20191126:075646.470 Zabbix Agent stopped. Zabbix 4.0.14 (revision 880528396b).
    ...
    20974:20191126:100115.206 agent #4 started[listener #3]
    20975:20191126:100115.324 active check configuration update from [[IPSERVER]:10051] started to fail (cannot connect to [[IPSERVER]:10051]: [111] Connection refused)
    20975:20191126:102017.731 active check configuration update from [[IPSERVER]:10051] is working again

    iptable permissions in server (Same in agent)
    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT tcp -- anywhere anywhere tcp dpt:zabbix-trapper flags:FIN,SYN,RST,ACK/SYN
    ACCEPT tcp -- anywhere anywhere tcp dpt:zabbix-agent flags:FIN,SYN,RST,ACK/SYN

    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    ACCEPT tcp -- anywhere anywhere tcp dpt:zabbix-agent flags:FIN,SYN,RST,ACK/SYN
    ACCEPT tcp -- anywhere anywhere tcp dpt:zabbix-trapper flags:FIN,SYN,RST,ACK/SYN

    Edit:
    I create the same rule in both mikrotiks, allowing the ports 10050-10051. The rule display a lot of data passing in mikrotik, but the server still cant get information from the agent.

    In zabbix frontend I discovery a lot of equipments, with ssh and zabbix agent. But Zabix Agents have the ip of mikrotik and I need to correct it manualy.

    The system Im using is:
    Ubuntu 18 server
    Some agents Ubuntu 18, some 16, and some 14...
    The agent I'm triyng to connect is: Ubuntu 14.04
    Last edited by Dudexter; 26-11-2019, 19:08.
  • Dudexter
    Junior Member
    • Nov 2019
    • 2

    #2
    After more days I solve it.
    I was having a wrong configuration on zabbix_agent.conf on the server, when I fix it all start to be well. Thanks for all help guys

    Comment

    Working...