Ad Widget

Collapse

Connectionproblems between zabbix Server and Agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dxUser
    Junior Member
    • Mar 2011
    • 7

    #1

    Connectionproblems between zabbix Server and Agent

    Hello I'm using zabbix 1.8.4,

    I'm trying to monitor one agent and it doesen't work.


    Here the config file from zabbix server:

    ############ GENERAL PARAMETERS #################

    # This defines unique NodeID in distributed setup,
    # Default value 0 (standalone server)
    # This parameter must be between 0 and 999
    #NodeID=0

    # Number of pre-forked instances of pollers
    # Default value is 5
    # This parameter must be between 0 and 255
    #StartPollers=5

    # Number of pre-forked instances of IPMI pollers
    # Default value is 0
    # This parameter must be between 0 and 255
    #StartIPMIPollers=0

    # Number of pre-forked instances of pollers for unreachable hosts
    # Default value is 1
    # This parameter must be between 0 and 255
    #StartPollersUnreachable=1

    # Number of pre-forked instances of trappers
    # Default value is 5
    # This parameter must be between 0 and 255
    #StartTrappers=5

    # Number of pre-forked instances of ICMP pingers
    # Default value is 1
    # This parameter must be between 0 and 255
    #StartPingers=1

    # Number of pre-forked instances of discoverers
    # Default value is 1
    # This parameter must be between 0 and 255
    #StartDiscoverers=1

    # Number of pre-forked instances of HTTP pollers
    # Default value is 1
    # This parameter must be between 0 and 255
    #StartHTTPPollers=1

    # Listen port for trapper. Default port number is 10051. This parameter
    # must be between 1024 and 32767

    ListenPort=10051

    # Source IP address for outgoing connections
    #SourceIP=

    # Listen interface for trapper. Trapper will listen on all network interfaces
    # if this parameter is missing.

    #ListenIP=127.0.0.1

    # How often ZABBIX will perform housekeeping procedure
    # (in hours)
    # Default value is 1 hour
    # Housekeeping is removing unnecessary information from
    # tables history, alert, and alarms
    # This parameter must be between 1 and 24

    #HousekeepingFrequency=1

    # How often ZABBIX will try to send unsent alerts
    # (in seconds)
    # Default value is 30 seconds
    SenderFrequency=30

    # Uncomment this line to disable housekeeping procedure
    #DisableHousekeeping=1

    # Specifies debug level
    # 0 - debug is not created
    # 1 - critical information
    # 2 - error information
    # 3 - warnings (default)
    # 4 - for debugging (produces lots of information)

    DebugLevel=3

    # Specifies how long we wait for agent response (in sec)
    # Must be between 1 and 30
    Timeout=5

    # Specifies how many seconds trapper may spend processing new data
    # Must be between 1 and 300
    #TrapperTimeout=5

    # After how many seconds of unreachability treat a host as unavailable
    #UnreachablePeriod=45

    # How often check host for availability during the unavailability period
    #UnavailableDelay=60

    # Name of PID file

    PidFile=/var/run/zabbix-server/zabbix_server.pid

    # Name of log file
    # If not set, syslog is used

    LogFile=/var/log/zabbix-server/zabbix_server.log

    # Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
    #LogFileSize=1

    # Location for custom alert scripts
    AlertScriptsPath=/etc/zabbix/alert.d/

    # Location of external scripts
    #ExternalScripts=/etc/zabbix/externalscripts

    # Location of fping. Default is /usr/sbin/fping
    # Make sure that fping binary has root permissions and SUID flag set
    #FpingLocation=/usr/sbin/fping

    # Location of fping6. Default is /usr/sbin/fping6
    # Make sure that fping binary has root permissions and SUID flag set
    #Fping6Location=/usr/sbin/fping6

    # Temporary directory. Default is /tmp
    #TmpDir=/tmp

    # Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Default is 60 seconds.
    #PingerFrequency=60

    # Database host name
    # Default is localhost

    DBHost=localhost

    # Database name
    # SQLite3 note: path to database file must be provided. DBUser and DBPassword are ignored.
    DBName=zabbix

    # Database user

    DBUser=zabbix

    # Database password
    # Comment this line if no password used

    DBPassword=xxxxx

    # Connect to MySQL using Unix socket?

    #DBSocket=/tmp/mysql.sock

    Here the config file from zabbix agent:

    ############ GENERAL PARAMETERS #################

    # List of comma delimited IP addresses (or hostnames) of ZABBIX servers.
    # No spaces allowed. First entry is used for sending active checks.
    # Note that hostnames must resolve hostname->IP address and
    # IP address->hostname.

    Server=Server-IP

    # Server port for sending active checks

    ServerPort=10051

    # Unique hostname. Required for active checks.

    Hostname=hostname

    # Listen port. Default is 10050

    ListenPort=10050

    # IP address to bind agent
    # If missing, bind to all available IPs

    #ListenIP=127.0.0.1

    # Number of pre-forked instances of zabbix_agentd.
    # Default value is 5
    # This parameter must be between 1 and 16

    StartAgents=5

    # How often refresh list of active checks. 2 minutes by default.

    #RefreshActiveChecks=120

    # Disable active checks. The agent will work in passive mode listening server.

    #DisableActive=1

    # Enable remote commands for ZABBIX agent. By default remote commands disabled.

    #EnableRemoteCommands=1

    # Specifies debug level
    # 0 - debug is not created
    # 1 - critical information
    # 2 - error information
    # 3 - warnings
    # 4 - information (default)
    # 5 - for debugging (produces lots of information)

    DebugLevel=3

    # Name of PID file

    PidFile=/var/run/zabbix-agent/zabbix_agentd.pid

    # Name of log file.
    # If not set, syslog will be used

    LogFile=/var/log/zabbix-agent/zabbix_agentd.log

    # Maximum size of log file in MB. Set to 0 to disable automatic log rotation.
    #LogFileSize=1

    # Spend no more than Timeout seconds on processing
    # Must be between 1 and 30

    Timeout=3

    ####### USER-DEFINED MONITORED PARAMETERS #######
    # Format: UserParameter=<key>,<shell command>
    # Note that shell command must not return empty string or EOL only
    #UserParameter=system.test,who|wc -l
    ### Set of parameter for monitoring MySQL server (v3.23.42 and later)
    ### Change -u<username> and add -p<password> if required
    #UserParameter=mysql.ping,mysqladmin -uroot ping|grep alive|wc -l
    #UserParameter=mysql.uptime,mysqladmin -uroot status|cut -f2 -d":"|cut -f1 -d"T"
    #UserParameter=mysql.threads,mysqladmin -uroot status|cut -f3 -d":"|cut -f1 -d"Q"
    #UserParameter=mysql.questions,mysqladmin -uroot status|cut -f4 -d":"|cut -f1 -d"S"
    #UserParameter=mysql.slowqueries,mysqladmin -uroot status|cut -f5 -d":"|cut -f1 -d"O"
    #UserParameter=mysql.qps,mysqladmin -uroot status|cut -f9 -d":"
    #UserParameter=mysql.version,mysql -V

    Here are the log-file from agent:

    10147:20110311:173319 zabbix_agentd started. ZABBIX 1.6.
    10148:20110311:173319 zabbix_agentd collector started
    10149:20110311:173319 zabbix_agentd listener started
    10150:20110311:173319 zabbix_agentd listener started
    10151:20110311:173319 zabbix_agentd listener started
    10152:20110311:173319 zabbix_agentd active check started [Server-IP:10051]
    10152:20110311:173319 Unsucesfull response received from server

    Here are the log-file from server:

    Item [Agent-Hostname:system.cpu.load[,avg1]] error: Get value from agent failed: *** Cannot connect to [Agent-Hostname]:10050 [Interrupted system call] 9305:20110311:173811.202 ZABBIX Host [Agent-Hostname]or, wait for 15 seconds

    Firewall is disabled

    I would be very grateful if somebody could tell me how I can fix this problem.


    Greeting
    dxUser
  • dxUser
    Junior Member
    • Mar 2011
    • 7

    #2
    Problem still exists

    Hello Zabbix-Users,

    unfortunately my problem is still present.

    Is there somebody who could spend some minutes
    to help me with this problem?

    Comment

    • zalex_ua
      Senior Member
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Oct 2009
      • 1286

      #3
      Originally posted by dxUser
      ############ GENERAL PARAMETERS #################
      # Unique hostname. Required for active checks.
      Hostname=hostname


      Here are the log-file from agent:
      10152:20110311:173319 zabbix_agentd active check started [Server-IP:10051]
      10152:20110311:173319 Unsucesfull response received from server
      The host with the name "hostname" really exist in the Zabbix server configuration? And it's in active state ?

      Comment

      • vinh.ho
        Junior Member
        • Nov 2010
        • 10

        #4
        make sure that the Hostname in /etc/zabbix/zabbix_agentd.conf is CORRECT
        In your zabbix_server.conf file i found that server is localhost
        and in your zabbix_agentd.conf is Hostname=hostname ?!

        Comment

        • dxUser
          Junior Member
          • Mar 2011
          • 7

          #5
          Originally posted by zalex_ua
          The host with the name "hostname" really exist in the Zabbix server configuration? And it's in active state ?

          I'm a little bit baffled.

          In the agentd.conf the hostname is set but what do you mean with "really exist in the Zabbix server configuration"?? In the Zabbix Server GUI there is a server with the accordingly name as in the agentd.conf-File of the server which should be monitored.

          Active state? The zabbix server should automatically check the agents.

          Comment

          • vinh.ho
            Junior Member
            • Nov 2010
            • 10

            #6
            for example :
            1/ In zabbix_agentd.conf you set Hostname is : hostname=abc
            2/ So in the web GUI when you creat a host, the name of host must be "abc"

            Comment

            • dxUser
              Junior Member
              • Mar 2011
              • 7

              #7
              The hostname in the agentd.conf is the same as the name in the Zabbix Server GUI.

              Is it importent to reach the host by IP-Address or DNS-Name?
              If I create a new host, I can configure the DNS Name and the IP-Address, than I can decide to "Connect to" via IP-Address or DNS-Name. In my configuration for the host, I have choosen IP-Address. Agent Port is 10050, no proxy.

              Comment

              • dxUser
                Junior Member
                • Mar 2011
                • 7

                #8
                Not giving up

                Hello,

                my problem is still existing but I'm not giving up ;-)

                Test's I have made:

                If I install and configure new servers internal, there is no problem with connections and I can monitor the servers without trouble. So I think that my problem between the zabbix server and the monitored server(agent) is caused by the agent.

                If I trie to connect via telnet from the server(agent) which should be monitored to the zabbix-server, this connection works:

                server-name:/var/# telnet server-ip(firewall with portforwarding) 10051
                Trying server-ip...
                Connected to server-ip.
                Escape character is '^]'.

                Connection closed by foreign host.


                If I trie to connect from the zabbix-server to the server(agent) this error is shown:

                root@server:~# telnet server-ip(agent) 10050
                Trying server-ip...
                telnet: Unable to connect to remote host: Connection timed out

                So I think theres somewhere the problem.

                Somebody any ideas?


                Greetings
                dxUser



                Edit: On the server(agent) I added the port to iptables with

                iptables -A INPUT -p tcp --dport 10050 -j ACCEPT
                iptables -A INPUT -p udp --dport 10050 -j ACCEPT

                but there is no change
                Last edited by dxUser; 18-03-2011, 18:29. Reason: more testing

                Comment

                • dxUser
                  Junior Member
                  • Mar 2011
                  • 7

                  #9
                  Hello Zabbix-Users,

                  at the moment I'm a little bit frustrated. Is there nobody who has the same or similar problems.

                  Greetings
                  dxUser

                  Comment

                  • Bennie
                    Member
                    Zabbix Certified Specialist
                    • Feb 2010
                    • 73

                    #10
                    might be late but i hope you still watch the topic.

                    try to telnet to this: telnet aria.dominating.nl 10050

                    Let me know if it works.

                    Comment

                    • sue
                      Member
                      • Mar 2011
                      • 41

                      #11
                      Originally posted by dxUser
                      Hello Zabbix-Users,

                      at the moment I'm a little bit frustrated. Is there nobody who has the same or similar problems.

                      Greetings
                      dxUser
                      i have the same problem. Still cannot solve yet.
                      what function of this below line?
                      telnet aria.dominating.nl 10050

                      Comment

                      • Bennie
                        Member
                        Zabbix Certified Specialist
                        • Feb 2010
                        • 73

                        #12
                        at the time i was suspecting the OP to have firewall issues to external connections over port 10050. I opened a port on one of my servers to check that but he never came around to test it.

                        Comment

                        • sue
                          Member
                          • Mar 2011
                          • 41

                          #13
                          my problem only happen when i want to connect with dmz server. With other server is ok. Why this happen? firewall already stop. telnet also can connect

                          Comment

                          • untergeek
                            Senior Member
                            Zabbix Certified Specialist
                            • Jun 2009
                            • 512

                            #14
                            Does it connect in the other direction?

                            On Zabbix Client Machine:
                            telnet zabbix.server.org 10051

                            On Zabbix Server Machine:
                            telnet zabbix.client.org 10050

                            If connectivity is established both directions, then it could be a matter of name configuration and whether it's added to Zabbix in the UI with a name that matches that in the zabbix_agentd.conf

                            Comment

                            • sue
                              Member
                              • Mar 2011
                              • 41

                              #15
                              i get this error

                              Get value from agent failed: ZBX_TCP_READ() failed [Interrupted system call]
                              I check evrything is OK. But still got error

                              Comment

                              Working...