Can't connect to Karaf console using ssh, "client" script or "openhab-cli console"
I run OpenHAB container like this:
docker run \
--name openhab \
--net=host \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v /opt/openhab/conf:/openhab/conf \
-v /opt/openhab/userdata:/openhab/userdata \
-v /opt/openhab/addons:/openhab/addons\
-d \
-e USER_ID=999 \
-e GROUP_ID=995 \
-e "EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Bratislava" \
--restart=always \
openhab/openhab:2.4.0-armhf-debian
I connect to console like this:
docker exec -it openhab /openhab/runtime/bin/client
But I always get:
Logging in as openhab
Session is being closed
I'm logged in as "pi" user if it matters. I tried using docker exec -it -u openhab... but didn't help.
OS version:
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
Docker version:
Client:
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:57:21 2018
OS/Arch: linux/arm
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.0
API version: 1.39 (minimum version 1.12)
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:17:57 2018
OS/Arch: linux/arm
Experimental: false
Did you wait until openHAB is fully started? On a Raspberry Pi that can take ~5-10 minutes.
@wborn sure, openHAB is running and is fully functional except the console.
@johnnypea Is this a openhab-docker problem? Or a openhab configuration problem?
Is this still an issue @johnnypea ? I sometimes see it too but it's then resolved after restarting the container. I just ran into it when using an APT installed openHAB in a Debian VM so I think it's more a Karaf than an openHAB (Docker) issue.
Since there was a community thread about this issue I've transferred it to openhab-distro.
Karaf 4.2.7 might improve this on Windows because client.bat was broken (KARAF-6257).