[SOLVED] After upgrade from 2.1.0 to 2.2.0, can´t load items/rules/sitemap files

FOUND SOMETHING STRANGE:

I also had feel problems connecting remotely via openHAB Cloud.
So, I find two UUID files and two SECRET files. At /var/lib/openhab2/ but also at /var/lib/openhab2/userdata/.
I’ve deleted the four files and have restarted OH. The new files where created only on /var/lib/openhab2/userdata/. But, connecting remotely still failed. I then copied both files to /var/lib/openhab2/, restarted OH and now I can connect via openHAB Cloud.

Very strange!

When you upgraded, did you get any prompts to overwrite configuration files with the maintainers version? If so, did you do it? You can reset everything that’s updated in the new version with the command:

sudo apt-get -o Dpkg::Options::="--force-confask" -o Dpkg::Options::="--force-confmiss" --reinstall install openhab2

Thanks @Benjy

My last (re)installation was with that command, except the

-o Dpkg::Options::="--force-confmiss"

But I’ve answered YES to all questions.

And still the same symptoms? Won’t read your conf folder (/etc/openhab2) ?

It could be true!
Any suggestion to debug that

clearing tmp folder worked for me.

which one ?

/tmp
/var/lib/openhab2/tmp
/var/tmp

You can clear the contents of the openhab temporary folders with:

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

Clean done and restart:

user@machine:~$ sudo systemctl status openhab2.service
* openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)
   Active: active (running) since Qua 2017-12-20 23:18:16 WET; 1min 4s ago
     Docs: http://docs.openhab.org
           https://community.openhab.org
  Process: 1049 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop (code=exited, status=0/SUCCESS)
 Main PID: 1189 (java)
   CGroup: /system.slice/openhab2.service
           `-1189 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -Do...

Dez 20 23:18:16 frs1 systemd[1]: Started openHAB 2 - empowering the smart home.

But now, can’t access Karaf nor Paper UI / HABmin.

I’ve reinstalled OH 2.2.0, this time using:

sudo apt-get -o Dpkg::Options::="--force-confask" -o Dpkg::Options::="--force-confmiss" --reinstall install openhab2

I’m back to the system, but again without accessing my Items/Sitemaps/Rules files.
Why? !!!

I’m not sure what’s going on. I’ve never seen this issue before. What are the latest errors in your openhab.log?

No [ERROR] after last restart
Just this type of warnings:

2017-12-21 00:04:52.992 [WARN ] [org.jline                           ] - Failed to save history
java.nio.file.AccessDeniedException: /home/openhab

Why ‘/home/openhab’ since doesn’t exist?

Im afraid I don’t know what be causing that issue. There shouldn’t be a home directory for openhab and the apt packages do not set any. Is this a configuration that you have set yourself?

I’ve never set any any other openhab directory than the ones are according “by the book”. So, I believe it must have to do with OH 2.2.0 setup, or I had never notice that before.

Finally
After my last reinstallation, last night, I can see now some WARNing messages related with this subject:

2017-12-21 19:55:54.466 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'things' does not exist in 'conf'. Please check your configuration settings!
2017-12-21 19:55:54.469 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'scripts' does not exist in 'conf'. Please check your configuration settings!
2017-12-21 19:55:54.472 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'items' does not exist in 'conf'. Please check your configuration settings!
2017-12-21 19:55:54.474 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'persistence' does not exist in 'conf'. Please check your configuration settings!
2017-12-21 19:55:54.477 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'sitemaps' does not exist in 'conf'. Please check your configuration settings!
2017-12-21 19:55:54.479 [WARN ] [.core.internal.folder.FolderObserver] - Directory 'rules' does not exist in 'conf'. Please check your configuration settings!
2017-12-21 19:55:54.551 [ERROR] [.service.internal.HttpServiceStarted] - Could not start the servlet context for context path []
java.lang.IllegalStateException: no valid keystore

I found this related post : https://github.com/openhab/openhab-syno-spk/issues/87 but it belongs to a different enviorement.
So, I prefer to wait and listen your comments and sugestions.
Do you have any?

Hey,

I just upgraded this morning and ran into serious problems. Most of my rules are not working anymore, but sitemap and so on does. What about your karaf console - can you directly ssh in? At me it is always “connection refused”…

I am close to just do a rollback (question is how). Only had the astro-cron-problem, but a restart every 5 days is way better than a not working system…

Hope you get your information what is wrong!

Greetings
Andy

Take a look at: http://docs.openhab.org/administration/console.html.
You certainely have to "Replace the sshHost IP 127.0.0.1 by 0.0.0.0 " at “org.apache.karaf.shell.cfg” file.

1 Like

What are the contents of the /etc/default/openhab2. Everything should be commented out by default.

If I’m honest, I’m running out of ideas. These problems are not indicative of an upgrade from a normal setup.

I have to recheck that.
I’m not in front of the system now, but I’m almost sure that file has all lines commented.
I’ve already edited it with

EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyS2:/dev/ttyACM0:/dev/ttyAMA0"

but without any change results, I’ve puted it back again to its previous state.

Finally I got my system back!
After to many hours (days) trying to debug this issue, installing and re-installing old and new OH packages, I’ve decided for the “Final Solution”.
So, I’ve purged all OH packages (2.0.0, 2.1.0 and 2.2.0) and deleted all ‘openhab’ directories.
After OH 2.2.0 package rebuilded, has been installed from the scratch.
Everything runned as expected and finally my ‘items’, ‘rules’, ‘sitemap’, … files were read by the system.

I had the same Problem after the update. This fixed everything =D

1 Like