ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
901 stars 91 forks source link

Upon upgrade -> Error: listen EADDRINUSE: address already in use :::44979 #1051

Closed keness521 closed 2 years ago

keness521 commented 2 years ago

Issue

After upgrading to homebridge-hue v0.13.29, I get the following error. I did also upgrade to homebridge-config-ui-x v4.41.3 at the same time (hue first, reboot in between) so I can't pin down which would be the source of the new issue.

I rolled back to homebridge-config-ui-x v4.41.2 and left homebridge-hue at v0.13.29 and the error went away and the plugin starts up fine and the shades work as they did before, so this does lead me to believe the issue may be there, not with homebridge-hue, but I want to mention it just on the chance that all is not as it seems to a layman like myself.

Edit: It is obvious, but I named the child bridge I run homebridge-hue in "Zigbee" just for OCD organizational sake, since I don't use any Hue hubs or devices.

Edit 2: I have two other completely separate and distinct 'homes' and both of them upgraded to both the latest hue and the latest config-ui without issue. Neither of those have any shades of that same type.

Log Messages

[26/11/2021, 17:43:50] [Zigbee] Restarting Process...
[26/11/2021, 17:43:51] [Zigbee] Launched child bridge with PID 8872
[26/11/2021, 17:43:54] Registering platform 'homebridge-hue.Hue'
[26/11/2021, 17:43:54] [Zigbee] Loaded homebridge-hue v0.13.29 child bridge successfully
[26/11/2021, 17:43:54] Loaded 0 cached accessories from cachedAccessories.0E591002B146.
[26/11/2021, 17:43:54] [Zigbee] homebridge-hue v0.13.29, node v16.13.0, homebridge v1.3.8
[26/11/2021, 17:43:54] [Zigbee] Phoscon-GW: dresden elektronik deCONZ gateway v2.12.6, api v1.16.0
[26/11/2021, 17:43:54] [Zigbee] Phoscon-GW: 6 accessories
[26/11/2021, 17:44:00] [Zigbee] masked debug info dumped to /var/lib/homebridge/homebridge-hue.json.gz
[26/11/2021, 17:44:00] Initializing platform accessory 'Phoscon-GW'...
[26/11/2021, 17:44:00] [Zigbee] Phoscon-GW: 3 services
[26/11/2021, 17:44:00] Initializing platform accessory 'Outside Lights'...
[26/11/2021, 17:44:00] Initializing platform accessory 'Office Lights'...
[26/11/2021, 17:44:00] Initializing platform accessory 'Office Shade 1'...
[26/11/2021, 17:44:00] Initializing platform accessory 'Office Shade 2'...
[26/11/2021, 17:44:00] Initializing platform accessory 'Office Shade 3'...
Error: listen EADDRINUSE: address already in use :::44979
    at Server.setupListenHandle [as _listen2] (node:net:1334:16)
    at listenInCluster (node:net:1382:12)
    at Server.listen (node:net:1469:7)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:155:20)
    at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:316:21)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1252:18)
    at BridgeService.publishBridge (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:215:17)
    at ChildBridgeFork.startBridge (/usr/local/lib/node_modules/homebridge/src/childBridgeFork.ts:172:24)
[26/11/2021, 17:44:01] [Zigbee] goodbye
[26/11/2021, 17:44:01] [Zigbee] Child bridge process ended
[26/11/2021, 17:44:01] [Zigbee] Process Ended. Code: 1, Signal: null
[26/11/2021, 17:44:08] [Zigbee] Restarting Process...

Debug Files

I've already restored my setup to a working state, so I don't think the dump file would show anything anymore, but if needed, I will re-upgrade to the non-working state, and then attach that dump file. Just let me know if you would like to see that.

Thanks!

ebaauw commented 2 years ago

This is not related to Homebridge Hue. The port on which Homebridge wants to start its server is in already use, probably because Homebridge is already running.

keness521 commented 2 years ago

Wow, that was fast, I actually added some edits to my post and you'd already replied! hah

So it had nothing to do with the shades. Ok, that port can be changed I assume... I'll re-upgrade and try and fix it.

Thanks!

keness521 commented 2 years ago

I re-upgraded, got the "You must restart and refresh" button, clicked that, and then got the error again.

So I completely powered down the pi and restarted, and when it came back, everything started properly.

Thanks for the help. All fixed.