Ring: Ring Plugin is causing bridge service to shut down

Created on 17 Jun 2020  路  7Comments  路  Source: dgreif/ring

Bug Report

Describe the Bug

Bridge service stops almost as soon as it starts - seems to be caused by a duplicate address issue per the log

To Reproduce

Every time I restart or reboot the service only runs for less than a minute before stopping

Expected behavior

I would expect the bridge service to be stable and continue to run

Screenshots/Logs

6/17/2020, 12:23:45 PM Loaded plugin "homebridge-alexa".
6/17/2020, 12:24:04 PM Loaded plugin "homebridge-camera-ffmpeg".
6/17/2020, 12:24:04 PM Loaded plugin "homebridge-myq2".
6/17/2020, 12:24:06 PM Loaded plugin "homebridge-platform-wemo".
6/17/2020, 12:24:27 PM Loaded plugin "homebridge-ring".
6/17/2020, 12:24:28 PM Loaded plugin "homebridge-samsung-tizen".
6/17/2020, 12:24:28 PM Loaded plugin "homebridge-wyze-connected-home".
6/17/2020, 12:24:29 PM [Alexa] homebridge-alexa v0.4.72, node v12.16.2, homebridge v3.2.6
6/17/2020, 12:24:29 PM [Alexa] Initializing platform accessory "Alexa"...
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory a1325ac6- Ring Alarm
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 583065b1- Garage Door
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 22a539f9- Living Room
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 728beaee First Alert Smoke Alarm 1
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 6f8b22de First Alert CO Alarm 1
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory b55675c2 First Alert Smoke Alarm 2
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory c15b8890 First Alert CO Alarm 2
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory d916d593 Sump Pump Flood Freeze Sensor XXXXX
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 65952612 Water main line entry Flood Freeze Sensor XXXXX
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 345e88ff- Sliding Patio Door Contact Sensor XXXXX
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 6fe64c31-f Front Door
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 9d3dad73- Front Room Motion Detector 28641
6/17/2020, 12:24:30 PM [Ring] Configuring cached accessory 2d465a71- Front Door
6/17/2020, 12:24:39 PM Error: listen EADDRINUSE: address already in use :::51826
at Server.setupListenHandle [as _listen2] (net.js:1313:16)
at listenInCluster (net.js:1361:12)
at Server.listen (net.js:1449:7)
at EventedHTTPServer._this.listen (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/dist/lib/util/eventedhttp.js:86:30)
at HAPServer._this.listen (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/dist/lib/HAPServer.js:188:31)
at Bridge.Accessory._this.publish (/usr/local/lib/node_modules/@hoobs/hoobs/node_modules/hap-nodejs/dist/lib/Accessory.js:560:27)
at Server.publish (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:134:21)
at Server.run (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/server.js:101:18)
at module.exports (/usr/local/lib/node_modules/@hoobs/hoobs/bridge/cli.js:84:12)
at Object. (/usr/local/lib/node_modules/@hoobs/hoobs/bin/hoobs:95:81)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
6/17/2020, 12:24:39 PM [Ring] Request for machine id timed out. Falling back to random session id
6/17/2020, 12:24:40 PM Got SIGTERM, shutting down Bridge...
6/17/2020, 12:24:48 PM [Belkin WeMo] Online: Sump pump [1491822434F0]

Note: I truncated cached accessory references and replaced serial numbers with XXXXX - let me know if either of these elements is required.

Additional context

Add any other context about the problem here.
I updated the plugin last night and again this morning - I believe I was having the issue since at least last night, but maybe longer (it was 9.1.1 before I updated)

Homebridge Ring Config

Post homebridge-ring platform config _without sensitive information_

 {
            "platform": "Ring",
            "plugin_map": {
                "plugin_name": "homebridge-ring"
            },
            "refreshToken": "xxx",
            "hideUnsupportedServices": true,
            "hideDeviceIds": [],
            "locationIds": []
        },

Environment

  • OS: HOOBS SD image running on RaspberryPi
  • Node.js: [e.g. 12.14.1] v12.16.2
  • NPM: [e.g 6.13.4] 6.14.4
  • homebridge-ring: [e.g 6.0.3] 9.3.2
  • homebridge: [e.g. 0.4.50 or N/A] N/A
  • hoobs: [e.g. 0.4.50 or N/A] 3.2.6
bug

All 7 comments

And of course, as soon as I posted this, my service became stable.

Whilst I did still get the message:
6/17/2020, 12:49:00 PM [Ring] Request for machine id timed out. Falling back to random session id

It was not followed by
6/17/2020, 12:24:40 PM Got SIGTERM, shutting down Bridge...

nor do I seem to have the earlier error that starts with
6/17/2020, 12:24:39 PM Error: listen EADDRINUSE: address already in use :::51826

Anymore.

Cheers,

@ourstanley can you post the results of:

grep 51826 config.json

To me, this doesn't look like a Ring problem, more that you are using port 51826 twice (could be a stuck process also).

hoobs@hoobs:/home/hoobs/.hoobs/etc $ grep 51826 config.json
"port": 51826,
hoobs@hoobs:/home/hoobs/.hoobs/etc $

Is this what you needed?

Sorry, try it this way:

grep -C 5 51826 config.json

If it looks like this:

  "bridge": {
    "name": "Homebridge", 
    "port": 51826, 
  },

Then this issue is not a Ring issue at all. You had a 2nd instance of Homebridge that was conflicting.

hoobs@hoobs:/home/hoobs/.hoobs/etc $ grep -C 5 51826 config.json
"country_code": "US",
"postal_code": "12345"
},
"bridge": {
"name": "HOOBS",
"port": 51826,
"pin": "XXX-45-154",
"username": "XX:54:XX:62:XX:F7"
},
"description": "",
"ports": {},
hoobs@hoobs:/home/hoobs/.hoobs/etc $

Here you go - I've altered the postal code, but that's all (oops, altered the pin and username as well - should be an issue, but better safe than sorry)

This issue is unrelated to Ring. I would suggest closing the issue, it's exactly what I stated.

@ourstanley I agree with dxdc, this looks like a HOOBS issue. They have great support, so I suggest you reach out to them to get it resolved.

Was this page helpful?
0 / 5 - 0 ratings