openHABian hassle-free openHAB Setup

While the initial setup a lot of things are done. I can not vouch for a full openhabian setup on your system from where you are starting. If you really want to work with the 2GB card (imho not worth it) you can however continue as you did. The important steps can be executed through the first few menu entries. Start with Update and then continue. Good luck!

To not have to deal with this and in order to avoid possible problems, my personal approach would be to buy an SD card and be done with it.
16GB is what I would recommend to remarkably reduce wear / increase the chance that your data does not get corrupted.

Perhaps you can point me to the problem:

After about one day the ssh-connection isn’t working anymore. I was connected and then all commands like nano, ls, cp etc were replied by “command not found”. OpenHAB webinterfaces still work as expected. This was the second time now. As I don’t have a display at the raspberry I can’t tell what’s on the console :frowning:

EDIT: Now there is no ssh working anymore even after hard reboot by power cable. OpenHAB still starts expected :frowning:

Okay I’ll try to “point you to your problem” :slight_smile:
Your description is very awkward. Sounds to me like the problem is actually something different. If your system does not respond on an SSH connection, that’s normally the sign for a boot or network problem - in other words I never encountered problems with openssh itself. The fact that your openHAB is still responding disproves that…

Did you do any changes to the system recently? Change something for the pi user, change settings in sshd.conf, add firewall rules, change your surrounding infrastructure?

Is samba still working? Maybe this problem is the first sign of a corrupt sd card --> random parts of your system are not functional anymore… Because of that possibility I would recommend to do a backup of your system before anything else. Your best way for that is to use Win32DiskImager (if you are on Windows).

If i was writing something wrong with “point to” sorry … i’m german and trying to do my best in english :slight_smile:

Didn’t change anything other than installing and migrating to your system 2 days ago :slight_smile:

Samba isn’t working anymore too. I’ll try a new sd-card today. Perhaps this will fix

First time user here. Just started freshly with the openHABian image you provided. Looks like almost everything worked but Java8 seems to be broken, right?

[openHABian] Installing Oracle Java 8 from Web Upd8 repository...
$ apt -y install oracle-java8-installer
Reading package lists... Done
Building dependency tree
Reading state information... Done
oracle-java8-installer is already the newest version.
oracle-java8-installer set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up oracle-java8-installer (8u111+8u111arm-1~webupd8~0) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2016-11-10 13:41:53--  http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-arm32-vfp-hflt.tar.gz
Resolving download.oracle.com (download.oracle.com)... 109.193.192.24, 109.193.192.19
Connecting to download.oracle.com (download.oracle.com)|109.193.192.24|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-arm32-vfp-hflt.tar.gz [following]
--2016-11-10 13:41:53--  https://edelivery.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-arm32-vfp-hflt.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.84.166.125, 2a02:26f0:136:290::2d3e, 2a02:26f0:136:2a0::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.84.166.125|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://www.oracle.com/splash/edelivery/index.html [following]
--2016-11-10 13:41:53--  https://www.oracle.com/splash/edelivery/index.html
Resolving www.oracle.com (www.oracle.com)... 104.84.166.125, 2a02:26f0:136:2a0::2d3e, 2a02:26f0:136:290::2d3e
Connecting to www.oracle.com (www.oracle.com)|104.84.166.125|:443... connected.
HTTP request sent, awaiting response... 503 Service Unavailable
2016-11-10 13:41:53 ERROR 503: Service Unavailable.

download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of oracle-java8-set-default:
 oracle-java8-set-default depends on oracle-java8-installer; however:
  Package oracle-java8-installer is not configured yet.

dpkg: error processing package oracle-java8-set-default (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 oracle-java8-installer
 oracle-java8-set-default
Updating FireMotD available updates count ...
E: Sub-process /usr/bin/dpkg returned an error code (1)
FAILED
[13:42:23] pi@openHABianPi:~$ sudo openhabian-config
[openHABian] Checking for root privileges... OK
[openHABian] Updating myself... Already on 'master'
Your branch is up-to-date with 'origin/master'.
OK - No remote changes detected. You are up to date!

[openHABian] Updating myself... Already on 'master'
Your branch is up-to-date with 'origin/master'.
OK - No remote changes detected. You are up to date!


Bye Bye! :

)

I just selected the “Java 8” menu entry and everything went just fine. This looks like a short term temporary problem with either the server or your internet connection:

   2016-11-10 13:41:53 ERROR 503: Service Unavailable.

Easiest solution: Restart the installation

Maybe it went fine because you already have it installed. I am locate din Germany and if I point Firefox to

http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-arm32-vfp-hflt.tar.gz

then I get this:

Sounds rather like the source has changed???

I’m in Germany as well. I’m confronted with the same error message but that’s not the problem.
We are using webupd8team’s Java 8 installer and this one takes care of whatever steps are needed.
https://launchpad.net/~webupd8team/+archive/ubuntu/java

Did you try to just reinstall Java through the menu?

Yes it simply doesn’t work. Download failed. 503 Moved temporarily:

Okay, never experienced anything similar. Possibly a problem with your locale/timezone settings or the DNS server used in your network. Just try flashing the image again, hopefully it will work a second time. if you by any chance did that before, do not change installer-config.txt.

Will be able to try&report back tomorrow again. Thx in advance

The issue has been resolved by Oracle. It seems they fixed the links because I can download the JDK packages within Firefox, too. I started from scratch now again anyways and flashed the image onto my sdcard.

While trying to install Grafana / Influxdb from menu (opened with sudo):

Everyone,
please pay close attention to

Do not upgrade 2016-11-11

I want to emphasize, that apt upgrade is currently in fact breaking your openHAB system.
This is a short time error which will probably be solved soon.
Please stay clear from upgrading for a couple of days.

A fresh openHABian installation will also be unable to start openHAB.
In all cases this is only a temporary problem and you will be able to apt upgrade to the soon to be released working release.

Update - Fix available 2016-11-13

A solution is available.

  • New installations are no problem anymore.
  • Users who did an upgrade in between and are desperately waiting for an upgrade: Do it now! sudo apt update && sudo apt -y upgrade
  • Users still on a previous build, you may also update now.

Everyone: There might still be smaller problems. If you are on a stable setup right now, it wouldn’t hurt to wait for a few more days for things to settle…

If you have all or most settings for your system in the configuration folder under /etc/openhab2/ it’s also a good idea to do a clean reinstallation:

# Make backup
cp -arp /etc/openhab2 /home/pi/openhab2-conf-bak

# Remove and reinstall openHAB
sudo apt update
sudo apt purge openhab2-offline
sudo apt install openhab2-offline

# Restore Backup
#sudo rm -rf /etc/openhab2
sudo cp -arp /home/pi/openhab2-conf-bak /etc/openhab2
sudo systemctl restart openhab2.service

Additional openHABian step: You will see this error:

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.

1 Like

This also affects a clean install.
It results in a broken OH2 Installation

But this post might show a solution:

Yes, I have tested this on a openHABian install and it should do the trick for now, for clarity:

cp /usr/share/openhab2/runtime/karaf/etc/* /var/lib/openhab2/etc/

sudo sed -i -e 's|/usr/share/openhab2/runtime/karaf/bin/|/usr/share/openhab2/runtime/bin/|g' /etc/init.d/openhab2 /usr/lib/systemd/system/openhab2.service
sudo sed -i -e 's|OPENHAB_USERDATA="${OPENHAB_HOME}/userdata"|OPENHAB_USERDATA="/var/lib/openhab2"|g' /usr/share/openhab2/runtime/bin/oh2_dir_layout
sudo sed -i -e 's|OPENHAB_CONF="${OPENHAB_HOME}/conf"|OPENHAB_CONF="/etc/openhab2"|g' /usr/share/openhab2/runtime/bin/oh2_dir_layout
sudo sed -i -e 's|OPENHAB_LOGDIR="${OPENHAB_USERDATA}/logs"|OPENHAB_LOGDIR="/var/log/openhab2"|g' /usr/share/openhab2/runtime/bin/oh2_dir_layout

sudo systemctl daemon-reload
sudo service openhab2 start
2 Likes

Thank Benjy, running the above worked for me, however as per the comment from ThomDietrich, dont upgrade at the moment.

I needed to do a fresh install this morning and didn’t think to look at the site first.

Hi,
saw this too late - and made an update today.
Now I can’t start the Karaf console anymore. I get:
ssh: connect to host localhost port 8101: Connection refused

Could this have the same cause?

After doing the changes mentioned by Benjy, it should work again. You might need to restart openHAB once or twice to kickstart the reinitialization.