Timeout in Karaf console

Did you restart openHAB after the change?
I had the same issue, I modified the value and things are working as planned!

Yes, have both restarted openHAB and rebooted the host.

What build are you using?

2.2.0-SNAPSHOT
Build #1068

Just updated to Build #1070, and rebooted. Testing.

I believe that any OH 2.2.0 Snapshot Build above 1009 will not modify the behavior of the SSHd

S1009 upgraded the Karaf version from 4.0.8 to 4.1.2.
The SSHd is a part of the Karaf shell component and doesn’t get refreshed with the openHAB 2.2 Snapshots.

To get a newer version of the SSHd than the current 1.6.0, you would need to get a newer Karaf bundle upgrade from a future OH 2.2 snapshot release.

(or… you could try to manually deploy a newer version of the SSHd bundle :stuck_out_tongue: )

Another thing to try is:
/etc/openhab2/services/runtime.cfg

org.apache.karaf.shell:sshIdleTimeout = 0

Usually, stuff in the /var/lib/openhab2/etc/ folder get created from parameters that you set in the files contained in the /etc/openhab2/ folders

Since sshIdleTimeout = 1800000 is the default (30 mins)… even if you change this setting in the /var/lib/openhab2/etc/org.apache.karaf.shell.cfg file, the setting will most likely be overwritten with the default value after service restart.

Setting the time out in the /etc/openhab2/ area will make OH2 read that parameter and update both the running config as well as the /var/lib/ files.

openhab> config:list |grep sshIdleTimeout
   sshIdleTimeout = 0
2 Likes

by the way: I tested S1070 also and get the same but much faster than the 30 mins timeout…
I got busted with

17:03:45.946 [WARN ] [sshd.server.session.ServerSessionImpl] - exceptionCaught(ServerSessionImpl[openhab@/0:0:0:0:0:0:0:1:59771])[state=Opened] InterruptedByTimeoutException: null

after about 14mins of logging in via the local ssh shell and issuing log:tail

Exactly the same I’m getting. Clocked 11 minutes here now…

I’m having exactly same issue. 10-15minutes max.
Note that i tried all of the above without any success
Using 2.2.0-SNAPSHOT Build #1073

Did anyone report an issue for this? Can’t seem to find it amongst the ESH issues…

I haven’t (mainly because I don’t know how), feel free to.

Thanks

Ok, filed an issue here.

Seems this is an Karaf issue rather than an openHAB one. I’ve filed a new issue here.

3 Likes

…and today a Karaf developer has reproduced the issue and is on his way in fixing the problem! Wehey!

5 Likes

Great news. Thank you for taking the time to file the report and keep an eye on this.

All good things come to those who wait…

This is now fixed in Karaf master (https://github.com/apache/karaf/pull/440). I don’t know if this means openHAB needs to be upgraded to an upcoming version of Karaf (4.1.5/4.2.0) in order for this to be fixed for us? @Kai?

Yes, according to the issue, this fix will be in 4.1.5 and 4.2.0 onwards. I’d like to upgrade to 4.2.0 once it is out, but as @splatch pointed out, this might actually be a bumpy path, so let’s see…

2 Likes

Any update on this? This timeout is really annoying, lol.

Can we update just the Karaf without breaking things (assuming a new fixed version is available)?

A fix in Karaf has been pushed to the repo and merged.

https://issues.apache.org/jira/browse/KARAF-5473

Looks like this changes a default setting to keep the session alive. How can we change this setting without waiting for the upgrade to Karaf 4.2.0 in OpenHAB?