Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26319

Remote scripts on proxy is limited to 60s

XMLWordPrintable

    • S25-W16/17
    • 4

      Server:

      zabbix_server (Zabbix) 7.0.11
      Revision 7b462dfe68e 27 March 2025, compilation time: Mar 27 2025 08:29:56
      

      Proxy:

      zabbix_proxy (Zabbix) 7.0.11
      Revision 7b462dfe68e 27 March 2025, compilation time: Mar 27 2025 08:36:50
      

      Script on proxy:

      # cat /usr/lib/zabbix/alertscripts/sleep.sh
      #!/bin/bash
      echo "===================" | tee --append /tmp/sleep.log
      date | tee --append /tmp/sleep.log
      sleep $1
      echo $1 | tee --append /tmp/sleep.log
      date | tee --append /tmp/sleep.log
      echo "===================" | tee --append /tmp/sleep.log
      cat /tmp/sleep.log
      

      When passing "sleep.sh 65", the proxy executes task well (spending 65s):

      1438194:20250415:073140.980 Executing command '/usr/lib/zabbix/alertscripts/sleep.sh 65'
      1438194:20250415:073140.980 In zbx_script_execute()
      1438194:20250415:073140.980 In zbx_popen() command:'/usr/lib/zabbix/alertscripts/sleep.sh 65'
      1438194:20250415:073140.991 End of zbx_popen():19
      1438194:20250415:073246.018 In zbx_waitpid()
      1438194:20250415:073246.018 zbx_waitpid() exited, status:0
      1438194:20250415:073246.018 End of zbx_waitpid():1491061
      1438194:20250415:073246.018 End of zbx_script_execute():SUCCEED
      1438194:20250415:073246.018 query [txnlev:1] [begin;]
      1438194:20250415:073246.018 In zbx_tm_save_task()
      1438194:20250415:073246.018 In DBget_nextid() tablename:'task'
      1438194:20250415:073246.018 query [txnlev:1] [select nextid from ids where table_name='task' and field_name='taskid']
      1438194:20250415:073246.020 query [txnlev:1] [update ids set nextid=nextid+1 where table_name='task' and field_name='taskid']
      1438194:20250415:073246.020 query [txnlev:1] [select nextid from ids where table_name='task' and field_name='taskid']
      1438194:20250415:073246.020 End of DBget_nextid():856 table:'task' recid:'taskid'
      1438194:20250415:073246.023 query [txnlev:1] [insert into task (taskid,type,status,clock,ttl,proxyid) values (856,3,1,1744691500,0,null);.]
      1438194:20250415:073246.023 query [txnlev:1] [insert into task_remote_command_result (taskid,status,parent_taskid,info) values (856,0,9008,'...');.]
      1438194:20250415:073246.024 End of zbx_tm_save_task():SUCCEED
       

      But the trapper port on the central server seems to give up with:

      trapper #3 [processed data in 60.093292 sec, waiting for connection]
      

      Global Timeout settings:

      zabbix_server.conf contains: "TrapperTimeout=100"

      Maybe the culprit is constant "SEC_PER_MIN" in line:

      	for (int time_start = time(NULL); SEC_PER_MIN > time(NULL) - time_start; sleep(1))
      

      https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/src/libs/zbxtrapper/nodecommand.c?at=refs%2Fheads%2Frelease%2F7.0#78

            askolmeisters Armands Arseniuss Skolmeisters
            aigars.kadikis Aigars Kadikis
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 1h
                1h