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

  • Platform information: Raspberry Pi 3
    • OS: Linux latest version using opehabian_
    • Java Runtime Environment: Java™ SE Runtime Environment (build 1.8.0_151-b12)
    • openHAB version: 2.2.0
    • using Bindings: network, http, zwave
  • Issue of the topic: OH is running, HABmin, Paper UI, Basic UI and Karaf Console are operational, my old file (.items, .rule, .sitemaps, etc.) are at CONF folder, but are not used.

Any tips?

1 Like

Without any logs? I’d guess it’s the whatchamacallit that’s causing the problem.

If you replace that with a thingamajig, it should fix the problem.

1 Like

Errors in the logs would be good, but also the result of using the command openhab-cli info

The reason I’ve not send any log was because i didn’t found any errors on it. At least after reinstalled OH 2.2.0 twice, while eliminating errors and making some cleaning ations on old stuff.
Things are whell discovered by HABmin and Paper UI, but no Items, Rules or Sitemaps appear despite the files are at the folders with the right permissions and ownership for openhab:openhab.

During my working hours I can´t access my system, but later this afternoon I’ll be back.

Here it goes:

user@machine:~$ openhab-cli info
Version:     2.2.0 (Build)

User:        openhab (Active Process 14634)
User Groups: openhab tty dialout sudo

Directories: Folder Name      | Path                        | User:Group
             -----------      | ----                        | ----------
             OPENHAB_HOME     | /usr/share/openhab2         | openhab:openhab
             OPENHAB_RUNTIME  | /usr/share/openhab2/runtime | openhab:openhab
             OPENHAB_USERDATA | /var/lib/openhab2           | openhab:openhab
             OPENHAB_CONF     | /etc/openhab2               | openhab:openhab
             OPENHAB_LOGDIR   | /var/log/openhab2           | openhab:openhab

URLs:        http://10.XXX.YYY.ZZZ:8080
             https://10.XXX.YYY.ZZZ:8443

			 
user@machine:~$ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) Client VM (build 25.151-b12, mixed mode)

BUNDLES:

openhab> list
START LEVEL 100 , List Threshold: 50
 ID | State    | Lvl | Version                | Name
----+----------+-----+------------------------+------------------------------------------------------------------------------------------------------------------------------------------
185 | Active   |  90 | 2.2.0                  | openHAB Core
186 | Active   |  80 | 2.2.0                  | openHAB Karaf Integration
188 | Resolved |  80 | 2.2.0                  | openHAB Sound Support, Hosts: 122
189 | Active   |  80 | 2.2.0                  | openHAB Dashboard UI
209 | Active   |  80 | 1.11.0                 | openHAB Mail Action
210 | Active   |  80 | 1.11.0                 | openHAB HTTP Binding
211 | Active   |  80 | 2.2.0                  | Network Binding
212 | Active   |  80 | 2.2.0                  | ZWave Binding
213 | Active   |  80 | 2.2.0                  | openHAB 1.x Compatibility Layer
214 | Active   |  80 | 2.2.0                  | openHAB Cloud Connector Bundle
215 | Active   |  80 | 1.11.0                 | openHAB MapDB Persistence Bundle
216 | Resolved |  75 | 2.2.0                  | openHAB Basic UI Fragment, Hosts: 207
217 | Active   |  80 | 2.2.0                  | HABmin User Interface
218 | Resolved |  75 | 2.2.0                  | openHAB Paper UI Theme Fragment, Hosts: 208

STUFF:

openhab> things list
zwave:device:frs:node2 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 2, Bridge=zwave:serial_zstick:frs)
zwave:serial_zstick:frs (Type=Bridge, Status=ONLINE, Label=Z-Wave Serial Controller, Bridge=null)
zwave:device:frs:node5 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 5, Bridge=zwave:serial_zstick:frs)
zwave:device:frs:node4 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 4: ZM1602 AC/DC Siren, Bridge=zwave:serial_zstick:frs)
zwave:device:frs:node3 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 3: DCH-Z510 Siren, Bridge=zwave:serial_zstick:frs)
zwave:device:frs:node6 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 6, Bridge=zwave:serial_zstick:frs)
zwave:device:frs:node8 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 8, Bridge=zwave:serial_zstick:frs)
zwave:device:frs:node7 (Type=Thing, Status=ONLINE, Label=Z-Wave Node 7, Bridge=zwave:serial_zstick:frs)
network:pingdevice:10_XXX_YYY_BBB (Type=Thing, Status=ONLINE, Label=Bolachinha, Bridge=null)
network:pingdevice:10_XXX_YYY_AAA (Type=Thing, Status=ONLINE, Label=Tuli, Bridge=null)

openhab> items list
zwave_serial_zstick_frs_serial_oof (Type=NumberItem, State=NULL, Label=OOF Bytes Received, Category=)
network_pingdevice_10_XXX_YYY_AAA_online (Type=SwitchItem, State=ON, Label=Online, Category=null)
zwave_serial_zstick_frs_serial_sof (Type=NumberItem, State=963, Label=Start Frames, Category=)
network_pingdevice_10_XXX_YYY_BBB_online (Type=SwitchItem, State=ON, Label=Online, Category=null)
zwave_serial_zstick_frs_serial_ack (Type=NumberItem, State=358, Label=Frames Acknowledged, Category=)
zwave_serial_zstick_frs_serial_can (Type=NumberItem, State=3, Label=Frames Cancelled, Category=)
zwave_serial_zstick_frs_serial_nak (Type=NumberItem, State=NULL, Label=Frames Rejected, Category=)
zwave_serial_zstick_frs_serial_cse (Type=NumberItem, State=NULL, Label=Received Checksum Errors, Category=)

openhab> links list
zwave_serial_zstick_frs_serial_oof -> zwave:serial_zstick:frs:serial_oof
zwave_serial_zstick_frs_serial_nak -> zwave:serial_zstick:frs:serial_nak
zwave_serial_zstick_frs_serial_can -> zwave:serial_zstick:frs:serial_can
network_pingdevice_10_XXX_YYY_BBB_online -> network:pingdevice:10_XXX_YYY_BBB:online
zwave_serial_zstick_frs_serial_ack -> zwave:serial_zstick:frs:serial_ack
zwave_serial_zstick_frs_serial_cse -> zwave:serial_zstick:frs:serial_cse
zwave_serial_zstick_frs_serial_sof -> zwave:serial_zstick:frs:serial_sof
network_pingdevice_10_XXX_YYY_AAA_online -> network:pingdevice:10_XXX_YYY_AAA:online

LOGS (after a restart):

user@machine:~$ sudo systemctl restart openhab2.service

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 18:25:33 WET; 36s ago
     Docs: http://docs.openhab.org
           https://community.openhab.org
  Process: 26239 ExecStop=/usr/share/openhab2/runtime/bin/karaf stop (code=exited, status=0/SUCCESS)
 Main PID: 26403 (java)
   CGroup: /system.slice/openhab2.service
           `-26403 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/openhab2 -D...

Dez 20 18:25:39 frs1 karaf[26403]: at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]
Dez 20 18:25:39 frs1 karaf[26403]: Caused by: java.lang.NullPointerException
Dez 20 18:25:39 frs1 karaf[26403]: at java.io.File.<init>(File.java:277) ~[?:?]
Dez 20 18:25:39 frs1 karaf[26403]: at org.openhab.io.jetty.certificate.internal.CertificateGenerator.ensureKeystore(CertificateGenerator.java:109) ~[?:?]
Dez 20 18:25:39 frs1 karaf[26403]: at org.openhab.io.jetty.certificate.internal.CertificateGenerator.start(CertificateGenerator.java:84) ~[?:?]
Dez 20 18:25:40 frs1 karaf[26403]: at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:774) ~[?:?]
Dez 20 18:25:40 frs1 karaf[26403]: at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1) ~[?:?]
Dez 20 18:25:40 frs1 karaf[26403]: at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
Dez 20 18:25:40 frs1 karaf[26403]: at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:767) ~[?:?]
Dez 20 18:25:40 frs1 karaf[26403]: ... 12 more

openhab.log 
***********

2017-12-20 18:25:09.739 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent STOPPING - org.openhab.binding.zwave
2017-12-20 18:25:09.752 [DEBUG] [inding.zwave.internal.ZWaveActivator] - ZWave binding stopped.
2017-12-20 18:25:09.768 [DEBUG] [org.openhab.binding.zwave           ] - BundleEvent STOPPED - org.openhab.binding.zwave
2017-12-20 18:25:09.838 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2017-12-20 18:25:09.917 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2017-12-20 18:25:10.148 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard
2017-12-20 18:25:44.799 [WARN ] [g.dispatch.internal.ConfigDispatcher] - Could not process default config file 'conf/smarthome.cfg': conf/smarthome.cfg (No such file or directory)
2017-12-20 18:25:44.965 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to pt_PT, Location set to 38.....,-9......, Time zone set to Europe/Lisbon
2017-12-20 18:25:46.697 [ERROR] [.service.internal.HttpServiceStarted] - Could not start the servlet context for context path []
java.lang.IllegalStateException: no valid keystore

2017-12-20 18:25:46.894 [ERROR] [.service.internal.HttpServiceStarted] - Could not start the servlet context for context path []
java.lang.IllegalStateException: no valid keystore

2017-12-20 18:25:58.552 [ERROR] [.service.internal.HttpServiceStarted] - Could not start the servlet context for context path []
java.lang.IllegalStateException: no valid keystore

2017-12-20 18:26:02.316 [INFO ] [b.core.service.AbstractActiveService] - HTTP Refresh Service has been started
2017-12-20 18:26:03.391 [ERROR] [.service.internal.HttpServiceStarted] - Could not start the servlet context for context path []

2017-12-20 18:26:03.400 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2017-12-20 18:26:03.615 [ERROR] [.service.internal.HttpServiceStarted] - Could not start the servlet context for context path []

2017-12-20 18:26:04.419 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: not authorized

Now! are there some tips?
Apreciated

I have slightly different issues but an overall same problem.
After an upgrade using the recommended openhabian-config (same platform and configuration as listed here) I am dead in the water… cannot even connect through web access to the system. SSH is still working.
HELP!!!???

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?