binarybucks / homA

An extensible framework for the smart home
Eclipse Public License 1.0
137 stars 24 forks source link

Web interface disconnects every 300s #117

Closed jpmens closed 11 years ago

jpmens commented 11 years ago

Related to #112 ?

I note, at least on Chrome, that the Web interface disconnects (see it disconnecting in the status bar) and reconnects every 5 minutes. Page goes blank except for an "All" and the logo in the status bar. It then re-connects after a second or two.

Not tragic of course, just 'strange' ;)

binarybucks commented 11 years ago

I guess @stylpen will not sleep tonight as we found some issue in WSS.

jpmens commented 11 years ago

No cigar, gentlemen, at least, I don't think so. I'm not in my usual habitat at the moment, so this may be something else, but I've just seen

2013-07-03T18:05:38 [16] Unexpected EOF from remote endpoint, terminating connection

from WSS.

My local mosquitto broker shows the following. (It's trying to create a bridge to another mosquitto on my home LAN which it cannot reach at the moment. Unsure if that's the cause, but I don't think so.)


1372869750: Connecting bridge hippo (mybridge.example.com:1883)
1372869827: Error creating bridge.
1372869827: Client homA-web-0qec6qiwwmi has exceeded timeout, disconnecting.
1372869827: Client mosqsub/97590-tiggr.ww. has exceeded timeout, disconnecting.
1372869827: Client mosq/D8C6FDD00F937314C7 has exceeded timeout, disconnecting.
1372869827: Client mosq/0D4FFADEFFA49014CD has exceeded timeout, disconnecting.
1372869827: Connecting bridge hippo (mybridge.example.com:1883)
1372869827: Error creating bridge.
1372869827: Found id for client "homA-web-0qec6qiwwmi", their index was 14.
1372869827: Found id for client "mosqsub/97590-tiggr.ww.", their index was 19.
1372869827: Found id for client "mosq/D8C6FDD00F937314C7", their index was 24.
1372869827: Found id for client "mosq/0D4FFADEFFA49014CD", their index was 25.
1372869828: New connection from ::1 on port 1883.
1372869828: New client connected from ::1 as mosqsub/97590-tiggr.ww. (c1, k60).
1372869828: New connection from ::1 on port 1883.
1372869828: New connection from ::1 on port 1883.
1372869828: New client connected from ::1 as mosq/0D4FFADEFFA49014CD (c1, k60).
1372869828: New client connected from ::1 as mosq/D8C6FDD00F937314C7 (c1, k60).
1372869832: New connection from ::1 on port 1883.
1372869832: New client connected from ::1 as homA-web-oanxblf2yb9 (c1, k60).
1372869858: Connecting bridge hippo (mybridge.example.com:1883)
1372869858: Error creating bridge.
1372869888: Connecting bridge hippo (mybridge.example.com:1883)
1372869888: Error creating bridge.
1372869920: Connecting bridge hippo (mybridge.example.com:1883)
1372869996: Error creating bridge.
1372869996: Client mosqsub/97590-tiggr.ww. has exceeded timeout, disconnecting.
1372869996: Client mosq/0D4FFADEFFA49014CD has exceeded timeout, disconnecting.
1372869996: Client mosq/D8C6FDD00F937314C7 has exceeded timeout, disconnecting.
1372869996: Client homA-web-oanxblf2yb9 has exceeded timeout, disconnecting.
1372869996: Connecting bridge hippo (mybridge.example.com:1883)
1372869996: Error creating bridge.
1372869996: Found id for client "mosqsub/97590-tiggr.ww.", their index was 14.
1372869996: Found id for client "mosq/0D4FFADEFFA49014CD", their index was 15.
1372869996: Found id for client "mosq/D8C6FDD00F937314C7", their index was 16.
1372869996: Found id for client "homA-web-oanxblf2yb9", their index was 18.
1372869997: New connection from ::1 on port 1883.
1372869997: New client connected from ::1 as mosqsub/97590-tiggr.ww. (c1, k60).
1372869997: New connection from ::1 on port 1883.
1372869997: New connection from ::1 on port 1883.
1372869997: New client connected from ::1 as mosq/0D4FFADEFFA49014CD (c1, k60).
1372869997: New client connected from ::1 as mosq/D8C6FDD00F937314C7 (c1, k60).
1372870001: New connection from ::1 on port 1883.
1372870001: New client connected from ::1 as homA-web-psv3joh1714i (c1, k60).
1372870026: Connecting bridge hippo (mybridge.example.com:1883)
1372870026: Error creating bridge.
1372870058: Connecting bridge hippo (mybridge.example.com:1883)
1372870058: Error creating bridge.

Is there anything else I can do to help you debug this?

binarybucks commented 11 years ago

I guess you started WSS with the --verbose flag?

Besides that, the message you are seeing is that a websocket connection was not closed by the connected browser. This might happen sometimes if you close the browser window or put the computer into standby mode so the webinterface has no chance to trigger a clean disconnect. If the webinterface has a stable connection without timeouts, this is perfectly well behavior.

I'm however not sure what caused the log line Client homA-web-0qec6qiwwmi has exceeded timeout, disconnecting. Are you still seeing excessive disconnects due to timeouts or was the one above just a coincidence?

jpmens commented 11 years ago

Yes, with --verbose.

The laptop was asleep in between, but the mosquitto's log above was produced after I refreshed the browser.

Not a coincidence it seems. Here it is again:

1372871231: Client homA-web-f3dmrskprpb9 has exceeded timeout, disconnecting.

On Wed Jul 03 2013 at 19:07:54 CEST, Alexander Rust wrote:

I guess you started WSS with the --verbose flag?

Besides that, the message you are seeing is that a websocket connection was not closed by the connected browser. This might happen sometimes if you close the browser window or put the computer into standby mode so the webinterface has no chance to trigger a clean disconnect. If the webinterface has a stable connection without timeouts, this is perfectly well behavior.

I'm however not sure what caused the log line Client homA-web-0qec6qiwwmi has exceeded timeout, disconnecting. Are you still seeing excessive disconnects due to timeouts or was the one above just a coincidence?


Reply to this email directly or view it on GitHub: https://github.com/binarybucks/homA/issues/117#issuecomment-20430304

jpmens commented 11 years ago

Sorry @binarybucks : I can no longer reproduce, at least not at the moment. I've disabled the bridge in Mosquitto and the disconnects I mentioned no longer appear.

binarybucks commented 11 years ago

Awesome. Just reopen this issue if it appears again.

Mit freundlichen Grüßen / With kind regards Alexander Rust On 4 Jul 2013 08:48, "JP Mens" notifications@github.com wrote:

Sorry @binarybucks https://github.com/binarybucks : I can no longer reproduce, at least not at the moment. I've disabled the bridge in Mosquitto and the disconnects I mentioned no longer appear.

— Reply to this email directly or view it on GitHubhttps://github.com/binarybucks/homA/issues/117#issuecomment-20461585 .