Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Custom HTTP Call Failing

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
SJG1976
Posts: 365
Joined: Wed 21 Dec 2011 11:04 am
Weather Station: Davis WLL, with Airlink
Operating System: Raspberry Pi3 MX on USB Drive
Location: Glemsford, Suffolk
Contact:

Custom HTTP Call Failing

Post 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
User avatar
ConligWX
Posts: 1631
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI
Contact:

Re: Custom HTTP Call Failing

Post 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.
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
User avatar
SJG1976
Posts: 365
Joined: Wed 21 Dec 2011 11:04 am
Weather Station: Davis WLL, with Airlink
Operating System: Raspberry Pi3 MX on USB Drive
Location: Glemsford, Suffolk
Contact:

Re: Custom HTTP Call Failing

Post 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
User avatar
mcrossley
Posts: 12766
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Custom HTTP Call Failing

Post 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!
User avatar
SJG1976
Posts: 365
Joined: Wed 21 Dec 2011 11:04 am
Weather Station: Davis WLL, with Airlink
Operating System: Raspberry Pi3 MX on USB Drive
Location: Glemsford, Suffolk
Contact:

Re: Custom HTTP Call Failing

Post 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
User avatar
mcrossley
Posts: 12766
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Custom HTTP Call Failing

Post 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 :(
User avatar
SJG1976
Posts: 365
Joined: Wed 21 Dec 2011 11:04 am
Weather Station: Davis WLL, with Airlink
Operating System: Raspberry Pi3 MX on USB Drive
Location: Glemsford, Suffolk
Contact:

Re: Custom HTTP Call Failing

Post 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
User avatar
mcrossley
Posts: 12766
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Custom HTTP Call Failing

Post 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!
User avatar
SJG1976
Posts: 365
Joined: Wed 21 Dec 2011 11:04 am
Weather Station: Davis WLL, with Airlink
Operating System: Raspberry Pi3 MX on USB Drive
Location: Glemsford, Suffolk
Contact:

Re: Custom HTTP Call Failing

Post 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?
User avatar
mcrossley
Posts: 12766
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Custom HTTP Call Failing

Post 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?
User avatar
SJG1976
Posts: 365
Joined: Wed 21 Dec 2011 11:04 am
Weather Station: Davis WLL, with Airlink
Operating System: Raspberry Pi3 MX on USB Drive
Location: Glemsford, Suffolk
Contact:

Re: Custom HTTP Call Failing

Post 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.
Post Reply