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 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

_wapi_connect: error looking up socket handle

Topics about the Beta trials up to Build 3043, the last build by Cumulus's founder Steve Loft. It was by this time way out of Beta but Steve wanted to keep it that way until he made a decision on his and Cumulus's future.

Moderator: mcrossley

Locked
igorzo
Posts: 10
Joined: Fri 30 Dec 2016 9:03 pm
Weather Station: davis pro 2
Operating System: windows 10

_wapi_connect: error looking up socket handle

Post by igorzo »

I have been having this problem since yesterday on raspberry, what can I depend on? And how to repair it. Thanks for help.

_wapi_connect: error looking up socket handle 0x11
_wapi_connect: error looking up socket handle 0x12
_wapi_connect: error looking up socket handle 0x22
_wapi_connect: error looking up socket handle 0x25
_wapi_connect: error looking up socket handle 0x26
_wapi_connect: error looking up socket handle 0x29
_wapi_connect: error looking up socket handle 0x2b
_wapi_connect: error looking up socket handle 0x2d
_wapi_connect: error looking up socket handle 0x2f
_wapi_connect: error looking up socket handle 0x37
_wapi_connect: error looking up socket handle 0x3a
_wapi_connect: error looking up socket handle 0x3a
_wapi_connect: error looking up socket handle 0x3c
_wapi_connect: error looking up socket handle 0x13
_wapi_connect: error looking up socket handle 0x17
_wapi_connect: error looking up socket handle 0x1a
_wapi_connect: error looking up socket handle 0x1b
_wapi_connect: error looking up socket handle 0x1e
_wapi_connect: error looking up socket handle 0x1e
_wapi_connect: error looking up socket handle 0x27
_wapi_connect: error looking up socket handle 0x2f
_wapi_connect: error looking up socket handle 0x30
_wapi_connect: error looking up socket handle 0x36
_wapi_connect: error looking up socket handle 0x39
_wapi_connect: error looking up socket handle 0x10
_wapi_connect: error looking up socket handle 0x16
_wapi_connect: error looking up socket handle 0x19
_wapi_connect: error looking up socket handle 0x1b
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: _wapi_connect: error looking up socket handle

Post by steve »

I've seen those messages myself, but I don't remember if I ever worked out what they were referring to. I think they may be bugs in Mono related to http fetches. What actual problems are you having?
Steve
igorzo
Posts: 10
Joined: Fri 30 Dec 2016 9:03 pm
Weather Station: davis pro 2
Operating System: windows 10

Re: _wapi_connect: error looking up socket handle

Post by igorzo »

The problem momentarily stops only on this signal, since it has appeared shortly after a few months that the station is working perfectly. I have verified that data transmitted towards pages wunderground and awekas works regularly. Should I install the mono again?
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: _wapi_connect: error looking up socket handle

Post by steve »

Sorry, I don't understand. What is the actual problem that you are having? What isn't working?
Steve
igorzo
Posts: 10
Joined: Fri 30 Dec 2016 9:03 pm
Weather Station: davis pro 2
Operating System: windows 10

Re: _wapi_connect: error looking up socket handle

Post by igorzo »

From checks done everything works, only the page on the raspberry shows me this message. The question can be blocked, even because it has never signaled these strings for months.
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: _wapi_connect: error looking up socket handle

Post by steve »

They are output by Mono, not Cumulus. There may be a way to turn them off, I don't know.
Steve
hillyjd
Posts: 29
Joined: Sun 23 Apr 2017 2:42 pm
Weather Station: Davis Vantage Vue
Operating System: Linux

Re: _wapi_connect: error looking up socket handle

Post by hillyjd »

So I just started having this problem. Noticed at work this morning that the last update to my online PWS page was midnight last night. When I got home, I see the "wapi_connect: error looking up socket handle 0x11. Webpage looks fine, and the station update time is current, but obviously the data is not getting to PWS. When I terminate Cumulus, get a bunch of "_wapi_thread_disown_mutex: error looking up thread by ID" errors. Restarted Cumulus MX, seems to be ok. Any thoughts?
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: _wapi_connect: error looking up socket handle

Post by steve »

What version of Mono are you using? It may be a bug that they have fixed in a later version. As you have a Davis station, you should be OK with the latest version. Assuming that you have debug logging turned on, are any messages logged to the MXdiags files about the PWS updates, which look like they indicate errors? I suspect that this happens when there are problems connecting to the service, and Mono doesn't clear down the resources used for the connection, eventually running out.

Do you also upload to Wunderground, and if so, was that working OK?
Steve
hillyjd
Posts: 29
Joined: Sun 23 Apr 2017 2:42 pm
Weather Station: Davis Vantage Vue
Operating System: Linux

Re: _wapi_connect: error looking up socket handle

Post by hillyjd »

Steve,

It appears I'm running Mono 3.2.8 (at least that's what I get when I type "mono --version".

I restarted CumulusMX Wed night (21 June). Everything seemed normal:

Today.ini = data/today.ini
Last update=2017-06-21T18:00:00
Connected to station
6:16:48 PM Downloading Archive Data
Cumulus running at: http://*:9999/
(Replace * with any IP address on this machine, or localhost)
Starting web socket server on port 8002
6/21/2017 6:16:48 PM
Type Ctrl-C to terminate
6:16:48 PM Downloading Archive Data
6:16:48 PM Normal running
wapi_connect: error looking up socket handle 0x11

But when I look at MXdiag, starting right about that same time, I see:

2017-06-21 18:16:48.981 Start Timers
2017-06-21 18:16:48.981 Starting 1-minute timer
2017-06-21 18:16:48.987 Starting Realtime timer, interval = 30 seconds
2017-06-21 18:17:09.752 !!! loop data not received, bytes received = 0
2017-06-21 18:17:19.030 Error connecting ftp - Connection refused
2017-06-21 18:17:19.407 Error uploading web/realtimegauges.txt to realtimegauges.txt : Connection refused
2017-06-21 18:17:19.922 !!! loop data not received, bytes received = 0
2017-06-21 18:17:20.225 Array index is out of range.
2017-06-21 18:17:27.681 !!! loop data not received, bytes received = 0
2017-06-21 18:17:27.982 Array index is out of range.
2017-06-21 18:17:48.989 Error connecting ftp - Connection refused
2017-06-21 18:17:48.996 Error uploading web/realtimegauges.txt to realtimegauges.txt : Connection refused

Those last 2 "Connection refused" lines are repeated every 30 minutes on through today. But here's the weird thing. It looks like my PWS website has current data and all the readings for the past couple of days. And my dashboard is current as well. So as far as I can tell, everything is fine except for the huge MXdiag file I now have.

Do you still recommend I upgrade mono? If so, is there an easy way to do that for those of us who are Linux-challenged.

r/
Jim
User avatar
steve
Cumulus Author
Posts: 26702
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: _wapi_connect: error looking up socket handle

Post by steve »

It looks like you have a number of different but possibly related intermittent communication issues. The ftp messages are probably because I made uploading of that file turned on by default, not spotting that it would also try to do it if ftp wasn't configured. You can just turn off the realtimegauges.txt setting in the internet configure.

If you are not already using a powered USB hub, that would be worth trying. The USB on the Pi is infamously poor, and the network and USB go through the same hardware.
Steve
hillyjd
Posts: 29
Joined: Sun 23 Apr 2017 2:42 pm
Weather Station: Davis Vantage Vue
Operating System: Linux

Re: _wapi_connect: error looking up socket handle

Post by hillyjd »

Steve,

Thought I would give you an update on this issue. After more online research, I discovered that USB 2.0 ports do not play well in the vicinity of USB 3.0 transmitters (like the Logitch hub for my keyboard and mouse). I found this out when I noticed that mymouse was not behaving well. So a few months ago I bought a USB extender cable (for my wireless Logitech keyboard), a wired mouse and moved my little Intel NUC computer away from the Raspberry Pi. Have not had any issues with Cumulus MX since then. Probably have gone over 4 months without a single hangup. Anyway, thought you'd like to know in case anybody else has had this kind of issue.

r/
Jim
Locked