Ad Widget

Collapse

1.4.1 agent problems?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • workinonit
    Junior Member
    • Jul 2007
    • 12

    #1

    1.4.1 agent problems?

    I am new to zabbix and today installed 1.4.1 however I am having a few problems getting monitoring working. The first problem is adding a host. I get the following error on the "Configuration" > "Hosts" screen:
    maxpower maxpower 192.168.1.90 10050 Template_Linux Monitored Not available ZBX_TCP_READ() failed [Interrupted system call]

    So it would seem that the agent cannot connect to the server. The agent and server are the same computer. Here is my zabbix_agentd.conf

    # This is config file for zabbix_agentd
    # To get more information about ZABBIX, go http://www.zabbix.com

    ############ 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=127.0.0.1
    Server=127.0.0.1,192.168.1.90

    # Server port for sending active checks

    ServerPort=10051

    # Unique hostname. Required for active checks.

    #Hostname=localhost
    Hostname=maxpower

    # Listen port. Default is 10050

    ListenPort=10050

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

    #ListenIP=127.0.0.1
    ListenIP=192.168.1.90

    # 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 (default)
    # 4 - for debugging (produces lots of information)

    DebugLevel=4

    # 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

    # 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 -pempire ping|grep alive|wc -l
    #UserParameter=mysql.uptime,mysqladmin -uroot -pempire status|cut -f2 -d":"|cut -f1 -d"T"
    #UserParameter=mysql.threads,mysqladmin -uroot -pempire status|cut -f3 -d":"|cut -f1 -d"Q"
    #UserParameter=mysql.questions,mysqladmin -uroot -pempire status|cut -f4 -d":"|cut -f1 -d"S"
    #UserParameter=mysql.slowqueries,mysqladmin -uroot -pempire status|cut -f5 -d":"|cut -f1 -d"O"
    #UserParameter=mysql.qps,mysqladmin -uroot -pempirestatus|cut -f9 -d":"
    #UserParameter=mysql.version,mysql -V

    As you can see I have tried playing around with "localhost" or "hostname". My second problem is no output is getting written to the log file so I am having a hard time debugging things. I am using Ubunutu 7, MySQL, Apache, PHP5.

    In short:
    Agent not working?
    ZBX_TCP_READ() failed [Interrupted system call] when trying to add host
    No output to zabbix_agentd.log

    Please help
  • JonB
    Member
    • Oct 2006
    • 63

    #2
    Because the agent is running on the same machine as the server then everything needs to point to localhost

    Configuration" > "Hosts" screen:
    maxpower maxpower 127.0.0.1 10050 Template_Linux

    and use IP not DNS

    Set up config as below

    # This is config file for zabbix_agentd
    # To get more information about ZABBIX, go http://www.zabbix.com

    ############ 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=127.0.0.1

    # Server port for sending active checks

    ServerPort=10051

    # Unique hostname. Required for active checks.

    #Hostname=localhost
    Hostname=maxpower

    # Listen port. Default is 10050

    ListenPort=10050

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

    #ListenIP=127.0.0.1

    For your logging problem, make sure that

    /var/log/zabbix-agent/

    directory exists and that the user zabbix has permission to write to it.

    Jon

    Comment

    • workinonit
      Junior Member
      • Jul 2007
      • 12

      #3
      Originally posted by JonB
      Because the agent is running on the same machine as the server then everything needs to point to localhost

      Configuration" > "Hosts" screen:
      maxpower maxpower 127.0.0.1 10050 Template_Linux

      and use IP not DNS

      Set up config as below

      # This is config file for zabbix_agentd
      # To get more information about ZABBIX, go http://www.zabbix.com

      ############ 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=127.0.0.1

      # Server port for sending active checks

      ServerPort=10051

      # Unique hostname. Required for active checks.

      #Hostname=localhost
      Hostname=maxpower

      # Listen port. Default is 10050

      ListenPort=10050

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

      #ListenIP=127.0.0.1

      For your logging problem, make sure that

      /var/log/zabbix-agent/

      directory exists and that the user zabbix has permission to write to it.

      Jon
      Changed the config file, the error is gone but now this shows up in the agent logs:

      7439:20070705:071423 zabbix_agentd started. ZABBIX 1.4.1.
      7439:20070705:071423 Listener failed with error: Cannot bind to port 10050 for server [ANY]. Error [Address already in use]. Another zabbix_agentd already running ?.
      7510:20070705:072053 zabbix_agentd started. ZABBIX 1.4.1.
      7510:20070705:072053 Listener failed with error: Cannot bind to port 10050 for server [ANY]. Error [Address already in use]. Another zabbix_agentd already running ?.
      7561:20070705:072335 zabbix_agentd started. ZABBIX 1.4.1.
      7561:20070705:072335 Listener failed with error: Cannot bind to port 10050 for server [ANY]. Error [Address already in use]. Another zabbix_agentd already running ?.

      I killed all zabbix_agentd processes and started it again each time I get this. I will double check my server and agent configs to make sure they are listening and responding on ports 10050 and 10051. What could be going on?

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        Originally posted by workinonit
        I killed all zabbix_agentd processes and started it again each time I get this. I will double check my server and agent configs to make sure they are listening and responding on ports 10050 and 10051. What could be going on?
        Triple check this!
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • workinonit
          Junior Member
          • Jul 2007
          • 12

          #5
          Still not working

          here is my server conf:

          # This is config file for ZABBIX server process
          # To get more information about ZABBIX,
          # go http://www.zabbix.com

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

          # This defines which server this is.
          # Default value 1
          # This parameter must be between 1 and 255
          Server=1

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

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

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

          ListenPort=10051

          # How often ZABBIX will perform housekeeping procedure
          # (in hours)
          # Default value is 1 hour
          # Housekeeping is removing unnecessary information from
          # tables history, laert, 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 (in sec)
          # Must be between 1 and 30
          Timeout=5

          # After how many seconds of unavailability treat a host as unavailable
          UnavailablePeriod=20

          # 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

          #Location for custom alert scripts
          AlertScriptsPath=/usr/local/sbin/

          #Location of 'fping. Default is /usr/sbin/fping
          FpingLocation=/usr/bin/fping

          # Frequency of ICMP pings. Defauls is 30 second.
          #PingerFrequency=30

          # Database host name
          # Default is localhost

          DBHost=

          # Database name

          DBName=***********

          # Database user

          DBUser=********

          # Database password
          # Comment this line if no password used

          DBPassword=*********

          # Connect to MySQL using Unix socket?

          #DBSocket=/tmp/mysql.sock

          And here is the agent conf:

          # This is config file for zabbix_agentd
          # To get more information about ZABBIX, go http://www.zabbix.com

          ############ 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=127.0.0.1

          # Server port for sending active checks

          ServerPort=10051

          # Unique hostname. Required for active checks.

          #Hostname=localhost
          Hostname=maxpower

          # 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 (default)
          # 4 - for debugging (produces lots of information)

          DebugLevel=4

          # 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

          # 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 -pempire ping|grep alive|wc -l
          #UserParameter=mysql.uptime,mysqladmin -uroot -pempire status|cut -f2 -d":"|cut -f1 -d"T"
          #UserParameter=mysql.threads,mysqladmin -uroot -pempire status|cut -f3 -d":"|cut -f1 -d"Q"
          #UserParameter=mysql.questions,mysqladmin -uroot -pempire status|cut -f4 -d":"|cut -f1 -d"S"
          #UserParameter=mysql.slowqueries,mysqladmin -uroot -pempire status|cut -f5 -d":"|cut -f1 -d"O"
          #UserParameter=mysql.qps,mysqladmin -uroot -pempirestatus|cut -f9 -d":"
          #UserParameter=mysql.version,mysql -V


          and here is the /etc/services:

          ** Standard ports omitted ***
          # Local services
          zabbix_agent 10050/tcp
          zabbix_trap 10051/tcp

          I can't figure it out.

          Comment

          • workinonit
            Junior Member
            • Jul 2007
            • 12

            #6
            nevermind

            nevermind, now everything is working... weird

            Comment

            • steria
              Junior Member
              • Jun 2007
              • 17

              #7
              Hello,

              Zabbix server: 1.4.1 on Linux RHEL 4.4
              Zabbix agent: 1.4.1 on HP-UX 11.00

              It seems I have a very similar problem...

              Indeed, I have the following error under zabbix GUI:
              140.94.2.54 10050 Template_HPUX Monitored Not available ZBX_TCP_READ() failed [Interrupted system call]

              And in zabbix_agentd logfile:
              Code:
              13429:20070723:104233 Got SIGPIPE. Where it came from???
               13429:20070723:114233 Got SIGPIPE. Where it came from???
               13431:20070723:165732 Got SIGPIPE. Where it came from???
               13431:20070723:165732 Got SIGPIPE. Where it came from???
               13431:20070723:165732 Got SIGPIPE. Where it came from???
              Here is my zabbix_agentd.conf
              Code:
              # This is config file for zabbix_agentd
              # To get more information about ZABBIX, go http://www.zabbix.com
              
              ############ 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=140.94.4.222
              
              # Server port for sending active checks
              
              ServerPort=10051
              
              # Unique hostname. Required for active checks.
              
              Hostname=mistral.tls.fr.astrium.corp
              
              # 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/tmp/zabbix_agentd.pid
              
              # Name of log file.
              # If not set, syslog will be used
              
              LogFile=/var/log/zabbix/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
              And here is my zabbix_server.conf
              Code:
              # This is config file for ZABBIX server process
              # To get more information about ZABBIX,
              # go http://www.zabbix.com
              
              ############ 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 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
              
              # Listen interface for trapper. Trapper will listen 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 30
              #TrapperTimeout=5
              
              # After how many seconds of unreachability treat a host as unavailable
              #UnreachablePeriod=45
              
              # How ofter check host for availability during the unreachability period
              #UnavailableDelay=15
              
              # How ofter check host for availability during the unavailability period
              #UnavailableDelay=60
              
              # Name of PID file
              
              PidFile=/var/tmp/zabbix_server.pid
              
              # Name of log file
              # If not set, syslog is used
              
              LogFile=/tmp/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=/home/zabbix/bin/
              
              # Location of external scripts
              #AlertScriptsPath=/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
              
              # Frequency of ICMP pings (item keys 'icmpping' and 'icmppingsec'). Defauls 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=root
              
              # Database password
              # Comment this line if no password used
              
              DBPassword=2install
              
              # Connect to MySQL using Unix socket?
              
              #DBSocket=/tmp/mysql.sock

              I have already installed many zabbix agents on several plaforms (Solaris, HP-UX, Linux) but this problem only appears with HP-UX 11.00, and a few hours after running zabbix agentd.

              I tried several solutions mentioned on this page, but the problem is still here...
              Any ideas?


              Thank you very much for your help.

              Comment

              • steria
                Junior Member
                • Jun 2007
                • 17

                #8
                Hello again,

                I am still investigating this error:
                ZBX_TCP_READ() failed [Interrupted system call]

                The bad news is that I get it randomly on a HP-UX 11.11 platform too!

                Please, is there a way to track efficiently this pb in order to solve it?
                Can someone send me a precompiled agent for HP-UX 11.00 or 11.11?


                Thank you for your help.

                Comment

                • Alexei
                  Founder, CEO
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Sep 2004
                  • 5654

                  #9
                  Originally posted by steria
                  I am still investigating this error:
                  ZBX_TCP_READ() failed [Interrupted system call]
                  This is just an informative message that can be ignored in most cases.
                  Alexei Vladishev
                  Creator of Zabbix, Product manager
                  New York | Tokyo | Riga
                  My Twitter

                  Comment

                  • steria
                    Junior Member
                    • Jun 2007
                    • 17

                    #10
                    Thanks for your reply.

                    The thing is that data are not collected anymore when the problem occurs...the only solution is to restart agent but the pb comes back very fast.

                    It is really penalizing since I have several HP-UX server to supervise.

                    Some people seem to have solved the pb by changing the agent configuration but wathever I try does not work.

                    Please, let me know if you have any ideas or a if a precompiled agent is available. Could this pb come from compilation phase?

                    Thank you.

                    Comment

                    • steria
                      Junior Member
                      • Jun 2007
                      • 17

                      #11
                      Hello again,

                      I forgot to mention that in order to compile for HP-UX 11.00, I replaced every reference to sysinfo.h by unistd.h in the configure script. I found this solution on the forum.

                      Could the error "ZBX_TCP_READ() failed [Interrupted system call]" come from this modification?

                      Thank you

                      Comment

                      • bashman
                        Senior Member
                        • Dec 2009
                        • 432

                        #12
                        May be this can help:
                        978 Hosts / 16.901 Items / 8.703 Triggers / 44 usr / 90,59 nvps / v1.8.15

                        Comment

                        Working...