Homebridge-config-ui-x: Multiple Instances Of Homebridge Found Installed - /usr/local/Cellar/node/12.12.0/lib/node_modules/homebridge

Created on 29 Jan 2020  路  8Comments  路  Source: oznu/homebridge-config-ui-x

@oznu I hope you are doing well also in the new year and everything is fine. All the best to you.

I am a little lost with this recent problem.
I run Homebridge on my iMac for a long time now. Mostly only with config-ui-x and homebridge-music plugin to control iTunes/Apple Music.

macOS 10.15.3, [email protected], [email protected], [email protected], [email protected]

Everything is working great except the latest message in the log.
I'm not aware of "multiple instances" on my Mac and the biggest confusion that the log is pointing to Node 12.12.0. I'm running Node 12.14.1
Could the update to the lates node the problem and how to fix this?

As mentioned everything is working well but the log entry bothers.
Removing just the folder /usr/local/Cellar/node/12.12.0/ killed homebridge. I copy/paste all files back and it works again.

Thanks in advance for any help.

[1/29/2020, 9:06:18 PM] [Config] Homebridge Config UI X v4.9.0 is listening on :: port 8080
[1/29/2020, 9:06:35 PM] [Config] Multiple Instances Of Homebridge Found Installed
[1/29/2020, 9:06:35 PM] [Config] /usr/local/Cellar/node/12.12.0/lib/node_modules/homebridge
[1/29/2020, 9:06:35 PM] [Config] /usr/local/lib/node_modules/homebridge
[1/29/2020, 9:10:06 PM] [Config] Multiple Instances Of Homebridge Found Installed
[1/29/2020, 9:10:06 PM] [Config] /usr/local/Cellar/node/12.12.0/lib/node_modules/homebridge
[1/29/2020, 9:10:06 PM] [Config] /usr/local/lib/node_modules/homebridge
bug

All 8 comments

Not my place to say anything about this but I think HomeBrew is maintaining your installs and versions. Any chance you used that to install Homebridge?

A description how to read through the HomeBrew logs can be found here.

My best guess would be to take that route, and check HomeBrew for what's going on.

Run this to find the path that should be used:

npm -g prefix

Then check your homebridge binary location to see if it matches:

ls -l $(which homebridge)

Are you using launchctl to start homebridge? If so check the .plist file to see the start path.

Hmm...
npm -g prefix is pointing to 12.12.0

To launch using launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>RunAtLoad</key>
        <true/>
    <key>KeepAlive</key>
        <true/>
    <key>Label</key>
        <string>com.homebridge.server</string>
    <key>ProgramArguments</key>
        <array>
             <string>/usr/local/bin/homebridge</string>
             <string>-I</string>
        </array>
    <key>StandardOutPath</key>
        <string>/Users/daniel/.homebridge/homebridge.log</string>
    <key>StandardErrorPath</key>
        <string>/Users/daniel/.homebridge/homebridge.log</string>
    <key>EnvironmentVariables</key>
        <dict>
        <key>PATH</key>
            <string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
        <key>HOME</key>
            <string>/Users/daniel</string>
        </dict>
</dict>
</plist>
daniel@iMac ~ % npm -g prefix
/usr/local/Cellar/node/12.12.0
daniel@iMac ~ % ls -l $(which homebridge)
lrwxr-xr-x  1 daniel  admin  45 Oct 19 23:27 /usr/local/bin/homebridge -> ../lib/node_modules/homebridge/bin/homebridge

What about this?

ls -l $(which hb-service)

% ls -l $(which hb-service)
ls: found: No such file or directory
ls: hb-service: No such file or directory
ls: not: No such file or directory

Hmmm there is something off about your node/npm setup (probably due to installing/updating Node.js using different methods), without risking breaking your install I'm not sure how to proceed.

The homebridge check is really only to load the current version of the Homebridge module, so it's not that big a deal right now.

If you want to try and fix it, I would start by trying to remove all copies of Node.js/npm and start fresh (no need to delete any Homebridge config).


Run the commands below at your own risk. You are on your own from this point onwards.

Probably something like this to remove all copies of Node:

# unload
launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist

# remove plist
rm -rf ~/Library/LaunchAgents/com.homebridge.server.plist

# remove node
brew uninstall --force node
brew uninstall --force node@12
brew cleanup node

# clean modules
rm -rf /usr/local/lib/node_modules
rm -rf /usr/local/Cellar/node
rm -rf /usr/local/bin/homebridge
rm -rf /usr/local/bin/node
rm -rf /usr/local/bin/npm
rm -rf /usr/local/lib/dtrace/node.d
rm -rf ~/.npm

# install node
brew install node@12
brew link --overwrite --force node@12

# install homebridge and homebridge config ui x
npm install -g --unsafe-perm homebridge homebridge-config-ui-x

# create service (this will create the launchctl plist for you)
sudo hb-service install --port 8080

# use the UI to reinstall the plugins you require.

updated comment above with possible solution

Thanks for your friendly help. I'll give it a try after I'm back from vacation. At least everything is running independent from this warning message.
I close this issue, because it seems only a problem at my end.
Thanks again. I appreciate the time you are investing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eximiusvir picture eximiusvir  路  5Comments

MBarti picture MBarti  路  4Comments

grzegorz914 picture grzegorz914  路  6Comments

DJay-X picture DJay-X  路  6Comments

mrtekkid picture mrtekkid  路  3Comments