docspell icon indicating copy to clipboard operation
docspell copied to clipboard

Periodic Queries - wierd inconsistent bug on "Start once"

Open TheFehr opened this issue 1 year ago • 1 comments

I have set up a periodic query that I am trying to send via webhook to a automation platform.

Sometimes the "Start once" button works perfectly fine. Sometimes I get this in the job log:

Sat, August 6th, 2022, 11:39: Using query: (& f:event-date:"*" f:sync-calendar:"true" )
Sat, August 6th, 2022, 11:39: Running query: Right((& f:event-date:"*" f:sync-calendar:"true" ))
Sat, August 6th, 2022, 11:39: HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()) sending request: Request(method=POST, uri=https://receiver.mydomain.com/webhook-test/docspell, httpVersion=HTTP/1.1, headers=Headers(Content-Type: application/json, Content-Length: 2447))
Sat, August 6th, 2022, 11:39: Job 9mDky3owx.../phil/periodic-query-notify2/Low execution failed. Retrying later.: Error sending notification via HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()): 404 Not Found
Sat, August 6th, 2022, 12:03: Using query: (& f:event-date:"*" f:sync-calendar:"true" )
Sat, August 6th, 2022, 12:03: Running query: Right((& f:event-date:"*" f:sync-calendar:"true" ))
Sat, August 6th, 2022, 12:03: HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()) sending request: Request(method=POST, uri=https://receiver.mydomain.com/webhook-test/docspell, httpVersion=HTTP/1.1, headers=Headers(Content-Type: application/json, Content-Length: 2447))
Sat, August 6th, 2022, 12:03: Job 9mDky3owx.../phil/periodic-query-notify2/Low execution failed. Retrying later.: Error sending notification via HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()): 404 Not Found
Sat, August 6th, 2022, 12:06: Using query: (& f:event-date:"*" f:sync-calendar:"true" )
Sat, August 6th, 2022, 12:06: Running query: Right((& f:event-date:"*" f:sync-calendar:"true" ))
Sat, August 6th, 2022, 12:06: HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()) sending request: Request(method=POST, uri=https://receiver.mydomain.com/webhook-test/docspell, httpVersion=HTTP/1.1, headers=Headers(Content-Type: application/json, Content-Length: 2447))
Sat, August 6th, 2022, 12:06: Job 9mDky3owx.../phil/periodic-query-notify2/Low execution failed. Retries exceeded.: Error sending notification via HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()): 404 Not Found

This is a "successful" log:

Sat, August 6th, 2022, 12:11: Using query: (& f:event-date:"*" f:sync-calendar:"true" )
Sat, August 6th, 2022, 12:11: Running query: Right((& f:event-date:"*" f:sync-calendar:"true" ))
Sat, August 6th, 2022, 12:11: HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()) sending request: Request(method=POST, uri=https://receiver.mydomain.com/webhook-test/docspell, httpVersion=HTTP/1.1, headers=Headers(Content-Type: application/json, Content-Length: 2447))
Sat, August 6th, 2022, 12:11: Job BW2JQYUTN.../phil/periodic-query-notify2/Low execution failed. Retrying later.: Error sending notification via HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()): 404 Not Found
Sat, August 6th, 2022, 12:12: Using query: (& f:event-date:"*" f:sync-calendar:"true" )
Sat, August 6th, 2022, 12:12: Running query: Right((& f:event-date:"*" f:sync-calendar:"true" ))
Sat, August 6th, 2022, 12:12: HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map()) sending request: Request(method=POST, uri=https://receiver.mydomain.com/webhook-test/docspell, httpVersion=HTTP/1.1, headers=Headers(Content-Type: application/json, Content-Length: 2447))
Sat, August 6th, 2022, 12:12: Send notification via HttpPost(https://receiver.mydomain.com/webhook-test/docspell,Map())
Sat, August 6th, 2022, 12:12: Job execution successful

TheFehr avatar Aug 06 '22 10:08 TheFehr

This looks like the url https://receiver.mydomain.com/webhook-test/docspell returns a 404 on some of the post requests? It cannot send the notification. I think this is not related to the "start once" button - this is only triggering the job, once it is running it's task is done. Hm, strange it is. I don't know anything about the software that drives the receiving url, but maybe you could take a look if the network to it and the server is fine? Maybe sending a bunch of such requests in a loop or something… After all docspell only sends a normal (always the same) http post request to this url, currently I would suspect something strange on the other end. Or maybe the logs of the receiving server can give some details about the requests that arrive there?

eikek avatar Aug 06 '22 10:08 eikek

The receiver is an instance of n8n. And is seems that it is the fault of n8n or mine.

But we can definitely close this. I was mostly confused by the ...-test/docspell,Map() ,Map() part in the logs. But I assume that is just formatting and does not influence the actual url being called.

TheFehr avatar Aug 17 '22 08:08 TheFehr