Knx bridge randomly detached and not reconnected

Dear all

Since lately my knx bridge disconnects sporadically. In the openhab.log I get following messages:

019-04-16 05:02:55.705 [INFO ] [.process.process 192.168.178.26:3671] - detached from 192.168.178.26:3671
2019-04-16 05:02:55.708 [INFO ] [calimero.link.192.168.178.26:3671   ] - link closed
2019-04-16 05:02:55.710 [INFO ] [o.device.process 192.168.178.26:3671] - detached from 192.168.178.26:3671
2019-04-16 05:02:55.713 [INFO ] [net/IP Tunneling 192.168.178.26:3671] - establish connection from /192.168.178.28:44593 to /192.168.178.26:3671
2019-04-16 05:02:55.743 [ERROR] [net/IP Tunneling 192.168.178.26:3671] - establishing connection failed, null

Has anybody an idea what the cause of this issue could be?

Any help would be highly appreciated.

Cheers
Rolf

Dear all

I did some further investigations (DEBUG mode). The last disconnect looked like that

2019-04-16 19:06:28.282 [DEBUG] [calimero.link.192.168.178.26:3671   ] - indication 1.1.24->8/4/20 L_Data.ind, low priority hop count 6, tpdu 00 80 42 f3 d1 eb
2019-04-16 19:06:28.296 [DEBUG] [net/IP Tunneling 192.168.178.26:3671] - skip tunneling request with rcv-seq 193 (already received)
2019-04-16 19:06:28.331 [INFO ] [net/IP Tunneling 192.168.178.26:3671] - close connection - server request
2019-04-16 19:06:28.370 [INFO ] [calimero.mgmt.TL 192.168.178.26:3671] - attached link was closed
2019-04-16 19:06:28.378 [INFO ] [calimero.mgmt.MC 192.168.178.26:3671] - attached link was closed
2019-04-16 19:06:28.382 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is disconnecting from the KNX bus
2019-04-16 19:06:28.390 [DEBUG] [calimero.mgmt.TL 192.168.178.26:3671] - detached from 192.168.178.26:3671
2019-04-16 19:06:28.391 [INFO ] [calimero.mgmt.TL 192.168.178.26:3671] - attached link was closed
2019-04-16 19:06:28.394 [INFO ] [calimero.mgmt.MC 192.168.178.26:3671] - attached link was closed
2019-04-16 19:06:28.392 [DEBUG] [calimero.mgmt.MC 192.168.178.26:3671] - detached from 192.168.178.26:3671
2019-04-16 19:06:28.397 [INFO ] [.process.process 192.168.178.26:3671] - attached link was closed
2019-04-16 19:06:28.399 [DEBUG] [calimero.mgmt.TL 192.168.178.26:3671] - detached from 192.168.178.26:3671
2019-04-16 19:06:28.401 [DEBUG] [calimero.mgmt.MC 192.168.178.26:3671] - detached from 192.168.178.26:3671
2019-04-16 19:06:28.402 [DEBUG] [nx.internal.client.AbstractKNXClient] - The KNX network link was detached from the process communicator
2019-04-16 19:06:28.409 [INFO ] [.process.process 192.168.178.26:3671] - detached from 192.168.178.26:3671
2019-04-16 19:06:28.412 [INFO ] [calimero.link.192.168.178.26:3671   ] - link closed
2019-04-16 19:06:28.421 [INFO ] [o.device.process 192.168.178.26:3671] - detached from 192.168.178.26:3671
2019-04-16 19:06:28.424 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is connecting to the KNX bus
2019-04-16 19:06:28.426 [DEBUG] [binding.knx.internal.client.IPClient] - Establishing connection to KNX bus on 192.168.178.26:3671 in mode TUNNEL.
2019-04-16 19:06:28.428 [INFO ] [net/IP Tunneling 192.168.178.26:3671] - establish connection from /192.168.178.28:51466 to /192.168.178.26:3671
2019-04-16 19:06:28.431 [DEBUG] [net/IP Tunneling 192.168.178.26:3671] - wait for connect response from /192.168.178.26:3671 ...
2019-04-16 19:06:28.440 [ERROR] [net/IP Tunneling 192.168.178.26:3671] - establishing connection failed, null
2019-04-16 19:06:28.442 [DEBUG] [nx.internal.client.AbstractKNXClient] - Error connecting to the bus: null
java.lang.InterruptedException: null
        at java.lang.Object.wait(Native Method) ~[?:?]
        at tuwien.auto.calimero.knxnetip.ConnectionBase.waitForStateChange(ConnectionBase.java:541) ~[?:?]
        at tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:190) ~[?:?]
        at tuwien.auto.calimero.knxnetip.ConnectionBase.waitForStateChange(ConnectionBase.java:541) ~[?:?]
        at tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:190) ~[?:?]
        at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.<init>(KNXnetIPTunnel.java:159) ~[?:?]
        at org.openhab.binding.knx.internal.client.IPClient.getConnection(IPClient.java:107) ~[?:?]
        at org.openhab.binding.knx.internal.client.IPClient.createKNXNetworkLinkIP(IPClient.java:90) ~[?:?]
        at org.openhab.binding.knx.internal.client.IPClient.establishConnection(IPClient.java:77) ~[?:?]
        at org.openhab.binding.knx.internal.client.AbstractKNXClient.connect(AbstractKNXClient.java:178) ~[?:?]
        at org.openhab.binding.knx.internal.client.AbstractKNXClient.connectIfNotAutomatic(AbstractKNXClient.java:164) ~[?:?]
        at org.openhab.binding.knx.internal.client.AbstractKNXClient.readNextQueuedDatapoint(AbstractKNXClient.java:272) ~[?:?]
        at org.openhab.binding.knx.internal.client.AbstractKNXClient.lambda$1(AbstractKNXClient.java:199) ~[?:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
        at java.lang.Thread.run(Thread.java:748) [?:?]
2019-04-16 19:06:28.481 [DEBUG] [nx.internal.client.AbstractKNXClient] - Bridge knx:ip:bridge is disconnecting from the KNX bus

My knx bridge config is:

Bridge knx:ip:bridge [ 
    ipAddress="192.168.178.26", 
    portNumber=3671,  
    type="TUNNEL", 
    readingPause=50, 
    responseTimeout=10, 
    readRetriesLimit=3, 
    autoReconnectPeriod=3,
    localSourceAddr="0.0.0"
]

The brigde goes OFFLINE and does not try to reconnect (although I have a autoReconnectPeriod=3), only reboot helps here to bring knx bridge online again. For information: In parallel the ETS is connected (I guess via a separate tunnel)

Does anybody has an idea what could be wrong here (@Udo_Hartmann: I have seen that you had some interesting comments in https://community.openhab.org/t/knx-binding-tunneling-request-with-invalid-rcv-seq-sporadic-dysfunction-help-needed/33946, where there were similar issues, maybe you have a hint)

Any help would be highly appreciated

Cheers
Rolf

Well, that was ages ago :slight_smile:
In fact, your configurations seems ok to me. I’m pretty sure that reconnect does not work at all, at least for some interfaces. I think knx2 is very damageable :expressionless:
On the other hand, my last reboot for openHAB2 (OH2.5, Build #1502) is 44 days ago, no knx crash…

Dear Udo,

Thanks a lot. So you would propose to move to OH2.5? I‘m running on the last OH2.4 stable version. Was so far a little bit reluctant to a „under testing“ version…

Thank you a lot for the support…

I have the same problem. If I shutdown the router, the connection to the knx bridge go offline and it don’t retry to connect to him despite the router is back up

Well, No. :wink: At least for now there is a big problem, that openHAB “nightly” is partially broken.
You can use OH2.5 M-1 (milestone) but I doubt that this will solve the problem.
In fact, I had sometimes twice a week a “knx-down-problem” (with this Build!).
But I’m still on OH1.8.0 with my productive system, my OH2.5 installation is still only a test.
There are several rules which I have to migrate, and as long as knx2 with openHAB2 is not as stable as knx1 with openHAB1, an upgrade will be some sort of “Move one step forward only to move two steps backwards”.

@Udo_Hartmann: thanks a lot for your response. However this is bad news, as it was quite some effort to move my stuff to knx2. I hopped to get a better system. For now, it does not seem so😢

BTW: on github https://github.com/openhab/openhab2-addons/issues/5281 this issue is discussed as well (especially also in the link to knx-forum.de mentioned be Lewie). I posted my observations there as well…

@Udo_Hartmann: one last question for the moment. Do you think it would make sense to put knxd between openhab and the IP-Interface. With that I could let openhab run in router mode. However, I think you already mentioned in knx-forum.de that there will also be some “ Fallstricke”.

As far as I know there is no difference in question of openHAB knx2

Hi Guys, not sure if this is in direct relation to this thread, but maybe someone can help me (again). I have a major issue (again) with the KNX connection.
Everything has been running flawless and to my full satisfaction since November. I did not change or even touch anything, but starting 3 days ago, there is some weird behavior of the KNX connection.
KNX link is lost aproximately every 5 minutes, before it becomes online again after flooding the log with errors for ~3 minutes.

Again, I did not change anything; I tried restarting OH2 (Raspberry), as well as all switches, Router, DHCP Server, KNX Gateway, … with no success.
No light when coming home at night, or lights staying on because OH doesn’t hear the “OFF” signal on the KNX bus; the system is not usable anymore… this is HAPPY EASTER.

Any idea what I can do? please help me ;(

A few lines from the log:

   2019-04-22 12:55:12.016 [hingStatusInfoChangedEvent] - 'knx:device:bridge:generic' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

    2019-04-22 12:55:12.024 [hingStatusInfoChangedEvent] - 'knx:device:bridge:lights' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

    2019-04-22 12:55:14.326 [vent.ItemStateChangedEvent] - N_BU_Temperatur changed from 21.3 to 21.400000000000002

    2019-04-22 12:55:14.431 [vent.ItemStateChangedEvent] - N_VH_Helligkeit changed from 754.5600000000001 to 780.16

    2019-04-22 12:57:59.228 [hingStatusInfoChangedEvent] - 'knx:ip:bridge' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): server request

    2019-04-22 12:57:59.250 [hingStatusInfoChangedEvent] - 'knx:device:bridge:lights' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

    2019-04-22 12:57:59.268 [hingStatusInfoChangedEvent] - 'knx:device:bridge:generic' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

    2019-04-22 12:57:59.274 [hingStatusInfoChangedEvent] - 'knx:ip:bridge' changed from OFFLINE (COMMUNICATION_ERROR): server request to ONLINE

    2019-04-22 12:57:59.280 [hingStatusInfoChangedEvent] - 'knx:device:bridge:generic' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

    2019-04-22 12:57:59.285 [hingStatusInfoChangedEvent] - 'knx:device:bridge:lights' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

    2019-04-22 12:58:00.419 [vent.ItemStateChangedEvent] - N_SZ_Temperatur changed from 21.2 to 21.1

    2019-04-22 12:58:01.716 [vent.ItemStateChangedEvent] - N_VH_Helligkeit changed from 780.16 to 733.44

    2019-04-22 12:58:01.869 [vent.ItemStateChangedEvent] - N_VH_Helligkeit changed from 733.44 to 734.08

    2019-04-22 12:58:12.428 [vent.ItemStateChangedEvent] - N_VH_Helligkeit changed from 734.08 to 721.92

    2019-04-22 12:58:17.703 [vent.ItemStateChangedEvent] - N_VH_Helligkeit changed from 721.92 to 734.08

    2019-04-22 12:59:10.502 [vent.ItemStateChangedEvent] - N_VH_Helligkeit changed from 734.08 to 719.36

    2019-04-22 12:59:52.738 [vent.ItemStateChangedEvent] - N_VH_Helligkeit changed from 719.36 to 708.48

    2019-04-22 13:00:29.699 [vent.ItemStateChangedEvent] - N_VH_Helligkeit changed from 708.48 to 697.6

    ==> /var/log/openhab2/openhab.log <==

    2019-04-22 13:03:19.248 [WARN ] [NXnet/IP Tunneling 192.168.0.22:3671] - connection state response: server could not find active data connection with specified ID (channel 43)

    2019-04-22 13:03:29.249 [WARN ] [NXnet/IP Tunneling 192.168.0.22:3671] - connection state response: server could not find active data connection with specified ID (channel 43)

    2019-04-22 13:03:39.249 [WARN ] [NXnet/IP Tunneling 192.168.0.22:3671] - connection state response: server could not find active data connection with specified ID (channel 43)

    2019-04-22 13:03:59.248 [WARN ] [NXnet/IP Tunneling 192.168.0.22:3671] - close connection - no heartbeat response

    2019-04-22 13:03:59.264 [ERROR] [NXnet/IP Tunneling 192.168.0.22:3671] - establishing connection failed, null

    ==> /var/log/openhab2/events.log <==

    2019-04-22 13:03:59.296 [hingStatusInfoChangedEvent] - 'knx:ip:bridge' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): no heartbeat response

    2019-04-22 13:03:59.317 [hingStatusInfoChangedEvent] - 'knx:device:bridge:lights' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

    2019-04-22 13:03:59.331 [hingStatusInfoChangedEvent] - 'knx:ip:bridge' changed from OFFLINE (COMMUNICATION_ERROR): no heartbeat response to OFFLINE (COMMUNICATION_ERROR)

    2019-04-22 13:03:59.335 [hingStatusInfoChangedEvent] - 'knx:device:bridge:generic' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

    2019-04-22 13:03:59.342 [hingStatusInfoChangedEvent] - 'knx:ip:bridge' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE

    2019-04-22 13:03:59.351 [hingStatusInfoChangedEvent] - 'knx:device:bridge:generic' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

    2019-04-22 13:03:59.357 [hingStatusInfoChangedEvent] - 'knx:device:bridge:lights' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

2019-04-22 13:04:23.459 [ERROR] [NXnet/IP Tunneling 192.168.0.22:3671] - close connection - maximum send attempts

tuwien.auto.calimero.KNXAckTimeoutException: maximum send attempts, no service acknowledgment received

	at tuwien.auto.calimero.knxnetip.ConnectionBase.send(ConnectionBase.java:250) ~[?:?]

	at tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.send(KNXnetIPTunnel.java:178) ~[?:?]

	at tuwien.auto.calimero.link.KNXNetworkLinkIP.onSend(KNXNetworkLinkIP.java:243) ~[?:?]

	at tuwien.auto.calimero.link.AbstractLink.send(AbstractLink.java:351) ~[?:?]

	at tuwien.auto.calimero.link.KNXNetworkLinkIP.sendRequestWait(KNXNetworkLinkIP.java:222) ~[?:?]

	at tuwien.auto.calimero.process.ProcessCommunicatorImpl.readFromGroup(ProcessCommunicatorImpl.java:418) ~[?:?]

	at tuwien.auto.calimero.process.ProcessCommunicatorImpl.read(ProcessCommunicatorImpl.java:346) ~[?:?]

	at org.openhab.binding.knx.internal.client.AbstractKNXClient.readNextQueuedDatapoint(AbstractKNXClient.java:284) ~[?:?]

	at org.openhab.binding.knx.internal.client.AbstractKNXClient.lambda$1(AbstractKNXClient.java:199) ~[?:?]

	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]

	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:?]

	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

==> /var/log/openhab2/events.log <==

2019-04-22 13:04:23.536 [hingStatusInfoChangedEvent] - 'knx:ip:bridge' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): maximum send attempts

2019-04-22 13:04:23.544 [hingStatusInfoChangedEvent] - 'knx:dev

knx.things:

Bridge knx:ip:bridge [
    ipAddress="192.168.0.22",
    portNumber=3671,
    localIp="192.168.0.18",
    type="TUNNEL",
    readingPause=50,
    responseTimeout=10,
    readRetriesLimit=3,
    autoReconnectPeriod=1,
    localSourceAddr="1.1.54"
] {
    Thing device generic {
        Type switch         : VH_Licht          "Light"     [ ga="1/1/11" ]
        Type switch         : VH_Downlights     "Light"     [ ga="1/1/10" ]
        Type switch         : TR_Downlights     "Light"     [ ga="1/1/12" ]
        Type switch         : TR_Orientierung   "Light"     [ ga="1/1/13" ]
        Type switch         : VH_DL_Sperren   	"Light"     [ ga="1/1/15" ]
        Type switch         : OUT_LichtBalk     "Light"     [ ga="1/1/81" ]
        Type switch         : OUT_SteckdBalk    "Light"     [ ga="1/1/82" ]
        Type switch         : OUT_FluterN       "Light"     [ ga="1/1/83" ]
        Type switch         : OUT_FluterS       "Light"     [ ga="1/1/84" ]
        Type switch         : WC_Spot           "Light"     [ ga="1/2/10" ]
        Type switch         : WC_Led            "Light"     [ ga="1/2/11" ]
        Type switch         : BA_AllesAus       "Light"     [ ga="1/3/25" ]
        Type switch         : BA_Dusche         "Light"     [ ga="1/3/41" ]
        Type switch         : SZ_Multimedia     "Light"     [ ga="1/4/40" ]
        Type switch         : WZ_Led            "Light"     [ ga="1/5/15" ]
        Type switch         : WZ_AllesAus       "Light"     [ ga="1/5/25" ]
        Type switch         : WZ_Multimedia     "Light"     [ ga="1/5/40" ]
        Type switch         : BU_Multimedia     "Light"     [ ga="1/6/40" ]
        Type switch         : ZF_NT12V          "Light"     [ ga="1/7/1" ]
        Type number         : BA_Temperatur     "Temperature" [ ga="9.001:<1/3/50"]
        Type number         : SZ_Temperatur     "Temperature" [ ga="9.001:<1/4/50"]
        Type number         : WZ_Temperatur     "Temperature" [ ga="9.001:<1/5/50"]
        Type number         : BU_Temperatur     "Temperature" [ ga="9.001:<1/6/50"]
        Type number         : VH_Helligkeit     "incline"     [ ga="<1/7/55"]
        Type switch         : VH_Helligkeitsschw              [ ga="1/7/56" ]
        Type switch         : ZF_Anwesend_HIGH              [ ga="1/7/72" ]
        Type switch         : ZF_Abwesend_HIGH              [ ga="1/7/70" ]
    }
    
    Thing device lights {
    	Type switch         : BA_Spiegelleuchte   "Light"     [ ga="1/2/40" ]
    	Type switch         : BA_Spot		      "Light"     [ ga="1/3/10" ]
    	Type switch         : BA_Downlight	      "Light"     [ ga="1/3/11" ]
    	Type switch         : SZ_Spot		      "Light"     [ ga="1/4/11" ]
    	Type switch         : SZ_Downligt	      "Light"     [ ga="1/4/10" ]
    	Type switch         : WZ_Downlights       "Light"     [ ga="1/5/10" ]
    	Type switch         : WZ_Licht_Essen      "Light"     [ ga="1/5/11" ]
    	Type switch         : WZ_Spot_Zange       "Light"     [ ga="1/5/12" ]
    	Type switch         : WZ_DSchiene         "Light"     [ ga="1/5/13" ]
    	Type switch         : BU_Licht            "Light"     [ ga="1/6/10" ]
    }
}

openHAB 2.4.0-1 (Release Build)

Hi There.
Nevermind my last post - after further investigation it turned out that one of my ethernet switches seems to be defective. Ping to the MDT KNX IP Router (BTW anyway used in Tunnel mode in my case) brought ~75% package loss. Connected it to another switch and everything works like a charm again.

In other words I can only tell you that the above mentioned version of OH2, together with the official KNX2 binding it came along with at that times, has been working pretty stable in my productive environment on a RaspberryPi since November 2018 +/-. Not sure if this is of any help for anyone who might read this.

have a good day!

@Udo_Hartmann: i guess i will have to set up my system from scratch (i suspect that also sd card makes problem, i.e. is at end of life cycle).

In this context i think to remember one of your comments that you have configured your system fully on a file basis (among others in order to make a fresh set-up easier) In my case i fully configured the things, items and .cfg files (where still necessary) via files.

Now to my question: is there anything else what could be configured via files e.g. habpanel (to my understanding not possible to configure via file), but also runtime.cfg, addons.cfg etc.

Idee would be to just throw these files after installation via openhabian into the respective folders

Thanks a lot in advance for some ideas on that

Cheers
Rolf

Jep, my configuration is fully text based.

There are afaik two things which can’t be simply configured via text files, that is habpanel and zwave.

@Udo_Hartmann
Fresh set-up was unexpectedly easy. Basically I just reinserted my config files to /etc/openhab2/ on the freshly set-up System
With habpanel I did something similar just with the file habpanel.config in the folder /var/lib/openhab2/config/org/openhab/.

I know there is a back/restore function from OH 2.2 onwards. But I wanted only the things have migrated which I textually configured (I have no clue anymore what I did overtime in paperui)