Replacement of the Apt Snapshot Repository

Hi, a quick question
I used openhasbian install. I was on the old snapshot build #65x. Today updated the repo to the unstable branch to get the latest build and that got me to the #693

But that’s a build from 4th Jan, Why not the latest?

sudo apt-get update 
sudo apt-get upgrade 

Is not taking me any further?

should I do ?
sudo apt-get install openhab2

Will it upgrade my curent setup and keep my config? I’m afraid to do a separate parallel install and not to mess my house.

First of all, take a backup of your configs. You won’t lose anything during the upgrade but as they say: “better safe than sorry”

Then, follow these steps:

Thanks, I missed that post.
sudo apt-get install openhab2
got me to the latest version without the problems. Just lost server saved habpanel, as usual, but that stays in local browser and can be saved back to the server easily

1 Like

That’s weird but now I have the problem with the serial port after upgrading from snapshot to beta/RC.
I’ve created a separate thread on this issue.

Hi guys,

Anyone had any issues upgrading today to the lastest oh2 apt-get unstable version?
I just did an apt-get update + upgrade and restarted my rpi3 and openhab2 doesn’t come online fully.

The OH2 service is active if I check “systemctl status openhab2.service” but karaf doesn’t respond and neither does any of the guis at 192.168.x.x:8080.

Any advice on where I should start my trouble shooting?
I’m rather new to running both linux and openhab2 and this is a new problem to me.

Start by looking into the /var/log/openhab2/openhab.log file.

sudo su // switch to root
cd /var/log/openhab2 // change directory to the logging directory (optional)
systemctl stop openhab2.service // stop OH2
rm /var/log/openhab2/openhab.log // remove the existing log file
systemctl start openhab2.service // start OH2
tail -f /var/log/openhab2/openhab.log // monitor the log file for errors

Post here your findings :slight_smile:

Nice thank you Angelos. I wasn’t aware that you could tail the log outside of karaf. :slight_smile:

Now tailling the log didn’t give me a whole lot of extra info I’m afraid.
This is my log after starting the openhab2 service and the tailing the log:

2017-01-29 17:50:48.396 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'main_door_open.rules'
2017-01-29 17:50:48.794 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'brand_juvelias.rules'
2017-01-29 17:50:48.819 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'back_door_open.rules'
2017-01-29 17:50:48.854 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'brand_sovrum.rules'
2017-01-29 17:50:48.875 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'brand_hallen.rules'

Nothing more comes.
I added new rules yesterday. So to be safe I removed all the rules. Then restarted the openhab2 service.
The openhab log i now entirely empty.
ssh openhab@localhost -p 8101 gives me "connection refused"
systemctl status openhab2.service says the service is running.

Maybe I should wait until the next release comes? Maybe something went wrong in the latest one?

Does it give any other info (maybe a hint that something is wrong)?

root@homer:~# systemctl status openhab2.service 
● openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)
   Active: active (running) since Sun 2017-01-29 14:43:54 EET; 4h 45min ago
     Docs: http://docs.openhab.org
           https://community.openhab.org
  Process: 5190 ExecStop=/usr/share/openhab2/runtime/bin/stop (code=exited, status=1/FAILURE)
 Main PID: 5414 (karaf)
   CGroup: /system.slice/openhab2.service
           ├─5414 /bin/bash /usr/share/openhab2/runtime/bin/karaf server
           └─5587 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab.conf=/etc/openhab2 -Dopenhab.runtime=/usr/share/openhab2/runtime -...

Jan 29 14:43:54 homer systemd[1]: Started openHAB 2 - empowering the smart home.
Jan 29 14:43:54 homer start.sh[5414]: Launching the openHAB runtime...
root@homer:~# 

check also the output of java -version command.

Another way to deal with this could be: Backup your /etc/openhab2/ and /var/lib/openhab2 folders and then apt-get remove openhab2 followed by apt-get install openhab2 (to re-install it without losing your configs). This would be the last resort.

I updated my OH2 Snapshot recently and I didn’t have any problems (from the deb http://dl.bintray.com/openhab/apt-repo2 unstable main repository)

The status is similar to yours. No indications of anything wrong going on.

pi@Home:/var/log/openhab2 $ sudo systemctl status openhab2.service
● openhab2.service - openHAB 2 - empowering the smart home
   Loaded: loaded (/usr/lib/systemd/system/openhab2.service; enabled)
   Active: active (running) since Sun 2017-01-29 18:13:39 CET; 58min ago
     Docs: http://docs.openhab.org
           https://community.openhab.org
 Main PID: 525 (karaf)
   CGroup: /system.slice/openhab2.service
           ├─ 525 /bin/bash /usr/share/openhab2/runtime/bin/karaf server
           └─1038 /usr/bin/java -Dopenhab.home=/usr/share/openhab2 -Dopenhab....

Jan 29 18:13:39 SkyNetHome systemd[1]: Started openHAB 2 - empowering the s...e.
Jan 29 18:13:40 SkyNetHome start.sh[525]: Launching the openHAB runtime...
Hint: Some lines were ellipsized, use -l to show in full.
pi@Home:/var/log/openhab2 $

I’ll give a re-install a try and see if that changes anything.
Cheers Angelos

1 Like

Did the full re-install and it’s now working again. So strange! Luckily all settings were intact! :smiley:

1 Like

I had the same yesterday, stopped openhab using systemctl, cleaned up cache and tmp directories, and started again using systemctl - this fixed it for me. Perhaps (@maintainers) it might make sense to clean cache/tmp during updates as well ?

Nice, thanks for the advice Max. I’ll make a note of this until next time. :slight_smile:

Definitely yes - I would have thought the upgrade does this already. @Benjy & @theo: Can you comment?

It is indeed:

upgrade)
 removeCache() 
[...] 

removeCache(){
    rm -rf /var/lib/openhab2/cache || true
    rm -rf /var/lib/openhab2/tmp || true
}
1 Like

Just FTR:

I upgraded (apt-get installation) to the latest snapshot today (was on stable before). OH came back up after the update/upgrade, no need to clear any cache directories. Karaf access etc. are all working.

So no general problem. But @ErikAhl also got it working again I see.

Glad you have it working, I’m not sure what the difference would be, removal of cache and tmp folders has been an unchanged feature of the deb packages since well before it moved to it’s own Github repo (before B5).

Same here! After

apt-get update
apt-get upgrade
systemctl reboot

on my RPi OH2 does not start properly anymore (i.e. the webinterface is not running). There are no entries in the log files. After I had removed all files in /var/lib/openhab2/cache and /var/lib/openhab2/tmp, OH2 has started to work correctly again.

Hi, pretty sure I’ve followed all the instructions…but when i try the install i get the following:

sudo apt-get install openhab2
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
openhab2-offline
The following NEW packages will be installed:
openhab2
0 upgraded, 1 newly installed, 1 to remove and 2 not upgraded.
Need to get 53.2 MB of archives.
After this operation, 114 MB disk space will be freed.
Do you want to continue? [Y/n] Y
Err http://dl.bintray.com/openhab/apt-repo2/ unstable/main openhab2 all 2.1.0~20170212123642-1
404 Not Found
E: Failed to fetch http://dl.bintray.com/openhab/apt-repo2/pool/main/2.1.0~20170212123642/openhab2_2.1.0~20170212123642-1_all.deb 404 Not Found

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing

Any ideas?

The announcement in this thread has long been superseded. The latest snapshots (if this is what you want to install) have once again moved to another URL: The Linux snapshot installation repo has moved!

Everyone: To always find the latest installation instructions, please consult the official documentation. The following article will always be up to date:

http://docs.openhab.org/installation/linux.html#package-repository-installation

I’m going to close this thread.

4 Likes