Since the upgrade to OH2.2 stable, I get the following error on a regular basis:
19:56:51.953 [WARN ] [knx.internal.connection.KNXConnection] - KNX link has been lost (reason: server request on object tunneling link link (closed) 192.168.0.7:3671 TP1 medium, device 0.0.0, hopcount 6)
I haven’t seen this error before - neither on OH1.8, 2.0 nor using the different OH2.2 snapshot releases.
During recent restarts of the OH service I realized that I need to wait some minutes before the KNX binding starts working. In addition, it helped sometimes to reboot. my pi.
Still, I see the entries of my orginal post regularly. But right after the closed connection message, I see in the log that my KNX items still get updated.
Did you both change something on the knx-config? In another thread the problem with the astro2-binding was solved by simply saving the astro.rules file anew (no changes made).
+1 Unfortunately I am encountering the same issue, which makes my openhab installation very unreliable
(I recently upgraded from 2.2 Snapshot to 2.2 stable - deleted cache, uninstalled, reinstalled : same old, same old…)
2017-12-24 10:46:10.829 [WARN ] [nx.internal.connection.KNXConnection] - KNX link has been lost (reason: server request on object tunneling link link (closed) 192.168.0.200:3671 TP1 medium, device 0.0.0, hopcount 6)
2017-12-24 10:46:10.879 [INFO ] [nx.internal.connection.KNXConnection] - KNX link will be retried in 30 seconds
2017-12-24 10:46:10.827 [INFO ] [nx.internal.connection.KNXConnection] - KNX link will be retried in 30 seconds
2017-12-24 10:46:10.826 [WARN ] [nx.internal.connection.KNXConnection] - KNX link has been lost (reason: server request on object tunneling link link (closed) 192.168.0.200:3671 TP1 medium, device 0.0.0, hopcount 6)
2017-12-24 10:46:10.881 [INFO ] [nx.internal.connection.KNXConnection] - KNX link will be retried in 30 seconds
2017-12-24 10:46:10.855 [WARN ] [nx.internal.connection.KNXConnection] - KNX link has been lost (reason: server request on object tunneling link link (closed) 192.168.0.200:3671 TP1 medium, device 0.0.0, hopcount 6)
2017-12-24 10:46:10.883 [INFO ] [nx.internal.connection.KNXConnection] - KNX link will be retried in 30 seconds
2017-12-24 10:46:10.942 [ERROR] [.binding.knx.internal.bus.KNXBinding] - Received detach Event.
2017-12-24 10:46:16.756 [WARN ] [eclipse.lsp4j.jsonrpc.RemoteEndpoint] - Unmatched cancel notification for request id 27
2017-12-24 10:46:48.466 [INFO ] [nx.internal.connection.KNXConnection] - Trying to (re-)connect to KNX...
2017-12-24 10:46:48.470 [INFO ] [nx.internal.connection.KNXConnection] - Trying to (re-)connect to KNX...
2017-12-24 10:46:48.469 [INFO ] [nx.internal.connection.KNXConnection] - Trying to (re-)connect to KNX...
2017-12-24 10:46:48.467 [INFO ] [nx.internal.connection.KNXConnection] - Trying to (re-)connect to KNX...
2017-12-24 10:46:48.631 [INFO ] [nx.internal.connection.KNXConnection] - Established connection to KNX bus on 192.168.0.200:3671 in mode TUNNEL.
2017-12-24 10:46:48.672 [INFO ] [nx.internal.connection.KNXConnection] - Connected to KNX
2017-12-24 10:46:48.740 [INFO ] [nx.internal.connection.KNXConnection] - Established connection to KNX bus on 192.168.0.200:3671 in mode TUNNEL.
2017-12-24 10:46:48.746 [INFO ] [nx.internal.connection.KNXConnection] - Connected to KNX
2017-12-24 10:46:48.809 [INFO ] [nx.internal.connection.KNXConnection] - Established connection to KNX bus on 192.168.0.200:3671 in mode TUNNEL.
2017-12-24 10:46:48.814 [INFO ] [nx.internal.connection.KNXConnection] - Connected to KNX
2017-12-24 10:46:48.890 [INFO ] [nx.internal.connection.KNXConnection] - Established connection to KNX bus on 192.168.0.200:3671 in mode TUNNEL.
2017-12-24 10:46:48.895 [INFO ] [nx.internal.connection.KNXConnection] - Connected to KNX
And I am working on a Weizierl IP Interface.
knx.config
# KNX gateway IP address
# (optional, if serialPort or connection type 'ROUTER' is specified)
ip=192.168.0.200
# Local KNX Binding bus address.
# Use it, when two or more openHAB Instances are connected to the same KNX bus.
# (optional, defaults to 0.0.0)
#busaddr=
# Ignore local KNX Events, prevents internal events coming from
# 'openHAB event bus' a second time to be sent back to the 'openHAB event bus'.
# Note: To send back events second time is a Bug, but for backward compatibility, the behavior is not changed.
# For new installations, its recommend to set "ignorelocalevents=true"
# (optional, defaults to false)
ignorelocalevents=true
# KNX IP connection type. Could be either TUNNEL or ROUTER (optional, defaults to TUNNEL)
# Note: If you cannot get the ROUTER mode working (even if it claims it is connected),
# use TUNNEL mode instead with setting both the ip of the KNX gateway and the localIp.
type=TUNNEL
# KNX gateway port (optional, defaults to 3671)
# Note: If you use eibd, setting to 6720
#port=
# Local endpoint to specify the multicast interface, no port is used (optional)
localIp=192.168.0.28
# Serial port of FT1.2 KNX interface (ignored, if ip is specified)
# Valid values are e.g. COM1 for Windows and /dev/ttyS0 or /dev/ttyUSB0 for Linux
#serialPort=
# Pause in milliseconds between two read requests on the KNX bus during
# initialization (optional, defaults to 50)
#pause=
# Timeout in milliseconds to wait for a response from the KNX bus (optional,
# defaults to 10000)
#timeout
# Number of read retries while initialization items from the KNX bus (optional,
# defaults to 3)
#readRetries
# Seconds between connect retries when KNX link has been lost
# 0 means never retry, it will only reconnect on next write or read request
# Note: without periodic retries all events will be lost up to the next read/write
# request
# (optional, default is 0)
autoReconnectPeriod=30
### Auto refresh feature
# Number of entries permissible in the item refresher queue.
# (optional, defaults to 10000)
#maxRefreshQueueEntries=
# Number of parallel threads for refreshing items. (optional, defaults to 5)
#numberOfThreads=
# Seconds to wait for an orderly shutdown of the auto refresher's
# ScheduledExecutorService. (optional, defaults to 5)
#scheduledExecutorServiceShutdownTimeoutString=
# Use NAT (Network Address Translation)
# (optional; defaults to false)
#useNAT=true
I’ve just realized that adding the KNX address value of my KNX IP Interface (1.3.25) to the line #busaddr) and un-commenting the line seems to solve the issue.
That’s strange, I use KNX with Weinzierl IP Interface (not the router!) with the exact same config (except I don’t have retry configured) even without a defined GA:
I come from 2.0 over 2.1 to 2.2 with that config…
last reboot:
2017-12-26 20:20:18.326 [INFO ] [nx.internal.connection.KNXConnection] - Established connection to KNX bus on 192.168.xx.xx:3671 in mode TUNNEL.
knx.cfg
# KNX gateway IP address
# (optional, if serialPort or connection type 'ROUTER' is specified)
ip=192.168.xx.xx
# Local KNX Binding bus address.
# Use it, when two or more openHAB Instances are connected to the same KNX bus.
# (optional, defaults to 0.0.0)
#busaddr=
# Ignore local KNX Events, prevents internal events coming from
# 'openHAB event bus' a second time to be sent back to the 'openHAB event bus'.
# Note: To send back events second time is a Bug, but for backward compatibility, the behavior is not changed.
# For new installations, its recommend to set "ignorelocalevents=true"
# (optional, defaults to false)
ignorelocalevents=true
# KNX IP connection type. Could be either TUNNEL or ROUTER (optional, defaults to TUNNEL)
# Note: If you cannot get the ROUTER mode working (even if it claims it is connected),
# use TUNNEL mode instead with setting both the ip of the KNX gateway and the localIp.
type=TUNNEL
# KNX gateway port (optional, defaults to 3671)
# Note: If you use eibd, setting to 6720
#port=
# Local endpoint to specify the multicast interface, no port is used (optional)
localIp=192.168.yy.yy
# Serial port of FT1.2 KNX interface (ignored, if ip is specified)
# Valid values are e.g. COM1 for Windows and /dev/ttyS0 or /dev/ttyUSB0 for Linux
#serialPort=
# Pause in milliseconds between two read requests on the KNX bus during
# initialization (optional, defaults to 50)
#pause=
# Timeout in milliseconds to wait for a response from the KNX bus (optional,
# defaults to 10000)
#timeout
# Number of read retries while initialization items from the KNX bus (optional,
# defaults to 3)
#readRetries
# Seconds between connect retries when KNX link has been lost
# 0 means never retry, it will only reconnect on next write or read request
# Note: without periodic retries all events will be lost up to the next read/write
# request
# (optional, default is 0)
#autoReconnectPeriod=30
### Auto refresh feature
# Number of entries permissible in the item refresher queue.
# (optional, defaults to 10000)
#maxRefreshQueueEntries=
# Number of parallel threads for refreshing items. (optional, defaults to 5)
#numberOfThreads=
# Seconds to wait for an orderly shutdown of the auto refresher's
# ScheduledExecutorService. (optional, defaults to 5)
#scheduledExecutorServiceShutdownTimeoutString=
# Use NAT (Network Address Translation)
# (optional; defaults to false)
#useNAT=true
I’m experiencing what most likely is a similar issue.
I have a KNX/IP interface configured in TUNNEL mode and I’m getting disconnection message in the log followed by an error message: see below:
2017-12-31 15:16:39.002 [WARN ] [nx.internal.connection.KNXConnection] - KNX link has been lost (reason: server request on object tunneling link link (closed) 192.168.x.xxx:3671 TP1 medium, device 0.0.0, hopcount 6)
2017-12-31 15:16:39.008 [ERROR] [.binding.knx.internal.bus.KNXBinding] - Received detach Event.
The issue is that after that disconnection it does not reconnect anymore until I send a comment to the KNX bus via the openhab interface.
Any connect event that occur during this period is lost in openhab. Openhab do not get update at all from the KNX bus. For example all temp update or vac status update are not received by openhab form the KNX bus
I did not ever experienced they issue before upgrading to OH2.2 and I did not changed any knx.cfg parameter
Any help will be very much appreciated
Thanks
Martin
Thank you for the suggestion, at this stage I did not reinstalled openhabian form scratch yet but I have installed the org.openhab.binding.knx-1.11.0-20171215.020930-47.jar binding instead of the one installed automatically when updated to OH2.2. Up to now 20 hours without the issue. Let’s see