Ad Widget

Collapse

Timeout while answering request

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • drose12
    Junior Member
    • Apr 2007
    • 27

    #1

    Timeout while answering request

    Ok, a really wierd one here.

    Zabbix 1.6.1
    Agent 1.6.1 CentOS x86_64

    I have a script that gives me some cpu statistics, and I get the following error in the zabbix_server.log file

    4039:20081217:152934 Timeout while answering request
    4039:20081217:152934 Get value from agent failed. Error: ZBX_TCP_READ() failed [Interrupted system call]
    4039:20081217:152934 Host [webcargo]: first network error, wait for 15 seconds
    4039:20081217:152934 Parameter [vmc.cpu.stats] will be checked after 120 seconds on host [webcargo]

    Here is the zabbix_agentd.conf entries

    UserParameter=vmc.cpu.stats,/usr/local/sbin/cpu_stats.pl
    UserParameter=vmc.cpu.iowait,/usr/local/sbin/cpu_stats.pl -iowait

    Now as you can see I have the same script being used, and if you pass a parameter it gives you different values.

    Running the script manually using either of the above returns a value immediately.

    If I telnet right to the box:

    # telnet webcargo 10050
    Trying 10.1.16.174...
    Connected to webcargo.vm.local (10.1.16.174).
    Escape character is '^]'.
    vmc.cpu.stats
    (...30 seconds wait...)
    ZBXD17745Connection closed by foreign host.

    However that same box using the other UserParameter comes back fast.

    # telnet webcargo 10050
    Trying 10.1.16.174...
    Connected to webcargo.vm.local (10.1.16.174).
    Escape character is '^]'.
    vmc.cpu.iowait
    ZBXD0.00Connection closed by foreign host.

    Any insight? And please don't tell me to use the built in cpu items.
  • drose12
    Junior Member
    • Apr 2007
    • 27

    #2
    I'm going to try to re-code this using the system cron and trappers...I'll update with my results.

    Comment

    • trikke
      Senior Member
      • Aug 2007
      • 140

      #3
      Hi drose,

      what is the return value of your script if u run: /usr/local/sbin/cpu_stats.pl.
      Is it Character or Text or just a value ( Or a value with cariage-return, so not an integer ????? )
      Check on all those issues. If your return value is not of the Type u defined in the item Configuration, u might have a problem!!!!

      Greets
      Patrick

      Comment

      • drose12
        Junior Member
        • Apr 2007
        • 27

        #4
        The return value is an integer...actually the PID as this spawns off a sub script that writes some values from iostat to a text file.


        ...


        &gather();
        print "$$";
        exit(0);

        sub gather {
        system("/usr/local/sbin/cpu_gather.pl&");
        }

        Comment

        • drose12
          Junior Member
          • Apr 2007
          • 27

          #5
          I used the same perl scripts inside a call from a UserParameter that contained a shell script wrapper instead of the perl script and it appears to be working fine with no impact to my queues.

          Is there an issue using perl scripts in UserParameter ?

          Comment

          Working...