The good news is that I got my Pi connected on WiFi. It’s been running with no issues at all and I love OpenHAB once again
The downside is that I haven’t discovered the root cause. The only thing a did differently was to run across the hall to disconnect the ethernet cable the moment I issued the shudown command. In other words it connected fine to WiFi only on reboot without ethernet. I’m not sure if that was intended all along?
These are the exacts things I did:
Wrote image openhabian-ua-netinst-20161216-git52cc420 to SD card
Powered up, waited 45 mins + 15 to initialise itself - OK
Checked OpenHAB connected(ethernet) - OK
Checked samba connection to OPENHABIAN - OK
Connected SSH to the Pi on OPENHABIAN port 8080 - OK
Ran menu option 1. Update
Ran menu option 2. Basic Setup
Changed password
Changed time zone
Added WiFi credentials via menu option
Rebooted without ethernet
Voila!
If anything I hope that helps anyone who encounters the same thing.
I’m having the same hosts.key issue as @philKrylc
My system was working fine using an install from late December, but I decided to do a clean install with the new packages. Now I periodically see this in the log:
10:40:34.952 [WARN ] [.ssh.OpenSSHGeneratorFileKeyProvider] - Unable to read key /var/lib/openhab2/etc/host.key: org.apache.commons.ssl.ProbablyNotPKCS8Exception: asn1 parse failure: java.lang.IllegalArgumentException: DEREncodable must be one of: DERSequence, DERSet, DERTaggedObject
10:40:34.995 [ERROR] [.ssh.OpenSSHGeneratorFileKeyProvider] - Overwriting key (host.key) is disabled: using throwaway java.security.KeyPair@12928b
Log in to the Karaf remote console (Beware that you may need a few minutes on first try as the RPi needs some time) After you were successfully logged in check the logs again.
Delete hosts.key sudo rm /var/lib/openhab2/etc/host.key and restart openhab2. Does the error still show?
I had previously tried deleting host.key, but just did it again as a test. On the first reboot after doing that, there is the long pause when trying to start karafshell. In fact this time, it went so long that it timed out and reported a connection failure. I tried to connect again and it worked.
On the first start-up after deleting host.key, you just see the warning message above, without the error. The host.key file is re-generated, but with zero length, just like every time with the new install.
On the second start after deleting, you see both the warning and the error in the log.
One other key difference I’ve noticed.
In the past, when starting the built-in “karafshell” shortcut, it would be prompted for my sudo password, but not for the openhab password. With the new install, I’m prompted for the sudo password, then also the openhab password.
Seems like the error you are seeing has something to do with internal key generation. Would you please try to generate it yourself? This is what actually is planned to be done in the future while package installation.
Is the error still present? (I’m using such a key myself and do not see your error)
Wow, somebody is using this alias I’ve only mentioned it once or twice It is defined here and is with it’s internal use of “sudo” actually something I wanted to do exchange. Sooo, asking fo the sudo password is to be expected. The fact that client is now also asking for the password might be something that the change introduced. We might need to look into that. It’s not critical though.
I will create a ticket for all of this as soon as the problem and a solution are found. Prematurely mentioning @Kai and @Benjy here…
Using a self-generated key seems to avoid the error/warning. It also creates a valid 5k-byte file unlike the automatic system which creates a zero-length file.
I did “sudo bash” then pasted in your commands above, then had to “chown openhab:openhab host.key” to get the permissions right.
Even after that, I’m still prompted for both passwords by karafshell, so something has definitely changed there.