This page last changed on Jun 21, 2014 by jlevy.

Hi,

Running OR on Raspberry Pi - hard float, Java 1.8.

Sometimes everything is OK - I run and can control KNX fine. Then, when I let my iphone shutdown or if I just wait a while, I get many Disconnect Failed exceptions. I then stop and start OR again and mostly it does NOT return to working order.

BTW - I get Exception on VeraClient initon startup. On shutdown I get a huge amount of exceptions.

I am desperate - I want to use OR but this reliability issue is killing me.

Please assist. I have posted the KNX log. I don't know why it thinks there's no KNX connection. Note that I've configured the gateway IP in the conf file (before then it wouldn't work at all).

Thanks,
Yosi.

KNX Log


knx.log.txt (text/plain)
knx.log.txt (text/plain)

Just saw http://www.openremote.org/display/forums/*RESOLVED*+-+KNX+interface,+dropping+connection

This is the same symptom that I'm having - the socket gets closed. But I'm using MDT SCN-IP000.01 which is the formal OR supported interfaces and I'm not using eibnetmux as far as I know... Just plain OR.

Any help would be much appreciated. Maybe this is fixed and I need a new build?

Thanks.

Posted by jlevy at Jun 22, 2014 04:24

BTW everything works perfectly and stable when controller is on Win7 + Java 1.7. I'm guessing I should get a copy of Wheezy soft float + install Java 1.7...

Posted by jlevy at Jun 22, 2014 18:37

What KNX gateway do you use? It could be that you need to power off the gateway or wait 10 minutes or so until the gateway releases old connections. Also, if your gateway only supports one connection at a time that can cause problems if you use ETS or connect with something else before starting OR.

Posted by mredeker at Jun 22, 2014 19:14

Hi Marcus,

Thanks for your reply. I'm using MDT SCN-IP000.01. As I said - it works perfectly when OR controller runs on Win7 with Java 1.7.0_55. On the raspberry I have 1.8 and it's hard float.

The disconnect failed happens when I try to connect. Did you see the logs?

Thank you!

Posted by jlevy at Jun 22, 2014 19:42

Then I would also assume it's related to the Pi.

Posted by mredeker at Jun 22, 2014 19:48

So what do you recommend? Java 1.6 on soft float?

Posted by jlevy at Jun 22, 2014 19:49

Does it work if you start everything from scratch? Power off IP gateway and PI. Power on gateway (without anything else trying to connect to KNX) start Pi?
Does that work and errors occur only after a while or do you already receive errors when starting?

Posted by mredeker at Jun 22, 2014 20:02

WOW!!! I restarted the IP gateway (actually the whole bus) and the Pi and it works! Looks good but I need to give it some more time. So this means every time I use ETS it will disconnect and require a full bus restart? What is the reason? Anything I can do?

Posted by jlevy at Jun 22, 2014 20:24

Was happy too soon. Now I restarted app on iphone, clicking a button and I get "Service failed".

Posted by jlevy at Jun 22, 2014 20:26

Anything in the logs now?

Posted by mredeker at Jun 22, 2014 20:28

A little different but same socket stuff.

Now with the log:
KNX log 2

Posted by jlevy at Jun 22, 2014 20:31

No idea. Maybe you can try the other Java.

Posted by mredeker at Jun 22, 2014 20:48

I will. Hopefully tomorrow. Not sure how to install the OS without NOOBS.

Posted by jlevy at Jun 22, 2014 20:50

Moved to soft float, Java SE Embedded 1.6 - same problems. Socket gets closed. I'm going crazy.

Does anyone have a working raspberry pi image with KNX just so I can check to see if it's the PI hardware...
Does anyone have any idea how to check the PI nic?

Posted by jlevy at Jun 23, 2014 18:53

Turns out there was a duplicate IP causing this but this was not detectable until I used WireShark. Now everything seems stable although I do get a Socket Closed error on load. But then everything stays stable.

Marcus - do you know the reason for this initial Socket Closed Error? It happens a few milliseconds after the KNX connection is reported as connected...

Posted by jlevy at Jun 25, 2014 06:47

Do you have something in logs?

Posted by mredeker at Jun 25, 2014 09:04

Yes. See below. After the last line it stayed stable for 3 hours and then it actually happened again and it seems that the process crashed. Could it be because the terminal session I ran openremote was closed (it was closed a few hours before the crash occured).

BTW with all the tries I ended up with Java 1.7. Planning on re-installing the PI to soft float + Java 1.6.

INFO 2014-06-25 03:17:31,116 (KNX): KNX IP interface hostname set to '192.168.1.50'
INFO 2014-06-25 03:17:31,118 (KNX): KNX IP interface port set to '3671'
INFO 2014-06-25 03:17:31,120 (KNX): KNX PhysicalBus clazz set to 'org.openremote.controller.protocol.port.DatagramSocketPort'
INFO 2014-06-25 03:17:31,134 (KNX): Scheduled reconnection task
INFO 2014-06-25 03:17:31,138 (KNX): Trying to create connection
INFO 2014-06-25 03:17:31,144 (KNX): Removing connection
WARN 2014-06-25 03:17:31,147 (KNX): Unknown KNX property '<property name = "name" value = "B4-N KITCHEN CENTER LIGHT ST"/>'.
INFO 2014-06-25 03:17:31,168 (KNX): KNX Connection manager resolving local host IP addresses...
INFO 2014-06-25 03:17:31,175 (KNX): Found candidate NIC: name:eth0 (eth0)
INFO 2014-06-25 03:17:31,189 (KNX): Added candidate IP address to set - /192.168.1.5
INFO 2014-06-25 03:17:31,191 (KNX): Skipping loopback interface: name:lo (lo)
INFO 2014-06-25 03:17:31,663 (KNX): Created KNX Command FRAME L_Data.req 0.0.0 -> 0/0/123 Data: 0x00 for group address '0/0/123'
INFO 2014-06-25 03:17:31,749 (KNX): Found a KNX IP interface at /192.168.1.50:3671
INFO 2014-06-25 03:17:31,904 (KNX): Connection created for KNX IP interface at /192.168.1.50:3671
INFO 2014-06-25 03:17:31,993 (KNX): Notified with KNX interface status = connected
INFO 2014-06-25 03:17:31,995 (KNX): Connected to KNX-IP interface /192.168.1.50:3671
INFO 2014-06-25 03:17:32,008 (KNX): KNX-IP socket listener IOException
java.net.SocketException: Socket closed
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:145)
at java.net.DatagramSocket.receive(DatagramSocket.java:786)
at org.openremote.controller.protocol.port.DatagramSocketPort.receive(DatagramSocketPort.java:78)
at org.openremote.controller.protocol.knx.ip.IpProcessor$PhysicalBusListener.run(IpProcessor.java:82)
WARN 2014-06-25 03:17:32,012 (KNX): KNX-IP socket listener stopped
INFO 2014-06-25 03:17:32,015 (KNX): Stopping connection timer
WARN 2014-06-25 03:17:32,083 (KNX): Unknown KNX property '<property name = "name" value = "D1-D LIVING ROOM DIMMER ST"/>'.
INFO 2014-06-25 03:17:32,085 (KNX): Created KNX Command FRAME L_Data.req 0.0.0 -> 0/0/135 Data: 0x00 for group address '0/0/135'

.. stable and then all of a sudden:

WARN 2014-06-25 03:19:17,596 (KNX): Unknown KNX property '<property name = "name" value = "B4-N KITCHEN CENTER LIGHT (OFF)"/>'.
INFO 2014-06-25 03:19:17,597 (KNX): Created KNX Command FRAME L_Data.req 0.0.0 -> 0/0/122 Data: 0x00 for group address '0/0/122'
INFO 2014-06-25 05:28:56,799 (KNX): KNX-IP socket listener IOException
java.net.SocketException: Socket closed
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:145)
at java.net.DatagramSocket.receive(DatagramSocket.java:786)
at org.openremote.controller.protocol.port.DatagramSocketPort.receive(DatagramSocketPort.java:78)
at org.openremote.controller.protocol.knx.ip.IpProcessor$PhysicalBusListener.run(IpProcessor.java:82)
WARN 2014-06-25 05:28:56,806 (KNX): KNX-IP socket listener stopped
INFO 2014-06-25 05:28:56,807 (KNX): Notified with KNX interface status = disconnected
INFO 2014-06-25 05:28:56,810 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:56,818 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:56,827 (KNX): Scheduled reconnection task
INFO 2014-06-25 05:28:56,828 (KNX): Disconnected gracefully from /192.168.1.50:3671
INFO 2014-06-25 05:28:56,831 (KNX): Notified with KNX interface status = disconnected
INFO 2014-06-25 05:28:56,832 (KNX): Trying to create connection
INFO 2014-06-25 05:28:56,833 (KNX): Removing connection
INFO 2014-06-25 05:28:56,876 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:56,893 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:56,907 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:56,909 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:56,922 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:56,925 (KNX): Notified with KNX interface status = disconnected
ERROR 2014-06-25 05:28:56,927 (KNX): Disconnect failed
org.openremote.controller.protocol.knx.ip.KnxIpException: Disconnect failed
at org.openremote.controller.protocol.knx.ip.IpTunnelClient.disconnect(IpTunnelClient.java:147)
at org.openremote.controller.protocol.knx.KNXIpConnectionManager$KNXConnectionImpl.stop(KNXIpConnectionManager.java:819)
at org.openremote.controller.protocol.knx.KNXIpConnectionManager$KNXConnectionImpl.access$000(KNXIpConnectionManager.java:637)
at org.openremote.controller.protocol.knx.KNXIpConnectionManager.stop(KNXIpConnectionManager.java:210)
at org.openremote.controller.protocol.knx.KNXIpConnectionManager$ConnectionTask.removeConnection(KNXIpConnectionManager.java:1004)
at org.openremote.controller.protocol.knx.KNXIpConnectionManager$ConnectionTask.run(KNXIpConnectionManager.java:991)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
INFO 2014-06-25 05:28:56,931 (KNX): KNX Connection manager resolving local host IP addresses...
INFO 2014-06-25 05:28:56,933 (KNX): Found candidate NIC: name:eth0 (eth0)
INFO 2014-06-25 05:28:56,933 (KNX): Added candidate IP address to set - /192.168.1.5
INFO 2014-06-25 05:28:56,934 (KNX): Skipping loopback interface: name:lo (lo)
INFO 2014-06-25 05:28:56,946 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:56,952 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:57,028 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:57,031 (KNX): Found a KNX IP interface at /192.168.1.50:3671
INFO 2014-06-25 05:28:57,034 (KNX): Connection created for KNX IP interface at /192.168.1.50:3671
INFO 2014-06-25 05:28:57,035 (KNX): KNX connection not available.
INFO 2014-06-25 05:28:57,037 (KNX): KNX connection not available.

(Probably here it crashed since it stopped logging anything...)

Posted by jlevy at Jun 25, 2014 21:08

I can't say why the connection closed after runnin stable for a while.
But since it was not closed properly the KNX gateway did not release the connection correct which causes the "KNX connection not available". The KNX gateways always take a few minutes until they alow a new connection unless you power it off and on.

Posted by mredeker at Jun 25, 2014 21:43
Document generated by Confluence on Jun 05, 2016 09:37