Exceptions on initial install of openhab/openhab-docker

Hi,

I’m using the Dockerfile found on github (openhab/openhab-docker) to run openhab2.0 on my raspberry pi 3. I’m using resin.io to build and push images to the device.

However, without any modification in the Dockerfile, I expect to demo UI to come up. It does that, partly, but I see some errors. Here are my observations:

  • /start/index shows the openhab homepage, with the 4 links (classic ui, basic ui, paper ui, rest api)
  • classic ui yields a 404: “Problem accessing /classicui/app. Reason: Not Found”
  • basic ui seems to work
  • paper ui seems to work
  • rest api seems to work
  • in paper ui, the inbox shows 3 items: the ntp server, and my 2 sonos devices
  • in paper ui, configuration/services shows classic ui and basic ui. I’m not sure why paper ui and rest api are not listed, but I’m not familiar enough with OH
  • in paper ui, configuration/things shows ntp server and astro sun data online, and yahoo wheater information as uninitialized (see lower for the exceptions in the logs that could explain this)
  • in paper ui, extensions shows a list, if i click the exec binding (which says “uninstall” since I already tried installing it before, which failed afaik), the progress keeps spinning for minutes, but nothing happens

Here’s the openhab.log: https://gist.github.com/marnikvde/12ede8d6bdfd23ad746d47a42c10480d

As you can see, I started openhab a few days ago (the Dockerfile was built a few minutes before, so the snapshot I’m running is a few days old), there are some exceptions. I didn’t touch it for a few days, and now just a few minutes ago I clicked around the UI again, with more exceptions as a result.

I’m not sure if I should log issues for these separately, or if I’m actually doing something wrong. Any help would be appreciated.

A summary of the exceptions:

line 20 and 21:

2016-04-12 00:13:02.282 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing ‘yahooweather:weather:berlin’: java.lang.ClassCastException: java.lang.String cannot be cast to java.math.BigDecimal
java.util.concurrent.ExecutionException: java.lang.ClassCastException: java.lang.String cannot be cast to java.math.BigDecimal

line 50 and 51:

2016-04-12 00:13:07.495 [ERROR] [org.eclipse.smarthome.ui.classic ] - [org.eclipse.smarthome.classicui(178)] The activate method has thrown an exception
java.lang.NullPointerException

line 152 and 153:

2016-04-12 00:13:07.604 [ERROR] [org.eclipse.smarthome.ui.classic ] - [org.eclipse.smarthome.classicui(178)] The activate method has thrown an exception
java.lang.NullPointerException

then some network hickups (wifi…)

2016-04-12 19:44:55.169 [INFO ] [smarthome.event.ExtensionEvent ] - Extension ‘binding-exec’ has been installed.

I don’t think that this actually worked, since I can’t seem to use it

More exceptions just a few hours ago:

2016-04-15 21:56:27.610 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
2016-04-15 21:56:27.771 [ERROR] [.jupnp.transport.impl.DatagramIOImpl] - Exception sending datagram to: /239.255.255.250: java.io.IOException: Invalid argument
java.io.IOException: Invalid argument

I also have the impression that the exceptions are rather random. If I reboot the device, I get different exception, errors and behaviour. Makes me wonder if it could be performance related, and hence maybe the docker image is starting a few processes for which it asssumes that another process is already in a certain state (which it might not be).

I think for the analysis you should separate general distro issues from issues that might come from using the docker image.

So please check the “normal” distro itself by simply unzipping and launching it.
Note that since yesterday, the demo does NOT come up by default anymore, but the system starts with the standard packaging and you need to manually add what you need (or you change it in conf/services/addons.cfg before launch).

I’ll do some more digging, but it would be cool if anyone with more openhab experience could spot some quick-wins (like, “ah, of course, you’re getting this error because directory X does not exist”) :slight_smile:

I understand that it needs config, but by using paperUI I assume that I can “install” the “exec” binding? It seems as if it’s doing that, although it takes a long time:

at java.lang.Thread.run(Thread.java:745)[:1.8.0_77] 2016-04-19 21:08:57.095 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-package-standard': The origin update count has changed since the replacement copy was created. 2016-04-19 21:08:59.516 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start 2016-04-19 21:09:06.733 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app 2016-04-19 21:09:07.374 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui 2016-04-19 21:09:12.757 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app 2016-04-19 21:09:12.990 [INFO ] [core.karaf.internal.FeatureInstaller] - Installed 'openhab-package-standard' 2016-04-19 22:29:46.899 [INFO ] [b.core.service.AbstractActiveService] - Exec Refresh Service has been started 2016-04-19 22:29:46.995 [INFO ] [smarthome.event.ExtensionEvent ] - Extension 'binding-exec' has been installed.

but it does not show up in the addons folder:

root@raspberrypi3:~/addons# ls -al /openhab/addons/ total 4 drwxrwxr-x 1 openhab openhab 12 Apr 19 21:05 . drwxr-xr-x 1 openhab openhab 336 Apr 19 21:06 .. -rw-rw-r-- 1 openhab openhab 70 Apr 19 03:37 README

And in the paperUI, when I click configuration/bindings, nothing shows up.

However, when I renavigate to extensions in paperUI, the exec binding is highlighted in blue, and has a button “uninstall”, so the system does seem to think it’s installed?

Most of the docs I can find are for openhab 1.x, and I’m not making a lot of progress I’m afraid.

If it helps, here’s the (debug) logfile again, starting from a clean openhab/openhab-docker that I built a few minutes ago with the latest snapshot, and no configuration whatsoever. Not mounting any volumes, config files etc etc: https://gist.github.com/marnikvde/5384d366e6935530265a5cd6eb27f6af

I don’t think that a clean install should have so many errors/exceptions.

BTW: to your comment on distro errors vs docker errors: the dockerfile is basically downloading the zip, unzipping it and running the start script, so I’m not sure what kind of errors I should be looking for, it seems straightforward to a noob like myself :slight_smile:

(also note that the openhab-package-standard seems to have installed correctly this time, but not in my previous attempt, while I have not changed anything other than an image rebuild a few hours apart in time).

Ok, here’s proof that there’s something wrong with the plain vanilla install: https://gist.github.com/marnikvde/25567922af7761a5a3b395154b8e7845

lol this was annoying the hell out of me until I saw that my config has:
things/demo.things:yahooweather:weather:berlin [ location="638242" ]

which should be:
things/demo.things:yahooweather:weather:berlin [ location=638242 ]

from https://www.eclipse.org/smarthome/documentation/features/bindings/yahooweather/readme.html#channels

I don’t know if that is an issue with the install or repo that needs to be fixed.