Jersey not ready yet and other problems

Today is not my day. Seems Openhab has gone berserk
It started with me translating the label name of an item. I made sure nothing else changed, saved my file… and could only laod the main menu of my application, no further clicking.

For the life of me i could not have made a type. checked and checked, but could not find anything.
Fortunately the “home.items~” file is the latest back up, so I renamed that into “homeb.items” yep that seemed to work, but then it turns out openhab expects both files the previosuly faulty file AND the restored file to be present in order to work.

I keep trying and trying and then suddenly, yes, just the restored file necessary to work.
I run both files through a comparator… exactly the same

Still being curious what was wrong, I manage to open eclipse designer (that is a voyage in itself) . Nothing wrong with the ‘old’ file according to the designer, except some doubles that I am aware off.

So, just to make sure, I open the restored back up that is now my working file: similar, no errors, but some indication of double items.
So… I decide to comment out the doubles and save my working file.
I open my phone app and sure…just the first page loading, no menu choices.

Thinking that maybe Openhab has lost track of me renaming and rstoring item files I decide to just do a reboot.
After a while, I try my phone app again and i get the “jersey not ready yet” message, so I wait a bit more… no improvement, jersey still not ready.

Darn, lemme check if my raspi indeed booted. yes it did, so I check the basic UI and the classic UI… both no problems showing my home application
So seems that my Openhab phoneapp is at fault here, for all I know it has been causing all my problems today.

Well, I reboot my phone… same effect, Jersey not ready. my phone still will show the demo if i want, but anything else has to wait for jersey to be ready.

Cleared all data of the openhab app… no effect

reinstalled the openhab app… no effect

oddly enough i can open the _default sitemap and then I see my 'things’
But Basic and classic UI work fine apart from not being able to open some deep deep menu choice that has been bugging me before
Anybody any idea?

This is in fact very bad. I flipped in an “old” OH2 sd card and that worked perfectly.
Apparently the problem is in the OH2.1 on my sd card. very unnerving that this can just happen.
copy my config from problematic sd card, Put back an old image, restore the saved config.
Guess/hope that will solve the problems.

After a couple of reboots, yes, suddenly it will load in my phone app again.
oddly … I make some changes in my items file that are not reflected. hmm… I remove ALL my items files from the conf/items map… but openhab happily loads them still. From where???

Are you looking in the logs for errors? One change between 2.0 and 2.1 is that with 2.0 when a file has an error that prevents parsing, it would retain everything from that file that it loaded up to the point of the error. In 2.1 this was changed and now you will see the parsing error, and what line the error occurred on in your openhab.log file and the entire file is rejected.

Thus, before you could have had a syntax error that was being ignored and causing OH to fail silently and now the error is not ignored.

When ever you run into weird problems like this one of the first things to try is:

  • stop openHAB
  • delete the contents of /var/lib/openhab2/cache and /var/lib/openhab2/tmp (do not delete the folders, just the contents)
  • start openHAB again, watch the logs for errors.
  • try again.

Thanks Rich, I checked logs for errors, but none. I think it all tied in to my other problem you replied to: sd card issues, or at least a damaged install.
I burned a month old diskimage, restored the current conf files and it all seems to work again.

Some minor issues i still need to look at but other than that I am back in business

Having exactly the same problem here. Since I updated to openhab 2.3.0 I get very often in paperui but also in rest api a http error 503, for example “Problem accessing /rest/items/AirC_State_LED. Reason Jersey is not ready yet! Powered by Jetty:// 9.3.21.v20170918” (I stripped the html tags). The error is intermittent though. It might work 10 times and then it failes once or twice then works again 30 times then failes, then work 5 times and fail. It’s totally random.

As there’s various people out there having similar problems I don’t think it’s a damaged install. I think this is bug that needs to be resolved.

Errors in the logs?

As previously as @Kees_van_Gelder reported no errors in the openhab logs. Only on receiving side it returns an error (beeing it paperui or the rest api) which returns a http error instead of what was requested. Resulting in empty screen in paperui or http 503 errors in rest-api client. the error I think is the same because it’s always “jersey not ready yet” in both cases.

I have the same issue as explained above this started after updating with apt-get.
I checked the openhab.log and no warning or errors
Im running openhab 2.3.0 on Raspberry pi 3

So update,
I backed the config files using:
sudo openhab-cli backup
Then i burned a new image (2018-06-27-raspbian-stretch)
I did a apt-get update, dist-upgrade, upgrade
then installed openhab2
restored the backup files using: sudo openhab-cli restore /home/pi/
At thist point my rules start to kick ind and i can see that both my Zwave and Hue items react to events.
I login to the browser
so far so good.
I open habpanel -> connection lost, Trying to reconnect
I open Paper ui -> Jersey not ready yet

This was my steps:
Under rest api i found a call the the swagger io going wrong.
Then i found using: cat /var/log/openhab2/openhab.log | grep “swagger”
som error entries. These lead me to : [SOLVED] Update to 2.3.0 failed
and it solved my problem.
PS i did not have to restore my configurations after above steps. All was still there :blush:
Fingers crossed. I hope this was the end of it.

I think I also fixed it with the steps outlined in [SOLVED] Update to 2.3.0 failed.

Stop openhab2, do the shell commands in the first box on that page. On my machine actually the openhab2-addons package was not installed so I just removed openhab2 and reinstalled it and skipped the addons. If you did install the addons through paperui you don’t need it, openhab2 properly reinstalled all the addons on restarting it after installation.

As for the moment, the jersey not ready issues seems to have gone, will monitor now if it stays that way.