question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HomeBridge starting problem

See original GitHub issue

I am in the process of installing HomeBridge on a Raspberry Pi B+ for the first time. The only plugin I have installed is homebridge-smartthings. When attempting to start HomeBridge I get the following warning & error messages:

Warning: *** WARNING *** Please fix your application to use the native API of Avahi!

Error:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::51826
    at Object.exports._errnoException (util.js:837:11)
    at exports._exceptionWithHostPort (util.js:860:20)
    at Server._listen2 (net.js:1231:14)
    at listen (net.js:1267:10)
    at Server.listen (net.js:1363:5)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:58:19)
    at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:155:20)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:480:16)
    at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:92:16)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:351:14)

Any advice on how to proceed?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ozaoralcommented, Mar 19, 2017

I ran into this problem as well, after reinstalling my Pi with a fresh homebridge configuration. I was able to install and set-up everything and it worked well. Then I followed the tutorial to set-up the autostart (https://timleland.com/setup-homebridge-to-start-on-bootup/) as as soon as I rebooted the Pi for the first time, I started to get this error. I tried many things and then removed the bootup services. Since then, Homebridge worked well again. So I created the boot services again and paid a little more attention this time 😃)

Problem 1: wrong folders

Problem 2: permissions

  • when launching homebridge as a service (not manually), it is necessary to pay more attention to the permissions
  • I had iKettle plugin for CMDswitch2 installed to the home folder of Pi user … I moved it manually, changed the config.json and it works now

Problem 3: issues related to plugins

  • on top of all of this, I had an issue with one of the plugins as well
  • when multiple issues cross in your home setup, it is not always easy to find the solution (mainly in cases when a problem with plugin is able to influence homebridge so badly, that also other things quit working)

Hope this helps at least to some of you guys!

0reactions
stale[bot]commented, Oct 31, 2017

This issue has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Troubleshooting · homebridge/homebridge Wiki - GitHub
This is normally caused by a homebridge process running in the background without you realizing it. If you've set your homebridge install to...
Read more >
Help Needed, Homebridge is stuck on 'Starting now' screen ...
Help Needed, Homebridge is stuck on 'Starting now' screen after last update. : r/homebridge.
Read more >
Setup Homebridge to Start on Bootup | by Tim - Medium
I've recently been playing with Homebridge on my Raspberry Pi. I've setup my Harmony Hub and my wireless power outlets to be controlled...
Read more >
homebridge-config-ui-x - npm
A web based management, configuration and control platform for Homebridge. Latest version: 4.50.2, last published: a month ago. Start using ...
Read more >
Homebridge troubleshooting - Particle Community
I got an off-line reaction suggesting me to start a new thread as it will help more ... ERROR! ??? When I check...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found