Openhab2 and Raspberry Pi with osmc

  • Platform information:
    • Hardware: Raspberry PI 2
    • OS: osmc (build 2018.04)
    • Java Runtime Environment: openjdk version "1.8.0_171" OpenJDK Runtime Environment (build 1.8.0_171-8u171-b11-1~deb9u1-b11) OpenJDK Client VM (build 25.171-b11, mixed mode)
    • openHAB version: 2.2.0 (Build)
  • Issue of the topic: Cannot start openhab ([Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0])
  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue
    • Services configuration related to the issue
  • If logs where generated please post these here using code fences:
2018-05-27 15:39:41.273 [ERROR] [ternal.service.BootFeaturesInstaller] - Error installing boot features
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.FutureTask@1b6d686 rejected from java.util.concurrent.ThreadPoolExecutor@7e8ccc[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
	at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution( [?:?]
	at java.util.concurrent.ThreadPoolExecutor.reject( [?:?]
	at java.util.concurrent.ThreadPoolExecutor.execute( [?:?]
	at java.util.concurrent.AbstractExecutorService.submit( [?:?]
	at java.util.concurrent.Executors$DelegatedExecutorService.submit( [?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvisionInThread( [9:org.apache.karaf.features.core:4.1.3]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installFeatures( [9:org.apache.karaf.features.core:4.1.3]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.installFeatures( [9:org.apache.karaf.features.core:4.1.3]
	at org.apache.karaf.features.internal.service.BootFeaturesInstaller.installBootFeatures( [9:org.apache.karaf.features.core:4.1.3]
	at org.apache.karaf.features.internal.service.BootFeaturesInstaller.start( [9:org.apache.karaf.features.core:4.1.3]
	at org.apache.karaf.features.internal.osgi.Activator.doStart( [9:org.apache.karaf.features.core:4.1.3]
	at [9:org.apache.karaf.features.core:4.1.3]
	at java.util.concurrent.Executors$ [?:?]
	at [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
	at java.util.concurrent.ThreadPoolExecutor$ [?:?]
	at [?:?]

For debugging purposes I’ve created fresh configuration on sdcard:

  • install the freshest osmc version from image
  • install java: sudo apt-get install oracle-java8-jdk (sudo apt-get install -f to fix installation)
  • add stable openhab2 repository, add https transport package
  • install openhab2
  • change config in /etc/default/openhab2 by altering ports to 8090/8091 to avoid conflicts with kodi)
  • set systemctl service (enable, start)

After several hours of working “fresh” installation changed his state and started to put log (i’ve clicked web ui into standard mode when it was accessible):

2018-05-28 21:51:43.388 [WARN ] [org.jline                           ] - Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information)
2018-05-28 21:51:54.440 [INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder
2018-05-28 21:51:57.567 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at
2018-05-28 21:51:57.575 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at
2018-05-28 21:52:17.256 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2018-05-28 21:52:22.527 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-05-28 21:52:22.876 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-05-28 21:52:23.441 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-05-28 21:52:26.779 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2018-05-28 21:52:37.413 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2018-05-28 21:52:37.463 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2018-05-28 21:52:37.492 [INFO ] [er.internal.HomeBuilderDashboardTile] - Stopped Home Builder
2018-05-28 21:52:37.540 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard

Unfortunately it is hard to get more logs because file /var/lib/openhab2/config/org/ops4j/pax/logging.config is overwritten by each self-restart.

I see also errors with:

        Suppressed: java.lang.LinkageError: Unable to load library from /var/lib/openhab2/tmp/                    
                at org.fusesource.hawtjni.runtime.Library.load( ~[13:org.fusesource.jansi:1.16.0]                                    
                at org.fusesource.hawtjni.runtime.Library.extractAndLoad( ~[13:org.fusesource.jans

but as I understand it is not directly connected with web-ui fails.

Has anyone installed OpenHab2 with osmc?

I remember some very old threads regarding OSMC and that it does not work very well.
You may find those threads through the search button …

You may also try to meet the prerequisites for openHAB and get rid of openJDK:

Some time ago I’ve just tried openhab2 installation and it was successfull. Unfortunately after language change I got an error. After uninstall I cannot reproduce working openhab even on fresh environment.

I’ve installed also Oracle Java. Without success.

After saveral tries. On OSMC install from the distribution zip, not from apt-get package.

1 Like