Opened 10 years ago

Closed 10 years ago

#1345 closed Defect (fixed)

trickle_deadline_handler does not skip messages when error detected

Reported by: Christian Beer Owned by: Christian Beer
Priority: Minor Milestone: Undetermined
Component: Server - Other Version:
Keywords: Cc: davea

Description

Problem: Because of the hostid check in trickle_deadline_handler.cpp:99

sprintf(buf, " where name='%s' and hostid=%u", task_name, mfh.hostid);

and how the handler framework handles such cases the handler will retry the same message again and again if the query fails.

In my case it failed because somehow the hostid of the result changed between sending the trickle message and the query by the trickle handler. This was flooding the logfile.

Proposed change: mark failed messsages by setting handled=2 and change the purge_trickles.php script to only delete messages with handled=1. This would allow the admin to investigate on the message.

Remark: The hostid check was put in place to prevent some kind of DoS Attack by a third party by spamming the server with fake trickle messages. This would mean that we are extending results that are no longer running and would prevent another task to be created.

Change History (1)

comment:1 Changed 10 years ago by davea

Resolution: fixed
Status: newclosed

I changed trickle_handler.cpp to always mark messages as handled.

Note: See TracTickets for help on using tickets.