Page 1 of 1
Custom HTTP Call Failing
Posted: Fri 28 Aug 2020 12:39 pm
by SJG1976
Not sure if it's best to place here or on Website one.
I have a couple of Custom HTTP Calls
One to process the Realtime.txt and one for the Day File.
If I run Direct from w Webpage they are working fine, if I'm using the Enabled URL in Settings/Internet Settings they are not being processed.
Looking at the MXDiags logs I just get a
Custom HTTP seconds update: An error occurred while sending the request.
Running on a Raspberry Pi 3
It seems like it has been working up to about a month or so ago.
I've now updated to lastest B3092 but hasn't made any difference.
So not sure if it's a Website Hosting change or something else, I'm currently using IONIS (Formely 1&1) as the Hosts.
Just wondering if anyone else has the same issue, or know what the cause is likely to be.
As I say if I run the URL Direct from a WebPage all updates fine.
Kind regards,
Steve
Re: Custom HTTP Call Failing
Posted: Fri 28 Aug 2020 12:47 pm
by ConligWX
SJG1976 wrote: ↑Fri 28 Aug 2020 12:39 pm
Looking at the MXDiags logs I just get a
Custom HTTP seconds update: An error occurred while sending the request.
Steve
Try enabling Data and debug logging, then run cumulumx.exe with the -debug parameter. give it 5 minutes and then stop cumulusmx and check the mxdiag log again.
goto Station Settings, options for debug and data log.
Re: Custom HTTP Call Failing
Posted: Fri 28 Aug 2020 3:49 pm
by SJG1976
THanks for the Quick Reply.
Not sure I set the Debugging up properly.
Using Raspberyy Pi I was running sudo mono cumulusmx.exe -debug
Looking at the MXLogs I don't seem to have anything extra in there.
2020-08-28 14:29:59.359 LOOP: Data packet is good
2020-08-28 14:30:00.040 Realtime[4]: Start cycle
2020-08-28 14:30:00.041 Realtime[4]: Creating realtime.txt
2020-08-28 14:30:00.043 Realtime[4]: Processing extra file[1] - /mnt/usbstorage/CumulusMX/web/feed.xml
2020-08-28 14:30:00.045 Realtime[4]: Processing extra file[2] - /mnt/usbstorage/CumulusMX/web/realtimegaugesT.txt
2020-08-28 14:30:00.055 Realtime[4]: Processing extra file[9] - /mnt/usbstorage/CumulusMX/web/varsT.php
2020-08-28 14:30:00.244 Custom HTTP seconds update: An error occurred while sending the request.
2020-08-28 14:30:00.498 Writing log entry for 28/08/2020 14:30:00
2020-08-28 14:30:00.498 max gust: 4.0
2020-08-28 14:30:00.500 Written log entry for 28/08/2020 14:30:00
2020-08-28 14:30:00.514 Writing today.ini, LastUpdateTime = 28/08/2020 14:30:00 raindaystart = 317.4 rain counter = 317.4
Re: Custom HTTP Call Failing
Posted: Fri 28 Aug 2020 6:35 pm
by mcrossley
I've never looked at this functionality before, but It sounds like the http request may be badly formed. Can you post the contents of the field in the settings form please.
I just tested it on my install and the requests were processed OK. Not much help but it proves something!
Re: Custom HTTP Call Failing
Posted: Sat 29 Aug 2020 9:51 am
by SJG1976
Hi Mark,
The Custom HTTP Calls that are called are
http://www.cm2weather.co.uk/importtosql ... altime.txt
Which should be run every 60 Seconds
https://www.cm2weather.co.uk/importtosq ... ayfile.txt
Which should be run at End of Day Rollover
Using these to process the dayfile and real-time TX to update the SQL Database Hosted on the Website for the Real-time Gauges and TOP10 Records etc.
Kind regards,
Steve
Re: Custom HTTP Call Failing
Posted: Sun 30 Aug 2020 3:25 pm
by mcrossley
I put your real time URL into MX (with a bad key obviously) and it worked OK - I got a response saying I'd used a bad key. The debug logging is quite poor for this function so I'll improve that, but it appears to be working OK for me

Re: Custom HTTP Call Failing
Posted: Sun 30 Aug 2020 6:44 pm
by SJG1976
Thanks Mark,
I'm not sure if it's going to be a DNS Name Resolution issue.
My Raspberry Pi seems to be usiong a Mixture of IPv6 and IPv4
So I'm not sure if the HTTP call is getting to the Server.
Kind regards,
Steve
Re: Custom HTTP Call Failing
Posted: Sun 30 Aug 2020 7:33 pm
by mcrossley
You could try putting in the servers IPv4 address instead of the host name as a test?
A few people have been having IPv6 issues on their rPis and ended up just disabling it system wide - if you don't need it of course!
Re: Custom HTTP Call Failing
Posted: Wed 02 Sep 2020 6:46 pm
by SJG1976
I'll give that a try I think,
But when I tried to resolve the Hostname it resolved to an odd IP address that was for an SSL link.
I guess it's due to the amount of Websites being hosted on that IP Address so not sure if an IP address would work?
Re: Custom HTTP Call Failing
Posted: Wed 02 Sep 2020 11:08 pm
by mcrossley
Yes, on shared hosting the hostname used is used to determine the web service to which you connect, so IP address will not work.
But you may be able to add the hostname and IPv4 address to your hosts file to use IPv4 routing, and retain the hostname in the url?
Re: Custom HTTP Call Failing
Posted: Sat 30 Jan 2021 10:06 pm
by SJG1976
Me Again.
Sorry to open up an old Thread.
Anyway.
I now have the Custom HTTP Call working.
Just thought I'd post to say it looks like the issue was running an older version of Mono (or Possibly Raspbian Jessie.)
These have now both been updated, and all is working OK again.
Steve.