it would also be helpful if user could get to openhab-cli and do a bundle:list to see what is active and what is not
based on OP saying he can get to help and support page I would think he hit startlevel 100
but at least with bundle:list we could confirm bundle versions and status
but if he runs system:start-level as well we could be sure of that
uninstalling jsscripting from MainUI made me spot a zombie java process for a short time in top, the removing took βforeverβ and with a full page reload I got no response anymore. Restarting openhab service ends in
Sorry did not see it till I refreshed the page again.
Do you have any .map files in your transform folder ?
or any custom transformations configured via Main UI?
The fact that jsscripting is in waiting state and transformation is also in waiting state is a clue.
If you do not have any custom transformation map files
you might try disable all your rules and then see you can restart those 2 waiting bundles or restart openhab and see if they come active.
One other thing I wanted to ask is what do you have set for your default persistence?
no problem at all. I spammed quite a lot pots here anyhow.
But to answer the questions: yes. I have .map files, but removing them doesnβt change it. I think I managed to uninstall the jsscripting after a few tries (was in addons.cfg and in GUI) but still I have an
The transformation add-on 'javascript' does not exist - ignoring it
deleting all rule files doesnβt bring back the fun. I still see
Persitance was mysql/mariadb but I disabled it in the meantimeβ¦
but that should be enough for today. Iβll followup with trying to get those bundles out of Waiting.
I wanted to report back about the progress:
after playing with disabling some of the bundles to find the root cause I decided to backup the data uninstall the debian packages, clean the directories and start with a fresh clean installation.
After that I restored the backup of the uiconfig and it looked ok. So I copied .items and .things files which directly made them appear in the UI, so the rules files. They did not change the number of rules in the admin section of the UI, so I decided to restart and β¦ am stuck in the same situation as before. No chance to get anything from the files used.
The only difference compared to before the resinstall: the logfile now looks strange and gives even less readable, useful information and the port of MainUI changed from 8080 to 8181.
edit: and I cannot login to openhab-cli console with openhab:habopen anymore.
Well that is quite a bit to unpack and consume so lots of questions now.
How did you do the back up?
Did you use the Backup procedure and script that is described in the documentation?
was this a backup of your working version 3?
Or was this a Backup of your malfunctioning version 4?
Was this using the uninstall procedure described in the documentation?
Or did you manually try and clean it all out?
Start with a fresh clean installation of what OpenHab version? this one also is a bit confusing as you OP said you upgraded from 3 to 4.2.1 but later you log posts showed you on 4.2.2 so did you jump a version (upgrade the broken version during trouble shooting efforts)?
How did you do the restore did you use the documented restore procedure or manually copied stuff where you thought it should go?
So you did not reboot at this point to apply the changed uiconfig?
Again you made multiple changes and still had not validated that the install was healthy?
Now after making many changes you rebooted is this accurate?
It is a crap shoot now to understand what to triage because you made so many changes without validated they had applied correctly by restarting the application.
So before you rebooted the Mainui was on port 8080?
was openhab-cli working before the reboot?
I think you should start again and use the documented procedures to accomplish the steps.
If you have a good backup of your Openhab 3 instance perhaps a cloned SD card that would be best.
Or maybe if you have a good back using documented approach for your Openhab 3 version you could roll back to fresh reinstall of version 3 to get to a stable working state after restore and then upgrade to 4.
So many things have been touched at this point you are now trying to find a needle in a haystack.
I am not even sure where to recommend you start troubleshooting. But maybe after you reply to these questions, we could try a few things depending on how much more you want to fight with this and how good you back ups really are.
Sorry for the long time until I respond, I was away fro the long weekend.
openhab-cli backup
As far as possible, when I searched for backup I mainly ended here in the forum. Nevertheless openhab-cli usage seems quite clear.
I never did it in version 3, and I had openhab 4 running for a few weeks, so I didnβt consider it anything regarding 3. Only a few minor things broke with that update, now I was working on fixing these and managed to do one change that ended in the situation that after an openhab restart the files are not read (as described above). So yes, the backup was on the malfunctioning version 4 and restoring only the --uiconfig braght all the UI configured stuff back βcorrectlyβ.
Didnβt find anything reagrding this in the docs, so yes, I uninstalled the packages using apt and renamed the directories that were kept.
Installation using apt gave me a clean 4.2.2 version (as this was released in the meantime) which I was able to initially configure and it was working properly.
openhab-cli retstore --uiconfig
That left me with a working system showing the UI pages (and a few test items that have been configured in the UI before).
As I restored the uiconfig with stopped openhab service there was clearly a restart.
Single changes are impossibleβ¦ I clearly did it step wise, first the smallest .items file, then more and more and .things. Always with a check in the UI that the items were added. I did not assume that a restart should be needed, as the files changes have βalwaysβ been considered live.
Until then I did not consider rebooting the RasPi at all. In my understanding restarting the openHAB service should always be enough, shouldnβt it? But yes, when the first file changes that I brought back manually from the backup did not take affect in the UI I restarted the OH service.
Mh, I tried to do it in small steps and always validated the changes in the UI - smaller steps like 1 item at a time is impossible with any real world openHAB setup that is more than a HelloWorldβ¦
Maybe I should have restarted with a single rule file instead of all rule files at once, I agree. But on the other hand I still wonder how a rule file can damage an openhab installation in such a way, that after removing that rule file, openHAB still stays blocked.
Yes. At the end thatβs not an unsolvable showstopper, still might be interesting, as in /etc/default/openhab the line defining OPENHAB_HTTP_PORT=8080 is commented exactly as it was before the full reinstallation using apt.
openhab-cli in general is working also after the reinstallation and reboot - I could restore the uiconfig backup with it. But I did not try the console before, so I know only that I could login before uninstalling the packages and now itβs not possible anymore to login.
Which one do you mean? And most important: how can I prevent a working oh4 system to bring me back into such a stuck state again when adding my old config or doing the same thing in a new configuration? - It is quite clear, that there is something in the configuration that messes up openhab, and whatever it is, there should be a way to produce logs indicating an error message that points towards the problem. Otherwise itβs only a matter of time until someone else ends up with the same issue.
My backups are not good at all. (yes I know) But still, the uiconfig is fully available, as are the file based items, things and rules, shouldnβt that be enough?
After reinstallation of the deb packages (using apt from JFrog, now version 4.2.2) I couldnβt login to the (karaf?) console anymore with openhab-cli console so I tried with the good old ssh -p 8101 openhab@localhostand have seen that the keys change (which is obvious when thinking about it), so I deleted it with ssh-keygen -f "/root/.ssh/known_hosts" -R "[localhost]:8101" and it missed then additionally the file /var/lib/openhab/etc/users.properties. So I restored it from the backup, and finally could login to the console again.
if you delete all .items files and create a new one containing just a single test item, does this show op? Please set the ownerr of the file to openhab:openhab
Furthermore, did you already start openhab in debug mode and arre there some more hints in the log?
I was there already, my items were nearly empty and the owner of all files was openhab:openhab. EXCEPT the directory cron which I created in /etc/openhab to keep some regularly running scripts doing openhab related stuff.
I need to dig deeper into what exactly here causes the hand during openHAB startup, the owner, the pure existence of this directory or the content, but it is quite sure that this is the culprit.
I did not manage to create a debug log, but the main issue is solved. Let me explain:
My configuration is such that I get interesting logs into /var/log/openhab/openhab.log and to react on warnings and errors soon I wrote some scripts to read this file and post the content via XMPP. These scripts have been around in /etc/openhab/cron ever since and required some change, forcing me to put those python scripts into a virtual environment - which I created in /etc/openhab/cron/cron-venv and exactly this folder kills my openhab without a meaningful message in the log and with above behavior. As it happens only after a restart of the openHAB service I did not put it into relation with the problem, as they were sitting around there for very long.
The main reason that triggers the behavior of blocking the file based configuration is still a mystery but at least my system is up and running again since I moved this python virtual environment with the shell scripts out of that.
Thanks again for all the ideas an tips you all here gave!