Page 1 of 1

Paused HTTP GET (error)

Posted: Wed May 08, 2019 1:18 pm
by mart3223
Hi All,

We recieve in a XML file the location of the printfiles. Sometimes the link is broken, and is it impossible to download the file. But when that happens the HTTP Request gets a red gear, and every other file is put on hold until I manual delete the XML file with the broken link.
errordownload.PNG
errordownload.PNG (8.71 KiB) Viewed 7731 times
Is there a way to put the jobs with a HTTP GET error in the problems folder?

Hope someone can help. Have a nice day!

Kind Regards,
Martijn

Re: Paused HTTP GET (error)

Posted: Thu May 09, 2019 1:39 pm
by freddyp
When the server returns a 4xx HTTP status code (400 or higher means an error), the job is sent along the error connection and you can build a clean flow. The most logical status code is 404: URL not found.

The description you give suggests that it returns a 5xx error (these errors mean that there is a problem with the server itself and then Switch puts the element in an error state). In other words, it looks like it is a bad implementation on the part of the server.

Side note: HTTP return values can be tricky. I know of servers implementations that return 200 in such a case. 200 means that it is OK, but they include a message in the return body that there is an error.

Re: Paused HTTP GET (error)

Posted: Fri May 10, 2019 10:07 am
by billy.olvestad
mart3223 wrote: Wed May 08, 2019 1:18 pm Hi All,

We recieve in a XML file the location of the printfiles. Sometimes the link is broken, and is it impossible to download the file. But when that happens the HTTP Request gets a red gear, and every other file is put on hold until I manual delete the XML file with the broken link.

errordownload.PNG

Is there a way to put the jobs with a HTTP GET error in the problems folder?

Hope someone can help. Have a nice day!

Kind Regards,
Martijn
Are you sure the link is broken? Have you retried the job?
I get this problem a lot with some web servers, and I have just set switch to automatically "retry failed external processes" after 10 minutes in the preferences, and the problems have gone away.
In other words, in my case the links are not broken. It's just that the web server I am connecting to seems to be a bit flaky.

Re: Paused HTTP GET (error)

Posted: Thu May 16, 2019 2:41 pm
by mart3223
Yes, i'm sure. There are some customers who have a fault in there system. The link in the XML file is then: "http://test.test.com/a.pdf http://test.test.com/a.pdf" 2 links in one string. So it never connects to a webserver (due the faulty link) so we never get a 404 error. I tried to search to a string like ".pdf https" and ".pdf%20https" (URI) if that exist to put the file to the error folder but that doesn't work also.

Re: Paused HTTP GET (error)

Posted: Fri May 31, 2019 1:04 pm
by borisCM
if you use a command line tool like wget you won't get that issue.
it just gives no output.

https://www.gnu.org/software/wget/manual/wget.html

kind regards

Re: Paused HTTP GET (error)

Posted: Tue Jun 04, 2019 1:57 pm
by mart3223
borisCM wrote: Fri May 31, 2019 1:04 pm if you use a command line tool like wget you won't get that issue.
it just gives no output.

https://www.gnu.org/software/wget/manual/wget.html

kind regards
Thanks, but I think that would be the problem. He is expecting a output but he doesn't get one. I didn't find a solution yet, anyone?

Re: Paused HTTP GET (error)

Posted: Wed Sep 11, 2019 2:06 pm
by borisCM
could you share a bad url? so i can do some tests?

kind regards
Boris