Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daily crashes (ENOTCONN) #45

Closed
deeloke opened this issue Nov 6, 2019 · 6 comments · Fixed by #46
Closed

daily crashes (ENOTCONN) #45

deeloke opened this issue Nov 6, 2019 · 6 comments · Fixed by #46
Assignees
Labels
bug Something isn't working
Milestone

Comments

@deeloke
Copy link

deeloke commented Nov 6, 2019

Hi
My install has been crashing recently whilst complaining about ENOTCONN. Any ideas?

[05/11/2019, 10:45:59 pm] [Broadlink RM] Ceiling Fan setFanSpeed: 48
[05/11/2019, 10:45:59 pm] [Broadlink RM] Ceiling Fan setFanSpeed: (closest: 40)
[05/11/2019, 10:45:59 pm] [Broadlink RM] Ceiling Fan sendHex (192.168.1.70; 34:ea:34:e7:e8:76) 2600580000012b90153614111511141115111411153515111535151114111535153614111535151115101511153515111411151114361510153614361511143615351535151115351500056c00012a4815000c6600012b4815000d05
[05/11/2019, 10:45:59 pm] [Broadlink RM] Ceiling Fan setSwitchState: true
[05/11/2019, 10:45:59 pm] [Broadlink RM] Ceiling Fan setSwitchState: already true (no data sent - B)
[06/11/2019, 4:48:44 am] Error: read ENOTCONN
at tryReadStart (net.js:557:20)
at Socket._read (net.js:568:5)
at Socket.Readable.read (_stream_readable.js:490:10)
at Socket.read (net.js:608:39)
at new Socket (net.js:362:12)
at Object.Socket (net.js:253:41)
at createSocket (internal/child_process.js:311:14)
at ChildProcess.spawn (internal/child_process.js:424:23)
at Object.spawn (child_process.js:540:9)
at Object.probe (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-promise.js:44:15)
at Object.probe (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-sys.js:38:17)
at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/helpers/getDevice.js:14:16)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

[06/11/2019, 4:48:44 am] Got SIGTERM, shutting down Homebridge...
[06/11/2019, 4:48:44 am] Error: read ENOTCONN
at tryReadStart (net.js:557:20)
at Socket._read (net.js:568:5)
at Socket.Readable.read (_stream_readable.js:490:10)
at Socket.read (net.js:608:39)
at new Socket (net.js:362:12)
at Object.Socket (net.js:253:41)
at createSocket (internal/child_process.js:311:14)
at ChildProcess.spawn (internal/child_process.js:424:23)
at Object.spawn (child_process.js:540:9)
at Object.probe (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-promise.js:44:15)
at Object.probe (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-sys.js:38:17)
at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/helpers/getDevice.js:14:16)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

[06/11/2019, 4:48:44 am] [Broadlink RM] Error pinging Broadlink RM device at 192.168.1.70 (34:ea:34:e7:e8:76): Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...
[06/11/2019, 4:48:44 am] Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...
at ChildProcess. (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-promise.js:54:19)
at Object.onceWrapper (events.js:300:26)
at ChildProcess.emit (events.js:210:5)
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

[06/11/2019, 4:48:49 am] Error: read ENOTCONN
at tryReadStart (net.js:557:20)
at Socket._read (net.js:568:5)
at Socket.Readable.read (_stream_readable.js:490:10)
at Socket.read (net.js:608:39)
at new Socket (net.js:362:12)
at Object.Socket (net.js:253:41)
at createSocket (internal/child_process.js:311:14)
at ChildProcess.spawn (internal/child_process.js:424:23)
at Object.spawn (child_process.js:540:9)
at Object.probe (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-promise.js:44:15)
at Object.probe (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-sys.js:38:17)
at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/helpers/getDevice.js:14:16)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

[06/11/2019, 4:48:49 am] Error: read ENOTCONN
at tryReadStart (net.js:557:20)
at Socket._read (net.js:568:5)
at Socket.Readable.read (_stream_readable.js:490:10)
at Socket.read (net.js:608:39)
at new Socket (net.js:362:12)
at Object.Socket (net.js:253:41)
at createSocket (internal/child_process.js:311:14)
at ChildProcess.spawn (internal/child_process.js:424:23)
at Object.spawn (child_process.js:540:9)
at Object.probe (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-promise.js:44:15)
at Object.probe (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-sys.js:38:17)
at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/helpers/getDevice.js:14:16)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7)

[06/11/2019, 4:48:49 am] [Broadlink RM] Error pinging Broadlink RM device at 192.168.1.70 (34:ea:34:e7:e8:76): Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...
[06/11/2019, 4:48:49 am] Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...
at ChildProcess. (/usr/local/lib/node_modules/homebridge-broadlink-rm-tv/node_modules/ping/lib/ping-promise.js:54:19)
at Object.onceWrapper (events.js:300:26)
at ChildProcess.emit (events.js:210:5)
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)

@kiwi-cam
Copy link
Collaborator

kiwi-cam commented Nov 6, 2019

Hi @deeloke . Do you get this constantly - like every five seconds?

We ping the Broadlink device every 5 seconds to confirm that it's still online. If this happens intermittently then it might just be a matter of tweaking the logic. If it's constant... I'll need to dig deeper and get to the bottom of it.

Unfortunately I'm at work so can't dig much deeper into this right now.

@kiwi-cam kiwi-cam self-assigned this Nov 6, 2019
@kiwi-cam kiwi-cam added the bug Something isn't working label Nov 6, 2019
@deeloke
Copy link
Author

deeloke commented Nov 6, 2019 via email

@kiwi-cam
Copy link
Collaborator

kiwi-cam commented Nov 6, 2019

Sweet. I'm comfortable just reporting and ignoring the error then. I've made a change but I can't test it at the moment. If you're able could you:

  1. run npm install -g git+https://github.com/AlexanderBabel/homebridge-broadlink-rm#kiwi-cam-pingerror
  2. restart homebridge
  3. try again

If not, I'll take a look this evening.

@kiwi-cam
Copy link
Collaborator

kiwi-cam commented Nov 7, 2019

I've just installed this version at home and initial testing looks good. I'll run it for a day or two and make sure there's nothing unexpected then I'll update the master. If you get a chance to run this version too, let me know how it goes.

@kiwi-cam kiwi-cam added this to the Testing milestone Nov 7, 2019
@deeloke
Copy link
Author

deeloke commented Nov 7, 2019 via email

@kiwi-cam
Copy link
Collaborator

kiwi-cam commented Nov 7, 2019

That all looks perfect to me. Let me know if you do have any further crashes.

If the same thing happens again you'll see this line:
[Broadlink RM] Error pinging Broadlink RM device at 192.168.1.70 (34:ea:34:e7:e8:76): Error: ping.probe: there was an error while executing the ping program. . Check the path or permissions...
but Homebridge will now keep running.

kiwi-cam added a commit that referenced this issue Nov 10, 2019
* Improved ping error handling

Removed exception throw and treated as a non response to allow retries

Fixes #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants