Ad Widget

Collapse

connection impossible between zabbix proxy and zabbix server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coco1208
    Junior Member
    • Mar 2018
    • 15

    #1

    connection impossible between zabbix proxy and zabbix server

    I have a proxy (192.168.1.x) local network and a server (192.168.2.x) in the cloud. The problem is I can't establish the connection between the two knowing that I'm going through a firewall with two NAT rules that allow the second network to return the default port (10050).

    zabbix_get :
    ( Get value error : cannot connect to [[address IP of the server] 10051]:[111] connexion refused )

    /var/log/zabbix/zabbix_agentd.log
    failed to accept an incoming connection : connection from " adresse IP publique" rejected allowed hosts "192.168.2.x"

    /var/log/zabbix/zabbix_agent.log
    failed to accept an incoming connection : connection from " 192.168.1.x" rejected, allowed hosts "address IP of the server"


    And the configuration files are well filled

    -proxy.conf
    Listenport 10050
    Server address IP of the server
    Hostname Zabbix proxy
    DBHost localhost
    DBName zabbix
    DBUser zabbix
    DBPassword ***********

    -Agent.conf
    Listenport 10051
    Server address IP of the server
    Hostname zabbix

    -Zabbix server
    Listenport 10051
    DBHost localhost
    DBName zabbix
    DBUser zabbix
    DBPassword ***********

    -Agent.conf
    Listenport 10050
    Server public address IP
    ServerActive address IP of the server
    Hostname zabbix server

  • coco1208
    Junior Member
    • Mar 2018
    • 15

    #2
    I've create a new machine (local network) in order to see xhere it was the problem if it was about the firewall or an other thing, but I've always "failed to accept an incoming ..."
    and in addition " cannot send stat SNMP trapper file "/var/log/snmptrap/snmptrap.log" No such file or directory"

    Finally the server can ping now with his agent but he hasn't access to the proxy, the ZBX is green for the zabbix server but for the Zabbix proxy he's always red.

    Can you help me?

    Comment

    • huangyingja
      Junior Member
      • Apr 2015
      • 27

      #3
      can you try telnet from agent to zabbix server IP and port first ?

      Comment

      • coco1208
        Junior Member
        • Mar 2018
        • 15

        #4

        I even tried zabbix-get but the answer said "check access restrictions in Zabbix agent configuration" so I think my error is in my configuration but i don't see what is it

        Comment

        • coco1208
          Junior Member
          • Mar 2018
          • 15

          #5
          but i will try with telnet
          Last edited by coco1208; 22-03-2018, 17:50.

          Comment

          • coco1208
            Junior Member
            • Mar 2018
            • 15

            #6

            Is there anyone on this forum who can help me?

            Comment

            • aigars.kadikis
              Senior Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Mar 2018
              • 208

              #7
              Originally posted by coco1208
              I even tried zabbix-get but the answer said "check access restrictions in Zabbix agent configuration" so I think my error is in my configuration but i don't see what is it
              The message "check access restrictions in Zabbix agent configuration" only means you need to extend the scope for passive checks. Open zabbix_agentd.conf, look for Server=ip.of.zabbix.server for example if you try to simulate zabbix server locally on the agent side you need to add also 127.0.0.1 just like this:
              Server=ip.of.zabbix.server,127.0.0.1

              Comment

              • coco1208
                Junior Member
                • Mar 2018
                • 15

                #8

                Thank you for your help ^^ But there must be another mistake somewhere because it's always the same. And in my opinion, it's necessarily in the configuration file but I don't know where is it?!

                Comment

                • Viks
                  Junior Member
                  • Mar 2018
                  • 24

                  #9
                  How do you connect both networks, with IPSEC VPN tunnel?
                  Do you have an IP Masquerade on one of the sides?

                  In the Zabbix Agent configuration, you need to specify all the servers and proxy comma separated ip addresses including 127.0.0.1, then there will be no issues.
                  You must specify exactly the IP addresses that Zabbix agents see as the source IP (this is the case when IP Masquerade is used).
                  Server=zabbix,127.0.0.1,192.168.1.x,192.168.2.x

                  But ServerActive must specify the same IP subnet Zabbix server / proxy IP address.
                  ServerActive=192.168.x.x

                  You also need to watch Zabbix proxy and server log files,
                  there you will get answers to your questions and find a misconfigured configuration.

                  Comment

                  • coco1208
                    Junior Member
                    • Mar 2018
                    • 15

                    #10
                    IP masquerade is required?

                    I didn't do it, but I have basic IPTABLES.
                    And I put the IP address of the server, the proxy and the 127.0.0.1 on the Zabbix agent configuration file (on both server and proxy agents)

                    Comment

                    • Viks
                      Junior Member
                      • Mar 2018
                      • 24

                      #11
                      coco1208 you still have any issues?

                      Zabbix is no matter whether the IP Masquerade is turned on or not.

                      I would recommend to disable network restrictions for you at all locations,
                      then put Zabbix systems in order to work together,
                      and then deal with network security issues.

                      You need to understand how you have configured everything yourself,
                      on each server, you can see which ports are open:
                      netstat -lntp | grep zabbix
                      then with telnet you can check if it is possible to connect.

                      And of course, in all places you watch the log file,
                      they are for everything - both for the agent, the proxy and the server,
                      they will help find issues if any.

                      Comment

                      • coco1208
                        Junior Member
                        • Mar 2018
                        • 15

                        #12
                        Thanks,
                        there, I can not anymore, it's been almost 4 weeks that I try to find the sotlution and in vain try what is proposed to me nothing works.
                        (By force I know how Zabbix works, I know netstat, and there are ports that are open) But although I installed telnet, I'm told it is not found ..

                        Comment

                        • Viks
                          Junior Member
                          • Mar 2018
                          • 24

                          #13
                          If I understand you correctly, then you have network and linux issues but not Zabbix.
                          Find ways to debug your network problems, then go further.

                          I would recommend checking Zabbix [agent / proxy / server] conf files again, is everything all right:
                          cat zabbix_agentd.conf | grep -v "^#" | awk 'NF' | sort
                          cat zabbix_proxy.conf | grep -v "^#" | awk 'NF' | sort
                          cat zabbix_server.conf | grep -v "^#" | awk 'NF' | sort

                          Comment

                          • coco1208
                            Junior Member
                            • Mar 2018
                            • 15

                            #14

                            I checked the configurations I give the newpapers on my web interface I have this problem " Zabbix agent on 'client' is unreachable for 5 minutes"

                            ZABBIX PROXY

                            on zabbix_proxy.log:
                            received configuration data from server at ".......", datalen

                            on zabbix_agentd.log:
                            no active checks on server [...:10051]: host [client] not found

                            ZABBIX SERVER

                            on zabbix.server.log:
                            cannot send list of active checks to "....": host [client] not found
                            Last edited by coco1208; 27-03-2018, 14:26.

                            Comment

                            • coco1208
                              Junior Member
                              • Mar 2018
                              • 15

                              #15
                              And configurations
                              Attached Files

                              Comment

                              Working...