New folder structure

It should now be in /var/lib/openhab2/etc. this means it shouldn’t get overwritten each time you update anymore!

OK, found it /var/lib/openhab2/etc/org.ops4j.pax.logging.cfg

Thank you! At least, the sitemap is back to work :slight_smile: Unfortunately, there are still errors and my KNX binding seem not to be able to write back to the KNX bus. Some logs are:

22:23:53.608 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Front_Dimmer' received command ON
22:23:53.609 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Front_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:54.758 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Front_Dimmer' received command OFF
22:23:54.758 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Front_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:56.304 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Middle_Dimmer' received command ON
22:23:56.305 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Middle_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:56.703 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Middle_Dimmer' received command OFF
22:23:56.704 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Middle_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:57.150 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Back_Dimmer' received command ON
22:23:57.150 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Back_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException
22:23:57.534 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'Light_Studio_Back_Dimmer' received command OFF
22:23:57.534 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/Light_Studio_Back_Dimmer] | {org.osgi.service.event.EventHandler, tuwien.auto.calimero.process.ProcessListener}={event.topics=openhab/*, component.name=org.openhab.binding.knx, component.id=237, service.id=427, service.bundleid=195, service.scope=bundle} | Bundle(org.openhab.binding.knx_1.9.0.201611110211 [195])]
java.lang.ClassCastException

Any idea?

EDIT: Restarting all components of openHAB offers the solution. Probably its a good idea to adapt your snippet accordingly:

- sudo service openhab2 start
+ sudo service openhab2 restart

or, using systemctl

sudo systemctl restart openhab2.service

Thank you!

Thank you! It works.

Kay, I had to change something in karaf bin for the Rwe Binding to work. See this post. Will that be an issue

I did not upgrade, I installed fresh with same problem as WayneStronach reported.
The trick suggested includes moving /usr/share/openhab2/runtime/karaf/etc. It is not there.
But rest of the actions did it anyway.
Thanks!

Hi @Benjy,

Here’s my logs still one or two errors:

2016-11-12 19:28:09.818 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'items.items'
2016-11-12 19:28:10.536 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mysql.persist'
2016-11-12 19:28:20.661 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occured while initializing handler of thing 'mysensors:bridge-eth:10010': java.lang.UnsupportedOperationException
java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_65]
    at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_65]
    at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:186)[97:org.eclipse.smarthome.core:0.9.0.201611102032]
    at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:79)[97:org.eclipse.smarthome.core:0.9.0.201611102032]
    at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:63)[97:org.eclipse.smarthome.core:0.9.0.201611102032]
    at org.eclipse.smarthome.core.thing.internal.ThingManager$9.run(ThingManager.java:761)[104:org.eclipse.smarthome.core.thing:0.9.0.201611102032]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_65]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[:1.8.0_65]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[:1.8.0_65]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_65]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_65]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: java.lang.UnsupportedOperationException
    at java.util.AbstractList.add(AbstractList.java:148)[:1.8.0_65]
    at java.util.AbstractList.add(AbstractList.java:108)[:1.8.0_65]
    at org.openhab.binding.mysensors.internal.handler.MySensorsBridgeHandler.loadCacheFile(MySensorsBridgeHandler.java:176)[10:org.openhab.binding.mysensors:2.0.0.201610021604]
    at org.openhab.binding.mysensors.internal.handler.MySensorsBridgeHandler.initialize(MySensorsBridgeHandler.java:90)[10:org.openhab.binding.mysensors:2.0.0.201610021604]
    at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:764)[104:org.eclipse.smarthome.core.thing:0.9.0.201611102032]
    at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[104:org.eclipse.smarthome.core.thing:0.9.0.201611102032]
    at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:177)[97:org.eclipse.smarthome.core:0.9.0.201611102032]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_65]
    ... 3 more
2016-11-12 19:28:20.787 [INFO ] [al.protocol.ip.MySensorsIpConnection] - Successfully connected to MySensors Bridge.
2016-11-12 19:28:20.791 [WARN ] [al.protocol.ip.MySensorsIpConnection] - Network Sanity Checker thread disabled from bridge configuration
2016-11-12 19:28:25.107 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2016-11-12 19:28:25.792 [INFO ] [assic.internal.servlet.WebAppServlet] - Started Classic UI at /classicui/app
2016-11-12 19:28:26.308 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /ui
2016-11-12 19:28:26.707 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at /start
2016-11-12 19:28:29.886 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2016-11-12 19:28:31.091 [WARN ] [eclipse.jetty.servlet.ServletHandler] - 
javax.servlet.ServletException: java.lang.IllegalStateException: Request scope has been already shut down.
    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:489)[154:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)[154:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)[154:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)[154:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)[154:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)[12:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[80:org.eclipse.jetty.servlet:9.2.14.v20151106]
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[80:org.eclipse.jetty.servlet:9.2.14.v20151106]
    at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[171:org.ops4j.pax.web.pax-web-jetty:4.2.4]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[78:org.eclipse.jetty.security:9.2.14.v20151106]
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:271)[171:org.ops4j.pax.web.pax-web-jetty:4.2.4]
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[80:org.eclipse.jetty.servlet:9.2.14.v20151106]
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[171:org.ops4j.pax.web.pax-web-jetty:4.2.4]
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.eclipse.jetty.server.Server.handle(Server.java:499)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[79:org.eclipse.jetty.server:9.2.14.v20151106]
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[71:org.eclipse.jetty.io:9.2.14.v20151106]
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[82:org.eclipse.jetty.util:9.2.14.v20151106]
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[82:org.eclipse.jetty.util:9.2.14.v20151106]
    at java.lang.Thread.run(Thread.java:745)[:1.8.0_65]
Caused by: java.lang.IllegalStateException: Request scope has been already shut down.
    at jersey.repackaged.com.google.common.base.Preconditions.checkState(Preconditions.java:173)[152:org.glassfish.jersey.bundles.repackaged.jersey-guava:2.22.2]
    at org.glassfish.jersey.process.internal.RequestScope.retrieveCurrent(RequestScope.java:239)[156:org.glassfish.jersey.core.jersey-common:2.22.2]
    at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:314)[156:org.glassfish.jersey.core.jersey-common:2.22.2]
    at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)[157:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)[157:org.glassfish.jersey.core.jersey-server:2.22.2]
    at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)[154:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
    ... 26 more
2016-11-12 19:28:31.289 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel

There is a few discussions on how to cope with the folder structure change on ubuntu/debian . But I use openhab on centos, so there is no “package” install. Uptill now I used makeHAB (a script posted here on the forum), the script basically removes everything but the user stuff and than replaces the runtime by unzipping the latest build.

Normally after running makeHAB I just run start.sh and all is fine… Not today. I get an:
./start.sh: line 6: /opt/openhab/runtime/karaf/bin/karaf: No such file or directory

start.sh is part of the openhab-online-2.0.0-SNAPSHOT.zip it appears this is not updated, or no longer used?

I used runtime/bin/start and it seems to work now (although I no longer have a console)…
Is this still supposed to work or did I miss anything?

Are you sure you are using the start.sh from the zip?
I just checked and its content is

#!/bin/sh

echo Launching the openHAB runtime...

DIRNAME=`dirname "$0"`
exec "${DIRNAME}/runtime/bin/karaf" "${@}"

Which does not have a runtime/karaf/bin/karaf in line 6…

I had the same problem 30 min ago: makeHAB.sh does not delete start.sh, so you (we) are using the old start.sh.
Copy it from the online snapshot and don’t forget to give the correct permissions …

I am not even able to find this “makeHAB”. Could you link it? Is the author still around to update it? Would be interesting to put it into a repository and/or into documentation…

Edit: and:

Sounds like the script might need to get updated to overwrite the start.sh. I have been away a few days, but should be able to look at it soon. For now, just remove the old file and run the script again. The new one will be dropped in.

Jim

@Benjy …and let me know if this works.

For me it didn’t. I’ll wait until the next upgrade.
Just for your information:
On my system the directory /usr/share/openhab2/runtime/karaf/etc don’t exist.

Hi @anfaenger, new build went up about an hour ago, try running

“sudo apt-get update && sudo apt-get upgrade” responding Y for any prompts you may get.

Hi @Benjy, sorry but nothing has changed after running “sudo apt-get update && sudo apt-get upgrade”.

That’s odd, do you get anything in /var/log/openhab2/openhab.log? If not, do you get anything related to openhab in /var/log/daemon.log?

I notice that you were running off of a new install. If you haven’t made any changes to openhab worth backing up, the best way to start anew would be to:

sudo apt-get purge openhab2-offline
sudo apt-get install openhab2-offline

Check those logs again and run a couple of “sudo service openhab2 restart” commands, if you’re still not running I will try and run the same process as you and see if I can debug from there.

Sorry, my mistake. Because I waited for the error message in openHABian-welcome-screen to desapear I didn’t tried to connect to dashboard and openhab.

As the openhab.log shows, the dashboard has been started and I can connect to dashboard and ui-interface.

Daemon.log is empty.

Now I did:

sudo apt-get purge openhab2-offline
sudo apt-get install openhab2-offline
sudo service openhab2 restart
sudo shutdown -r now

but in the openHABian-welcome-screen the error

awk: cannot open /usr/share/openhab2/runtime/karaf/etc/branding.properties (No such file or directory)

still appears like shown in the picture a few posts before.
Should I have to be worried about this message or just continue using openhab?

Thanks.

This is probably an openHABian specific error, (@ThomDietrich to confirm?) but nothing to worry about, those messages tell me that you’re setup and ready to go! :slight_smile:

@anfaenger another needed change because of the big folder structure change. You really chose the wrong weekend for your first openHAB experiences :sweat_smile:
I’ve already implemented the needed changes in openHABian. Please execute sudo openhabian-config, then first select “Update” to retrieve these changes, then select “Basic Setup” to apply them to your system.