Page 1 of 1

_wapi_connect: error looking up socket handle

Posted: Fri 19 May 2017 4:06 pm
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

Re: _wapi_connect: error looking up socket handle

Posted: Fri 19 May 2017 6:16 pm
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?

Re: _wapi_connect: error looking up socket handle

Posted: Sat 20 May 2017 2:51 pm
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?

Re: _wapi_connect: error looking up socket handle

Posted: Sat 20 May 2017 2:53 pm
by steve
Sorry, I don't understand. What is the actual problem that you are having? What isn't working?

Re: _wapi_connect: error looking up socket handle

Posted: Mon 22 May 2017 11:43 am
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.

Re: _wapi_connect: error looking up socket handle

Posted: Mon 22 May 2017 11:53 am
by steve
They are output by Mono, not Cumulus. There may be a way to turn them off, I don't know.

Re: _wapi_connect: error looking up socket handle

Posted: Thu 22 Jun 2017 1:20 am
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?

Re: _wapi_connect: error looking up socket handle

Posted: Thu 22 Jun 2017 8:22 am
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?

Re: _wapi_connect: error looking up socket handle

Posted: Sat 24 Jun 2017 9:48 pm
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

Re: _wapi_connect: error looking up socket handle

Posted: Sun 25 Jun 2017 7:26 am
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.

Re: _wapi_connect: error looking up socket handle

Posted: Thu 04 Jan 2018 10:59 pm
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