Crash on startup on OS X when bluetooth binding is present

I’ve download openHAB 1.8.1 and copied all addons into the addon folder. When executing ./start.sh it loads some addons and then:

BlueCove version 2.1.1-SNAPSHOT on mac
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fff8512a1e0, pid=2581, tid=8971
#
# JRE version: Java(TM) SE Runtime Environment (8.0_51-b16) (build 1.8.0_51-b16)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.51-b03 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C  [libsystem_c.dylib+0x11e0]  strncpy+0x40
#
# Core dump written. Default location: /cores/core or core.2581 (max size 1000 kB). To ensure a full core dump, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/lars/coding/openhab/openhab-1.8.1/hs_err_pid2581.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
./start.sh: line 33:  2581 Abort trap: 6           java -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Djetty.port=$HTTP_PORT -Djetty.port.ssl=$HTTPS_PORT -Djetty.home=. -Dlogback.configurationFile=configurations/logback.xml -Dfelix.fileinstall.dir=addons -Dfelix.fileinstall.filter=.*\\.jar -Djava.library.path=lib -Djava.security.auth.login.config=./etc/login.conf -Dorg.quartz.properties=./etc/quartz.properties -Dequinox.ds.block_timeout=240000 -Dequinox.scr.waitTimeOnBlock=60000 -Dfelix.fileinstall.active.level=4 -Djava.awt.headless=true -jar $cp $* -console

I found out that removing org.openhab.binding.bluetooth-1.8.1.jar from the addons folder successfully starts openHAB on my OS X (10.11.2).

But http://localhost:8080/ forwards to http://localhost:8080/openhab.app and returns

HTTP ERROR 500

Problem accessing /openhab.app. Reason:

    Sitemap 'default' could not be found
Caused by:

org.openhab.ui.webapp.render.RenderException: Sitemap 'default' could not be found
	at org.openhab.ui.webapp.internal.servlet.WebAppServlet.service(WebAppServlet.java:115)
	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:350)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
	at java.lang.Thread.run(Thread.java:745)

Any ideas?

Hi Lars, just adding a link to your issue that implicates the bluetooth binding. I think the Bluetooth binding has a native code dependency which is a problem on your OS X version. Can you describe the OS and hardware?

  • OS X 10.11.2 (latest)

Java™ SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot™ 64-Bit Server VM (build 25.51-b03, mixed mode)```

  • MacBook Pro (13-inch, Early 2011)
  • Built-in Bluetooth without Bluetooth Low Energy (BLE)
  • BLE USB dongle installed but temporarily unplugged, Bluetooth turned off

Edit: I’ve found out that plugging the BLE USB dongle in and enabling Bluetooth (OS X status bar icon) prevents the crash. Since most users don’t use extra BLE USB dongles and my Mac is quiet “old” this shouldn’t be an issue for most of openHAB users.

Do you have any ideas why http://localhost:8080/openhab.app returns 500?

The default sitemap (if ?sitemap=basename isn’t specified) is default.sitemap, and you must not have one in your sitemaps directory. If you installed the demo files, you could go to http://localhost:8080/openhab.app?sitemap=demo and that would be using the demo.sitemap file.

Does it mean that “Runtime core” doesn’t ship with web pages? That’s why I need to install the “Demo setup” package as well?

The demo files provide a working example of how to define a sitemap, items and rules. These are just text files in a specific format (documented at the wiki). openHAB 1.8 comes with the Classic UI, which delivers a web client to browsers. Also using the REST API, mobile clients are supported.

Ok, that means, that I should have seen some UI in the web without installing the “demo” package.

With “demo” installed, I’m still getting 500 on http://localhost:8080/openhab.app?sitemap=demo:

HTTP ERROR 500

Problem accessing /openhab.app. Reason:

    Sitemap 'demo' could not be found
Caused by:

org.openhab.ui.webapp.render.RenderException: Sitemap 'demo' could not be found
	at org.openhab.ui.webapp.internal.servlet.WebAppServlet.service(WebAppServlet.java:115)
	at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
	at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
	at org.eclipse.jetty.server.Server.handle(Server.java:346)
	at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
	at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:890)
	at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:944)
	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:630)
	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
	at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
	at java.lang.Thread.run(Thread.java:745)

Probably messed up copying the demo package into the distribution folder. Demo site now renders. Thanks for your support!

1 Like