Ad Widget

Collapse

ZBX_TCP_READ() failed [Interrupted system call]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jimini
    Junior Member
    • May 2010
    • 22

    #1

    ZBX_TCP_READ() failed [Interrupted system call]

    Hey there,
    I have set the following UserParameter on my Clients to let Zabbix look for available updates:
    Code:
    UserParameter=gentoo.updates,emerge -tpvuD world | grep ebuild | wc -l
    This works fine, just for one single system the server logs the following error:
    Item [Aleph:gentoo.updates] error: Get value from agent failed: ZBX_TCP_READ() failed [Interrupted system call]
    Zabbix Host [Aleph]: another network error, wait for 15 seconds
    The agent on Aleph does not log any errors.

    On the Zabbix server, I use 1.8.4, on Aleph 1.8.3. I also tested 1.8.4 and 1.9.3, but without success.

    Here are the configs:
    Zabbix server
    Code:
    StartPollers=10
    StartTrappers=5 # I also tried up to 200 here
    StartPingers=2
    ListenPort=10051
    SourceIP=10.0.0.2
    ListenIP=10.0.0.2
    HousekeepingFrequency=1
    SenderFrequency=60
    DebugLevel=3
    Timeout=30
    TrapperTimeout=60
    UnreachablePeriod=60
    PidFile=/var/run/zabbix/zabbix_server.pid
    LogFile=/var/log/zabbix/zabbix_server.log
    AlertScriptsPath=/home/zabbix/bin/
    DBHost=localhost
    DBName=(secret)
    DBUser=(secret)
    DBPassword=(secret)
    Zabbix agent
    Code:
    Server=10.0.0.2
    ServerPort=10051
    Hostname=Aleph
    ListenPort=10050
    ListenIP=10.0.0.1
    SourceIP=10.0.0.1
    StartAgents=5 # I tried up to 16 here
    DebugLevel=3                                                                                      
    PidFile=/var/run/zabbix/zabbix_agentd.pid
    LogFile=/var/log/zabbix/zabbix_agentd.log
    Timeout=30
    UserParameter=gentoo.updates,emerge -tpvuD world | grep ebuild | wc -l
    Any help would be really appreciated.

    Best regards,
    Jimini
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    How long does your user parameter take to execute?

    The error is basically saying that the server connected to the agent, asked for an item but the item took too long and the connection timed out.

    Try changing that to an active item, rather than a passive one.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • Jimini
      Junior Member
      • May 2010
      • 22

      #3
      Thank you for your answer. The script took about 20 seconds. I replaced it as follows:
      Code:
      #!/bin/bash
      UPDATES=`emerge -tpvuD world | grep ebuild | wc -l`
      zabbix_sender -z address.of.zabbix.server -s agent's_hostname -k gentoo.updates -o $UPDATES
      Now it can be executed without any errors.

      Best regards,
      Jimini

      Comment

      • anjiytwok
        Member
        • Dec 2012
        • 44

        #4
        Where we have to update

        Hello Jimini,

        Could you please guide me-

        In which file we have to update the below code?

        Comment

        • Jimini
          Junior Member
          • May 2010
          • 22

          #5
          anjiytwok,
          I only updated a script, which looks for available updates on a Gentoo system.
          The reason was, that the line in zabbix_agentd.conf took too long to bring a result, so I put everything into a script and delivered it to the Zabbix server by using zabbix_sender.

          Best regards,
          Jimini

          Comment

          • alin.ilie
            Junior Member
            • Mar 2014
            • 5

            #6
            Hi Jimini,

            I'm having the exact same issue with one of my scripts. It takes around 5-6 seconds to show the result. Never thought of using zabbix sender till now. One question though, can you please tell me how did you configured the item in the dashboard?

            Thank you.

            Comment

            • alin.ilie
              Junior Member
              • Mar 2014
              • 5

              #7
              Originally posted by alin.ilie
              Hi Jimini,

              I'm having the exact same issue with one of my scripts. It takes around 5-6 seconds to show the result. Never thought of using zabbix sender till now. One question though, can you please tell me how did you configured the item in the dashboard?

              Thank you.
              OK, scratch that. I've solved this by creating a Zabbix Item with the type Zabbix trapper. Easy. Then I'm sending my data (a simple response code from an HTTP check) by calling the zabbix sender like so:

              Code:
              zabbix_sender -c /usr/local/etc/zabbix_agentd.conf -k gsc.state -o $RESPONSE_CODE
              This is part of the script, as Jimini suggested:

              #!/bin/bash
              RESPONSE_CODE=`/home/ailie/./gsc State`
              zabbix_sender -c /usr/local/etc/zabbix_agentd.conf -k gsc.state -o $RESPONSE_CODE
              This works perfectly. I'm calling my script from the command line and it sends the response code into the Zabbix dashboard.

              Now, the problem is that I want to receive periodic updates with the response code WITHOUT using a cronjob.

              Is there any way to get this into the UserParameter in the zabbix_agentd.conf file?

              I've tried creating another item, this time of type agent, gave it a key, and set this in the zabbix_agentd.conf

              UserParameter=calling.sender,/home/ailie/gsc_sender \$1
              It does absolutely nothing.

              I'm sure I'm missing something here, there has to be a way to call the sender periodically, otherwise (calling it only manually) makes very little sense to me.

              Thank you.

              Alin.

              Comment

              • Jimini
                Junior Member
                • May 2010
                • 22

                #8
                alin.ilie,

                simply select "Zabbix trapper" as the type of the item.

                Best regards,
                Jimini

                P.S.: Zabbix sender is ideal to collect some data at a fixed moment or for events like a completed task (e.g. virus scanning).
                Last edited by Jimini; 31-03-2014, 14:57.

                Comment

                • Jimini
                  Junior Member
                  • May 2010
                  • 22

                  #9
                  Originally posted by alin.ilie
                  Now, the problem is that I want to receive periodic updates with the response code WITHOUT using a cronjob.

                  Is there any way to get this into the UserParameter in the zabbix_agentd.conf file?

                  I've tried creating another item, this time of type agent, gave it a key, and set this in the zabbix_agentd.conf

                  It does absolutely nothing.

                  I'm sure I'm missing something here, there has to be a way to call the sender periodically, otherwise (calling it only manually) makes very little sense to me.

                  Thank you.

                  Alin.
                  Alin,

                  you could try adding the "Timeout" parameter to zabbix_agentd.conf, like
                  Code:
                  Timeout=30
                  (must be between 1 und 30)

                  Best regards,
                  Jimini

                  Comment

                  • alin.ilie
                    Junior Member
                    • Mar 2014
                    • 5

                    #10
                    Jimini,

                    Thank you very much for this suggestion. I've set the timeout to 30 seconds to both the agent and the server in their respective .conf files and it works like a charm.

                    Thank you.

                    Comment

                    Working...