homebridge / homebridge-config-ui-x

The Homebridge UI. Monitor, configure and backup Homebridge from a browser.
https://homebridge.io
MIT License
2.63k stars 383 forks source link

UI only loading as blank page, Error: listen EADDRINUSE: address already in use :::8581 #1439

Closed brandislee closed 1 year ago

brandislee commented 1 year ago

Current Situation

Homebridge is working fine, but the UI is loading a blank page with no errors. I have tried making sure everything is up to date (my browser, npm, node), uninstalling and reinstalling several times, and nothing changes. There is a port issue showing in the logs but I don't know how to fix that and search isn't helping me.

Logs

[12/2/2022, 11:27:24 AM] Error: listen EADDRINUSE: address already in use :::51069
    at Server.setupListenHandle [as _listen2] (node:net:1372:16)
    at listenInCluster (node:net:1420:12)
    at Server.listen (node:net:1508:7)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/eventedhttp.ts:164:20)
    at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:377:21)
    at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1365:18)
    at step (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:144:27)
    at Object.next (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:125:57)
    at /usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:118:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/usr/local/lib/node_modules/homebridge/node_modules/tslib/tslib.js:114:16)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js:928:24)
    at BridgeService.publishBridge (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:215:17)
    at Server.publishBridge (/usr/local/lib/node_modules/homebridge/src/server.ts:203:24)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:194:24
    at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:193:5)
[12/2/2022, 11:27:24 AM] [iRobot] Roomba bougie betty  went offline, disconnecting...
[12/2/2022, 11:27:24 AM] [iRobot] Roomba bougie betty  connection closed, reconnecting in 5 seconds
[12/2/2022, 11:27:24 AM] Got SIGTERM, shutting down Homebridge...
[12/2/2022, 11:27:24 AM] [LitterRobotPlatform] Shutdown
[12/2/2022, 11:27:24 AM] [iRobot] Disconnecting From Roomba: bougie betty
[12/2/2022, 11:27:24 AM] [Hubitat-v2] INFO: Your plugin version is up-to-date
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Sending Plugin Status to Hubitat | UpdateAvailable: false | newVersion: 2.5.18
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Temperature Unit is Now: (F)
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Updating Global Values | HubIP: 192.168.68.105 | UsingCloud: false
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Devices to Remove: (0) 
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Devices to Update: (3)
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Devices to Create: (0) 
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Total Initialization Time: (1 seconds)
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Unknown Capabilities: []
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Hubitat DeviceCache Size: (3)
[12/2/2022, 11:27:24 AM] [Hubitat-v2] WebServer Initiated...
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Sending StartDirect Request to Hubitat | UsingCloud: (false)
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Direct Connect Active | Listening at 192.168.68.109:8001
[12/2/2022, 11:27:24 AM] [SwitchBot] Total SwitchBot Devices Found: 3
[12/2/2022, 11:27:24 AM] [SwitchBot] Restoring existing accessory from cache: Bot DF DeviceID: CE036C7B96DF
[12/2/2022, 11:27:24 AM] [SwitchBot] Restoring existing accessory from cache: PC bot DeviceID: F2B2385328EF
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: Bot DF does not have bot mode set in the Plugin's SwitchBot Device Settings,
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: Bot DF is defaulting to "switch" mode, you may experience issues.
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: Bot DF Config: {"connectionType":"OpenAPI"}
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: Bot DF refreshStatus enableCloudService: false
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: Bot DF Displaying as Outlet
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: PC bot does not have bot mode set in the Plugin's SwitchBot Device Settings,
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: PC bot is defaulting to "switch" mode, you may experience issues.
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: PC bot Config: {"connectionType":"OpenAPI"}
[12/2/2022, 11:27:24 AM] [SwitchBot] Bot: PC bot Displaying as Outlet
[12/2/2022, 11:27:24 AM] [Hubitat-v2] Hubitat-v2 Hub Communication Established
[12/2/2022, 11:27:25 AM] [Ring] Found the following locations:
[12/2/2022, 11:27:25 AM] [Ring]   locationId: 7317b192-311f-443c-7b1e-ecd6cc039bc2 - Centennial
[12/2/2022, 11:27:25 AM] [LitterRobotPlatform] Syncing robots
[12/2/2022, 11:27:25 AM] [Homebridge UI] Homebridge Config UI X v4.50.2 is listening on :: port 8581
[12/2/2022, 11:27:25 AM] [Ring] Configuring 2 cameras and 3 devices for location "Centennial" - locationId: 7317b192-311f-443c-7b1e-ecd6cc039bc2
[12/2/2022, 11:27:25 AM] [Ring] Adding new accessory 93930337-a2a1-4ed0-9fd1-439596ddce41 cocoa_camera Side
[12/2/2022, 11:27:25 AM] [Homebridge UI] Error: listen EADDRINUSE: address already in use :::8581
[12/2/2022, 11:27:25 AM] [Homebridge UI] Another process or service on this host is using port 8581.
[12/2/2022, 11:27:25 AM] [Homebridge UI] Please stop the other service or change the port you have assigned to homebridge-config-ui-x.
[12/2/2022, 11:27:25 AM] [Homebridge UI] Ending process now.
[12/2/2022, 11:27:25 AM] [myQ] myQ API: Successfully connected to the myQ API.
[12/2/2022, 11:27:26 AM] [myQ] myQ API: Discovered device family garagedoor: Garage Door [Liftmaster Commercial WiFi Wall Mount Operator] (serial number: CG2863E44544, gateway: GW12002784F0).
[12/2/2022, 11:27:26 AM] [myQ] myQ API: Discovered device family gateway: Garage Door [Chamberlain WiFi GDO DC 1.25 HP] (serial number: GW12002784F0).
[12/2/2022, 11:27:27 AM] [Nest] initing thermostat (P) "Hallway Thermostat": deviceId: 18B4300000C9C621 structureId: de0002f0-8240-11e7-a573-123bd7ba4ea6
[Hallway Thermostat@@Heating Threshold Temperature] characteristic was supplied illegal value: number 0 exceeded minimum of 10
[12/2/2022, 11:27:27 AM] [Nest] initing home_away_sensor "Home Occupied": deviceId: de0002f0-8240-11e7-a573-123bd7ba4ea6 structureId: de0002f0-8240-11e7-a573-123bd7ba4ea6

Config

No response

Homebridge UI Version

4.50.2

Homebridge Version

1.6

Node.js Version

16.16.0

Operating System

macOS

Environment Info

Raspberry Pi Model

None

brandislee commented 1 year ago

This was the relevant code (I think):

[12/2/2022, 5:51:28 PM] [Homebridge UI] Error: listen EADDRINUSE: address already in use :::8581 [12/2/2022, 5:51:28 PM] [Homebridge UI] Another process or service on this host is using port 8581. [12/2/2022, 5:51:28 PM] [Homebridge UI] Please stop the other service or change the port you have assigned to homebridge-config-ui-x. [12/2/2022, 5:51:28 PM] [Homebridge UI] Ending process now.

nassik commented 1 year ago

Same behavior: Homebridge (node-home bridge) 1.2.4-2 loading blank (white) page on OpenWrt 22.03.2 r19803-9a599fee93 / LuCI branch git-22.334.41328-26529a5. Hardware: FriendlyElec NanoPi R5S, FriendlyElec NanoPi R5S

The node-home bridge uses random ports every time it restarts (currently 19221) but the issues stays the same.

Noticed similar closed issue from while back (#3198) but the suggested workaround, reinstalling homebridge-config-ui-x, does not in this case work.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.