Root instance already running - OH won't start

Hi,
i just wanted to get Homekit back to work.
i stopped OH and cleaned cache (openhab-cli clean-cache) and now i cant get my OH running. PLEASE HELP

root instance already running with name openhab ? how to fix this ?
i already rebooted several times, nothing helps and i am a noob :frowning:

i tried:
Apply Improvements -> Fix Permissions
Manual/Fresh Setup -> System Tweaks
Config > openHAB Stable and Update
openhab-cli reset-ownership


thank you!

Good morning Philipp,

maybe this comment will help.

Also this comment is helpful

Kind regards,
Mark

openHABian automatically starts openHAB on boot via systemd, you mustn’t start that manually.
Manual startup will spit errors when it tries to use some of the same ressources as the running instance does (such as a portnumber).

1 Like

ok thanks, but whats the solution now, to get it back to work correctly ?
i see myself reinstalling OH already :frowning:

Use top at the command line to show everything running on system. Looks like OH pid is 756 but need to confirm that then use kill pid 756 to stop the instance. After that reboot and see what happens.

Edit: You may need to clean the cache again.

i’ve done that, now i get this status and my log does nothing

Use sudo systemctl stop openhab2

sudo openhab-cli clean cache

sudo reboot

Also open a browser with fronttail so you can watch the logs as OH starts up.

Do you have a working backup? If so then a fresh install should be no issue.

OMG its happening! cant believe, thank you so much, but i dont understand what is different to that what i have done :thinking: i did the same yesterday, but nothing happend and today i get my OH back, wohooo

Thanks H102

1 Like

Glad to see you got it back up and running!:+1:

Please mark the topic solved by clicking the square box on the post that provided the solution.

Thanks and Happy Thanksgiving

my spotify beta binding always gets uninstalled by itself…
does it maybe have something todo with it ?
i am now aware of restarting and clean-cache of my OH :smiley:
dont want that hassle again…

After an OH reboot or restart or either? Also how did you install this binding, Market Place, jar file?

Cleaning the cache is one of the first steps I use when having strainge issues. When doing this just remember to always stop OH first.:wink:

either way the same i think, but i need to have a closer look on this. installed via MarketPlace (PaperUI)

i always clean my cache when meeting some issues with OH.
is “openhab-cli clean-cache” the same as

sudo rm -rf /var/lib/openhab2/cache/*
sudo rm -rf /var/lib/openhab2/tmp/*

? Thank you

I do not use this binding but if installed via MarketPlace it shouldn’t be uninstalling on it’s on. Could there be two Spotify bindings on the server? You can check using the console with sudo openhab-cli console then use bundle:list this will show all binding (and more more) and if they are active. Check for any duplicates and also verify that you have not installed it in var/lib/openhab2/services/addons.cfg.

BTW I have checked github for any related issues and found nothing.:upside_down_face:

One alternative is to uninstall the binding via MarketPlace and use the latest jar file. If you like I can provide the link and how to if needed.

Yep, openhab-cli clean-cache will also clean the tmp file as well. Two birds with one stone.:grin:

currently spotify got uninstalled by itself and i cant find the binding in the console.

addons.cfg is empty here

you are awesome thanks, hmmm
i will keep an eye on my OH and will see what causes the spotify binding to uninstall.
and i maybe would like to accept your offer later, regarding the how to :slight_smile:

Thank you Sir!

You mentioned the binding being beta. In PaperUI > Configuration > System > MarketPlace settings what is the Maturity level set to?

Just for the heck of it…maybe someone else may need it.
https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.spotify/2.5.0-SNAPSHOT/

Uninstall the binding first. Then place the jar file (not the sources.jar) in usr/share/openhab2/addons next go to openhabian-config and select fix permissions (you can always do it manually as well) then restart OH. Any file in this directory will get auto installed and you should see it in PaperUI > Configuration > Things, System, or wherever it normally show’s up. This should prevent it from uninstalling ever again.

You can use wget (know issues if downloading from github directly with wget) to install a jar file but I have found it better/easier to download the file to PC then use something like FileZilla to make the transfer.

Note do not try to install the same binding using any other method when using a jar file. This will lead to duplicates and other issues. If you need to upgrade a jar file then simply remove the old one and replace with newer.

Beta

Most have this set to Alpha, and honestly I have no idea if it would make a difference with your issue but you can change it and see. It’s been a long time since using MarketPlace for me sorry if not much help in this area.:upside_down_face:

If problem persist you may want to open a new topic with Spotify (and other related words) in the title. That will help get attention of other that use the binding.

If you solve the problem by either changing maturity level or installing the jar file let me know please. I can pass along the info and/or open an issue on git.

Thanks

If you are like me, and don’t want to delete more than required, to overcome this issue one should delete only these two files:

openhab2/tmp/karaf.pid
openhab2/tmp/instances/instance.properties

Happened to me after a power failure, and on startup a different process (sshd) came up with the same pid.