Upgrade to 2.3 (build 1251 &1252) problems ==> FIXED

I’m trying to install 2.3.0-SNAPSHOT Build #1251 and I get big troubles.

The local openhab website does not work.
The logging gives me nothing either.

WHat did I do?

Pin64 machine
I installed pine64_openhab2_20170129.img
Upgraded to 2.2
Everything worked as expected
(I did not try the logging)

then I did: wget -qO - ‘https://bintray.com/user/downloadSubjectPublicKey?username=openhab’ | sudo apt-key add -
sudo apt-get install apt-transport-https

echo ‘deb https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main’ | sudo tee /etc/apt/sources.list.d/openhab2.list

sudo apt-get update
sudo apt-get upgrade

http://:8080/start/index
Gives back:

HTTP ERROR 404
Problem accessing /start/index. Reason:

Not Found

Powered by Jetty:// 9.3.21.v20170918

Same for basicUI
HTTP ERROR 404
Problem accessing /basicui/app. Reason:

Not Found

Powered by Jetty:// 9.3.21.v20170918

I can ssh into the machine
when I then do ssh -p 8101 openhab@localhost

log:get
Logger | Level
------------------------------------------------------------±-----
ROOT | WARN
javax.jmdns | ERROR
org.apache.aries.spifly | ERROR
org.apache.karaf.kar.internal.KarServiceImpl | ERROR
org.apache.sshd | ERROR
org.eclipse.smarthome | INFO
org.jupnp | ERROR
org.openhab | INFO
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper | ERROR
smarthome.event | INFO
smarthome.event.InboxUpdatedEvent | ERROR
smarthome.event.ItemStateEvent | ERROR
smarthome.event.ThingStatusInfoEvent | ERROR

yet log:tail nothing happens
and log:display gives back an empty lines

not sure how I can debug this. Any idea’s?

What is the local openhab website? http://< IP >:8080? What happens?

As I wrote http://:8080/start/index
Gives back:

HTTP ERROR 404
Problem accessing /start/index. Reason:

Not Found
Powered by Jetty:// 9.3.21.v20170918

I turned the pine64 back on today

And when I tried sudo systemctl status openhab2.service
I received this answer:

openhab2.service - openHAB 2 - empowering the smart home
Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-04-08 12:53:05 CEST; 4min 33s ago
Docs: http://docs.openhab.org
https://community.openhab.org
Main PID: 618 (java)
CGroup: /system.slice/openhab2.service
└─618 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -Dopenhab.userdata=/var/lib/o

Apr 08 12:53:28 openhab karaf[618]: at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) [?:?]
Apr 08 12:53:28 openhab karaf[618]: at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
Apr 08 12:53:28 openhab karaf[618]: at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) [?:?]
Apr 08 12:53:28 openhab karaf[618]: at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [?:?]
Apr 08 12:53:28 openhab karaf[618]: at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [?:?]
Apr 08 12:53:28 openhab karaf[618]: at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:508) [?:?]
Apr 08 12:53:28 openhab karaf[618]: at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461) [?:?]
Apr 08 12:53:28 openhab karaf[618]: at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624) [?:?]
Apr 08 12:53:28 openhab karaf[618]: at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72) [40:org.apache.felix.scr:2.0.12]
Apr 08 12:53:28 openhab karaf[618]: at org.apache.felix.scr.impl.inject.BindMethod.getServiceObject(BindMethod.java:651) [40:org.apache.felix.scr:2.0.12]
~

What version were you upgrading from? I upgraded from 2.2.0 a couple of days ago and had similar 404 errors. Clearing my cache resolved the issue.

The following commands will delete the cache and will hopefully get you going again.

sudo service openhab2 stop
sudo rm -r /var/lib/openhab2/cache
sudo rm -r /var/lib/openhab2/tmp
sudo service openhab2 start

As detailed here: After upgrade to latest snapshot: Error installing boot features | invalid header field

When you restart the service it might be an idea opening a second ssh window and running tail -f /var/log/openhab2/openhab.log

1 Like

I upgraded from the stable 2.2 build, that was only used for a few minutes. (It’s a new machine, only used long enough, to know it was working)

This is what I get when I do that
openhab> tail -f /var/log/openhab2/openhab.log
2018-04-07 12:58:50.866 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘zwave.things’
2018-04-07 13:05:48.146 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2018-04-07 13:05:48.523 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2018-04-07 13:05:48.980 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2018-04-07 13:08:34.450 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2018-04-07 13:20:23.707 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2018-04-07 13:20:23.738 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2018-04-07 13:20:23.751 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2018-04-07 13:20:23.806 [INFO ] [basic.internal.servlet.WebAppServlet] - Stopped Basic UI
2018-04-07 13:20:23.851 [INFO ] [.dashboard.internal.DashboardService] - Stopped dashboard

And for clarity it’s still not working.
Just to be sure , I rebooted the machine. The problem remains, both for log viewing and for the website.
It feels that openhab does react to events, yet I can’t know for sure without the logging…

y

To get the logging working, the problem may be similar to this: Logfile not updating anymore, after upgrade from old version

Check to see if the .dist file exists first.

If there’s a runtime fault, the following command may be able to provide more details about it:

sudo journalctl -u openhab2.service -b

Also, it maybe helpful to provide the output of:

openhab-cli info
1 Like

Thank you.
I’ll try that tonight.
Where should I find the .dist file?

Sorry its the dpkg-dist file mentioned in the post. If that doesn’t exist then you likely don’t need to do anything.

For the journalctl command, there will be a lot of lines, but you should be able to see the last boot down the bottom.

and asked if you wanted to replace it, the default option is unfortunately “no”.
this part is unclear. does this mean I should have answered yes to that question?

That’s correct, we’re looking at a way to pre-warn people about these breaking changes before they are made in the future.

1 Like

logging works now.
Will try to see what the log say to see i I can debug the website

Meanwhile I also upgraded to 1252.
Website problem stays.
I had a few other file where on the upgrade for 1251 I was asked if I wanted to replace them.

I assumed yes was better as i would later be also able to replace them, wheren whe I upgaded them, I would not be able to go back.

I hope that the upgrade to 1252 would ask me again. It did not.
How can I figure out what files to replace?

20:25:41.581 [ERROR] [eclipse.smarthome.io.transport.serial] - Component descriptor entry ‘OSGI-INF/*.xml’ not found
Sound like a problem

openhab@openhab:/etc/openhab2$ openhab-cli info

Version: 2.3.0-SNAPSHOT (#1252)

User: openhab (Active Process 19058)
User Groups: openhab tty dialout

Directories: Folder Name | Path | User:Group
----------- | ---- | ----------
OPENHAB_HOME | /usr/share/openhab2 | root:root
OPENHAB_RUNTIME | /usr/share/openhab2/runtime | openhab:openhab
OPENHAB_USERDATA | /var/lib/openhab2 | openhab:openhab
OPENHAB_CONF | /etc/openhab2 | openhab:openhab
OPENHAB_LOGDIR | /var/log/openhab2 | openhab:openhab

URLs: http:/:8080
https://:8443

You’ve changed the ownership of /usr/share/openhab to root. It needs to be openhab:

sudo chown -R openhab:openhab /usr/share/openhab2

eh, I don’t remember doing that.
strange. I follow a document that says what to do, it’s not in there…
How could I have done that?

Used your command and now it’s OPENHAB_HOME | /usr/share/openhab2 | openhab:openhab

Error with website stays. Looks like there are many errors in the logging. I guess 1252 is very unstable.