[SOLVED / WORKAROUND] /rest not starting

Hi,

After having gotten the zwave binding to work on FreeBSD I’ve run into the next problem. I can’t get /rest started. I’ve found the following possibly relevant discussion on github,

but the issue was closed and the proposed solution does not work for me. If I remove the servicediscovery bundle the REST api does not even attempt to start.

When I leave the servicediscovery bundle in it does attempt to start, but keeps restarting ad infinitum. When I display the list of bundles in the console (list), it tells me the bundle is “unsatisfied”. A “list -c” tells me (among many other things):

No instances were created because: Can not activate instance of component org.openhab.io.rest.RESTApplication. The activation throws: java.lang.NullPointerException

and a class not found exception:

18:06:19.848 [WARN ] [sphere.cpr.AtmosphereFramework:1097 ] -
java.lang.ClassNotFoundException: org.atmosphere.interceptor.DefaultHeadersInterceptor

Anyone have any pointers on where to start to look?

NB Here is the (start_debug.sh) output I get when I start openhab:

17:21:38.813 [DEBUG] [.s.internal.SchedulerActivator:36 ] - Scheduler has been started.
17:21:38.981 [INFO ] [uartz.impl.StdSchedulerFactory:1175 ] - Using default implementation for ThreadExecutor
17:21:39.051 [INFO ] [rtz.core.SchedulerSignalerImpl:61 ] - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
17:21:39.053 [INFO ] [rg.quartz.core.QuartzScheduler:243 ] - Quartz Scheduler v.2.1.7 created.
17:21:39.059 [INFO ] [org.quartz.simpl.RAMJobStore :154 ] - RAMJobStore initialized.
17:21:39.064 [INFO ] [rg.quartz.core.QuartzScheduler:268 ] - Scheduler meta-data: Quartz Scheduler (v2.1.7) ‘openHAB-job-scheduler’ with instanceId ‘NON_CLUSTERED’
Scheduler class: ‘org.quartz.core.QuartzScheduler’ - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool ‘org.quartz.simpl.SimpleThreadPool’ - with 2 threads.
Using job-store ‘org.quartz.simpl.RAMJobStore’ - which does not support persistence. and is not clustered.

17:21:39.066 [INFO ] [uartz.impl.StdSchedulerFactory:1324 ] - Quartz scheduler ‘openHAB-job-scheduler’ initialized from specified file: ‘./etc/quartz.properties’
17:21:39.068 [INFO ] [uartz.impl.StdSchedulerFactory:1328 ] - Quartz scheduler version: 2.1.7
17:21:39.070 [INFO ] [rg.quartz.core.QuartzScheduler:534 ] - Scheduler openHAB-job-scheduler_$_NON_CLUSTERED started.
17:21:39.082 [DEBUG] [o.config.core.ConfigDispatcher:146 ] - Processing openHAB default configuration file ‘/usr/local/openhab-1.8.0-SNAPSHOT/configurations/openhab_default.cfg’.
17:21:39.531 [DEBUG] [o.config.core.ConfigDispatcher:168 ] - Processing openHAB main configuration file ‘/usr/local/openhab-1.8.0-SNAPSHOT/configurations/openhab.cfg’.
17:21:39.688 [DEBUG] [.o.core.internal.CoreActivator:93 ] - UUID file already exists at ‘/usr/local/openhab-1.8.0-SNAPSHOT/webapps/static/uuid’ with content ‘3c556d7c-fdf0-4123-a01a-bc21215f6f51’
17:21:39.694 [DEBUG] [.o.core.internal.CoreActivator:115 ] - Created file ‘/usr/local/openhab-1.8.0-SNAPSHOT/webapps/static/version’ with content ‘1.8.0’
17:21:39.696 [INFO ] [.o.core.internal.CoreActivator:61 ] - openHAB runtime has been started (v1.8.0).
17:21:39.797 [DEBUG] [a.internal.AutoUpdateActivator:31 ] - AutoUpdate binding has been started.
17:21:43.695 [DEBUG] [.p.i.PersistenceModelActivator:23 ] - Registered ‘persistence’ configuration parser
17:21:43.795 [DEBUG] [.c.t.i.TransformationActivator:38 ] - Transformation Service has been started.
17:21:43.964 [DEBUG] [m.internal.MultimediaActivator:34 ] - Multimedia I/O bundle has been started.
17:21:44.072 [DEBUG] [.s.i.DiscoveryServiceActivator:27 ] - Discovery service has been started.
17:21:44.094 [INFO ] [o.o.i.s.i.DiscoveryServiceImpl:93 ] - mDNS service has been started
17:21:44.202 [DEBUG] [.io.transport.mqtt.MqttService:123 ] - Starting MQTT Service…
17:21:44.220 [ERROR] [o.o.i.s.i.DiscoveryServiceImpl:55 ] - Invalid argument
17:21:44.729 [DEBUG] [.i.internal.ItemModelActivator:24 ] - Registered ‘item’ configuration parser
17:21:45.157 [DEBUG] [o.o.c.i.items.ItemRegistryImpl:137 ] - Item provider ‘GenericItemProvider’ has been added.
17:21:47.746 [DEBUG] [.o.m.s.i.SitemapModelActivator:23 ] - Registered ‘sitemap’ configuration parser
17:21:48.282 [DEBUG] [io.rest.internal.RESTActivator:33 ] - REST API has been started.
17:21:48.511 [INFO ] [org.atmosphere.util.IOUtils :370 ] - META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
17:21:48.636 [INFO ] [sphere.cpr.AtmosphereFramework:2601 ] - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
17:21:48.641 [INFO ] [cpr.DefaultAnnotationProcessor:138 ] - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$BytecodeBasedAnnotationProcessor being used
17:21:48.746 [WARN ] [cpr.DefaultAnnotationProcessor:178 ] - Unable to detect annotations. Application may fail to deploy.
17:21:48.890 [INFO ] [sphere.cpr.AtmosphereFramework:1891 ] - Auto detecting atmosphere handlers /WEB-INF/classes/
17:21:48.951 [INFO ] [sphere.cpr.AtmosphereFramework:639 ] - Installed AtmosphereHandler org.atmosphere.handler.ReflectorServletProcessor mapped to context-path /* and Broadcaster Class org.atmosphere.jersey.JerseyBroadcaster
17:21:48.953 [INFO ] [sphere.cpr.AtmosphereFramework:1945 ] - Auto detecting WebSocketHandler in /WEB-INF/classes/
17:21:48.957 [INFO ] [sphere.cpr.AtmosphereFramework:1602 ] - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
17:21:49.155 [INFO ] [.a.h.ReflectorServletProcessor:103 ] - Installing Servlet com.sun.jersey.spi.container.servlet.ServletContainer
17:21:49.625 [INFO ] [c.s.j.s.i.a.WebApplicationImpl:815 ] - Initiating Jersey application, version ‘Jersey: 1.18.1 02/19/2014 03:28 AM’
17:21:49.634 [INFO ] [c.s.j.s.i.a.WebApplicationImpl:826 ] - Adding the following classes declared in META-INF/services/jersey-server-components to the resource configuration:
class org.atmosphere.jersey.AtmosphereResourceConfigurator
17:21:49.921 [INFO ] [j.s.i.a.DeferredResourceConfig:101 ] - Instantiated the Application class org.openhab.io.rest.RESTApplication
17:21:52.631 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘Louiseval.sitemap’
17:21:53.504 [INFO ] [c.internal.ModelRepositoryImpl:80 ] - Loading model ‘Louiseval.items’
17:21:53.751 [DEBUG] [i.internal.GenericItemProvider:154 ] - Processing binding configs for items from model ‘Louiseval.items’
17:21:53.768 [DEBUG] [i.internal.GenericItemProvider:133 ] - Read items from model ‘Louiseval.items’
17:21:54.714 [INFO ] [sphere.cpr.AtmosphereFramework:2435 ] - AtmosphereInterceptor CORS Interceptor Support will always be executed first
17:21:54.716 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT
17:21:54.719 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Default Response’s Headers Interceptor with priority AFTER_DEFAULT
17:21:54.725 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT
17:21:54.729 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT
17:21:54.732 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT
17:21:54.739 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT
17:21:54.742 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT
17:21:54.756 [INFO ] [sphere.cpr.AtmosphereFramework:935 ] - Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
17:21:54.761 [WARN ] [sphere.cpr.AtmosphereFramework:941 ] - No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache
17:21:54.764 [INFO ] [sphere.cpr.AtmosphereFramework:949 ] - Default Broadcaster Class: org.atmosphere.jersey.JerseyBroadcaster
17:21:54.766 [INFO ] [sphere.cpr.AtmosphereFramework:950 ] - Broadcaster Polling Wait Time 100
17:21:54.768 [INFO ] [sphere.cpr.AtmosphereFramework:951 ] - Shared ExecutorService supported: true
17:21:54.770 [INFO ] [sphere.cpr.AtmosphereFramework:958 ] - Messaging Thread Pool Size: 10
17:21:54.772 [INFO ] [sphere.cpr.AtmosphereFramework:968 ] - Async I/O Thread Pool Size: 10
17:21:54.775 [INFO ] [sphere.cpr.AtmosphereFramework:979 ] - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
17:21:54.777 [INFO ] [sphere.cpr.AtmosphereFramework:980 ] - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
17:21:54.779 [INFO ] [sphere.cpr.AtmosphereFramework:990 ] - Invoke AtmosphereInterceptor on WebSocket message true
17:21:54.780 [INFO ] [sphere.cpr.AtmosphereFramework:991 ] - HttpSession supported: false
17:21:54.782 [INFO ] [sphere.cpr.AtmosphereFramework:993 ] - Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
17:21:54.784 [INFO ] [sphere.cpr.AtmosphereFramework:994 ] - Atmosphere is using async support: org.atmosphere.container.JettyAsyncSupportWithWebSocket running under container: jetty/8.1.3.v20120522 with WebSocket enabled.
17:21:54.790 [INFO ] [sphere.cpr.AtmosphereFramework:996 ] - Atmosphere Framework 2.2.5 started.
17:21:54.793 [INFO ] [sphere.cpr.AtmosphereFramework:998 ] -

For Atmosphere Framework Commercial Support, visit 
http://www.async-io.org/ or send an email to support@async-io.org

17:21:54.797 [INFO ] [penhab.io.rest.RESTApplication:144 ] - Started REST API at /rest
17:21:54.811 [DEBUG] [o.o.i.s.i.DiscoveryServiceImpl:66 ] - Registering new service _openhab-server._tcp.local. at port 8080
17:21:54.871 [INFO ] [org.atmosphere.util.IOUtils :370 ] - META-INF/services/org.atmosphere.cpr.AtmosphereFramework not found in class loader
17:21:54.893 [INFO ] [sphere.cpr.AtmosphereFramework:2601 ] - Atmosphere is using org.atmosphere.cpr.DefaultAnnotationProcessor for processing annotation
17:21:54.895 [INFO ] [cpr.DefaultAnnotationProcessor:138 ] - AnnotationProcessor class org.atmosphere.cpr.DefaultAnnotationProcessor$BytecodeBasedAnnotationProcessor being used
17:21:54.924 [WARN ] [cpr.DefaultAnnotationProcessor:178 ] - Unable to detect annotations. Application may fail to deploy.
17:21:55.022 [INFO ] [sphere.cpr.AtmosphereFramework:1891 ] - Auto detecting atmosphere handlers /WEB-INF/classes/
17:21:55.042 [INFO ] [sphere.cpr.AtmosphereFramework:639 ] - Installed AtmosphereHandler org.atmosphere.handler.ReflectorServletProcessor mapped to context-path /* and Broadcaster Class org.atmosphere.jersey.JerseyBroadcaster
17:21:55.043 [INFO ] [sphere.cpr.AtmosphereFramework:1945 ] - Auto detecting WebSocketHandler in /WEB-INF/classes/
17:21:55.047 [INFO ] [sphere.cpr.AtmosphereFramework:1602 ] - Installed WebSocketProtocol org.atmosphere.websocket.protocol.SimpleHttpProtocol
17:21:55.061 [INFO ] [.a.h.ReflectorServletProcessor:103 ] - Installing Servlet com.sun.jersey.spi.container.servlet.ServletContainer
17:21:55.071 [INFO ] [c.s.j.s.i.a.WebApplicationImpl:815 ] - Initiating Jersey application, version ‘Jersey: 1.18.1 02/19/2014 03:28 AM’
17:21:55.076 [INFO ] [c.s.j.s.i.a.WebApplicationImpl:826 ] - Adding the following classes declared in META-INF/services/jersey-server-components to the resource configuration:
class org.atmosphere.jersey.AtmosphereResourceConfigurator
17:21:55.150 [INFO ] [j.s.i.a.DeferredResourceConfig:101 ] - Instantiated the Application class org.openhab.io.rest.RESTApplication
^C17:21:57.022 [INFO ] [sphere.cpr.AtmosphereFramework:2435 ] - AtmosphereInterceptor CORS Interceptor Support will always be executed first
17:21:57.024 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor CORS Interceptor Support with priority FIRST_BEFORE_DEFAULT
17:21:57.026 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Default Response’s Headers Interceptor with priority AFTER_DEFAULT
17:21:57.028 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Android Interceptor Support with priority AFTER_DEFAULT
17:21:57.030 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor SSE Interceptor Support with priority AFTER_DEFAULT
17:21:57.032 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor JSONP Interceptor Support with priority AFTER_DEFAULT
17:21:57.033 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Atmosphere JavaScript Protocol with priority AFTER_DEFAULT
17:21:57.035 [INFO ] [sphere.cpr.AtmosphereFramework:2404 ] - Installed AtmosphereInterceptor Browser disconnection detection with priority AFTER_DEFAULT
17:21:57.037 [INFO ] [sphere.cpr.AtmosphereFramework:935 ] - Using EndpointMapper class org.atmosphere.util.DefaultEndpointMapper
17:21:57.039 [WARN ] [sphere.cpr.AtmosphereFramework:941 ] - No BroadcasterCache configured. Broadcasted message between client reconnection will be LOST. It is recommended to configure the org.atmosphere.cache.UUIDBroadcasterCache
17:21:57.040 [INFO ] [sphere.cpr.AtmosphereFramework:949 ] - Default Broadcaster Class: org.atmosphere.jersey.JerseyBroadcaster
17:21:57.041 [INFO ] [sphere.cpr.AtmosphereFramework:950 ] - Broadcaster Polling Wait Time 100
17:21:57.043 [INFO ] [sphere.cpr.AtmosphereFramework:951 ] - Shared ExecutorService supported: true
17:21:57.044 [INFO ] [sphere.cpr.AtmosphereFramework:958 ] - Messaging Thread Pool Size: 10
17:21:57.046 [INFO ] [sphere.cpr.AtmosphereFramework:968 ] - Async I/O Thread Pool Size: 10
17:21:57.047 [INFO ] [sphere.cpr.AtmosphereFramework:979 ] - Using BroadcasterFactory: org.atmosphere.cpr.DefaultBroadcasterFactory
17:21:57.049 [INFO ] [sphere.cpr.AtmosphereFramework:980 ] - Using WebSocketProcessor: org.atmosphere.websocket.DefaultWebSocketProcessor
17:21:57.051 [INFO ] [sphere.cpr.AtmosphereFramework:990 ] - Invoke AtmosphereInterceptor on WebSocket message true
17:21:57.052 [INFO ] [sphere.cpr.AtmosphereFramework:991 ] - HttpSession supported: false
17:21:57.054 [INFO ] [sphere.cpr.AtmosphereFramework:993 ] - Atmosphere is using DefaultAtmosphereObjectFactory for dependency injection and object creation
17:21:57.055 [INFO ] [sphere.cpr.AtmosphereFramework:994 ] - Atmosphere is using async support: org.atmosphere.container.JettyAsyncSupportWithWebSocket running under container: jetty/8.1.3.v20120522 with WebSocket enabled.
17:21:57.056 [INFO ] [sphere.cpr.AtmosphereFramework:996 ] - Atmosphere Framework 2.2.5 started.
17:21:57.058 [INFO ] [sphere.cpr.AtmosphereFramework:998 ] -

For Atmosphere Framework Commercial Support, visit 
http://www.async-io.org/ or send an email to support@async-io.org

17:21:57.059 [INFO ] [penhab.io.rest.RESTApplication:144 ] - Started REST API at /rest

and then eventually

18:06:19.848 [WARN ] [sphere.cpr.AtmosphereFramework:1097 ] -
java.lang.ClassNotFoundException: org.atmosphere.interceptor.DefaultHeadersInterceptor
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501) ~[org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421) ~[org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412) ~[org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) ~[org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_60]
at org.atmosphere.util.IOUtils.loadClass(IOUtils.java:309) ~[atmosphere-runtime-2.2.5.jar:2.2.5]
at org.atmosphere.cpr.AtmosphereFramework.configureAtmosphereInterceptor(AtmosphereFramework.java:1094) [atmosphere-runtime-2.2.5.jar:2.2.5]
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:892) [atmosphere-runtime-2.2.5.jar:2.2.5]
at org.atmosphere.cpr.AtmosphereFramework.init(AtmosphereFramework.java:780) [atmosphere-runtime-2.2.5.jar:2.2.5]
at org.atmosphere.cpr.AtmosphereServlet.configureFramework(AtmosphereServlet.java:101) [atmosphere-runtime-2.2.5.jar:2.2.5]
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:80) [atmosphere-runtime-2.2.5.jar:2.2.5]
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.init(ServletRegistration.java:49) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na]
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.registerServlet(ProxyServlet.java:179) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na]
at org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.registerServlet(HttpServiceImpl.java:66) [org.eclipse.equinox.http.servlet_1.1.300.v20120522-1841.jar:na]
at org.openhab.io.habmin.HABminApplication.activate(HABminApplication.java:179) [bundlefile:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_60]
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:235) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433) [org.eclipse.osgi_3.8.2.v20130124-134944.jar:na]
at org.eclipse.equinox.internal.ds.InstanceProcess.registerService(InstanceProcess.java:536) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:260) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89) [org.eclipse.equinox.ds_1.4.1.v20120926-201320.jar:na]
at org.eclipse.equinox.internal.util.impl.tpt.threadpool.Executor.run(Executor.java:70) [org.eclipse.equinox.util_1.0.400.v20120917-192807.jar:na]

To follow up on my own post, I tried enabling the Sonos binding, only to see that fail as well. But this time I got a better indication of where the problem was and long story short, it seems the FreeBSD IP stack does not seem to support mapping IPV4 multicast addresses inside IPV6 addresses. Here is a link to the corresponding bug report:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193246

It appears to be a non-trivial amount of work to fix this, and the use case is apparently not entirely clean, so resolution of the bug fix is still pending. In any case there is also a work-around. Adding the following define the start.sh makes it work:

-Djava.net.preferIPv4Stack=true

This fixes both the REST problem and the Sonos binding problem!

I now have a fully working (so far, haven’t tried all the bindings) openHAB version 1.8.0-SNAPSHOT on FreeBSD.

Cheers,
Marc.

Given that the release of OH 2 is not too far off it probably isn’t worth spending a lot of time on this, but if you can do it in 10-15 minutes a short section on the Installation wiki page could be useful for others who want to run OH on FreeBSD. It would certainly be easier to find and reference than forum postings.

Hi,

I added a (separate) FreeBSD installation article to the Wiki. I also submitted a pull request to nrjavaserial, so hopefully this will get merged and then installation will become much easier.

See also https://github.com/openhab/openhab/wiki/FreeBSD

Cheers,
Marc.

1 Like

For the CentOS 7 and Java 1.8_93 the only thing that helped was to disable IPv6 on OS level:
add net.ipv6.conf.all.disable_ipv6 = 1 to /etc/sysctl.conf and reboot.

The simptom from UI of rest api not started is ProxyServlet: /rest/sitemaps error when oprning the URL from browser.