{"action":"opened","issue":{"url":"https://api.github.com/repos/calimero-project/calimero-core/issues/37","repository_url":"https://api.github.com/repos/calimero-project/calimero-core","labels_url":"https://api.github.com/repos/calimero-project/calimero-core/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/calimero-project/calimero-core/issues/37/comments","events_url":"https://api.github.com/repos/calimero-project/calimero-core/issues/37/events","html_url":"https://github.com/calimero-project/calimero-core/issues/37","id":181677906,"number":37,"title":"Tunneling connection not possible if working with multiple networkinterfaces","user":{"login":"tuxedo0801","id":2862906,"avatar_url":"https://avatars.githubusercontent.com/u/2862906?v=3","gravatar_id":"","url":"https://api.github.com/users/tuxedo0801","html_url":"https://github.com/tuxedo0801","followers_url":"https://api.github.com/users/tuxedo0801/followers","following_url":"https://api.github.com/users/tuxedo0801/following{/other_user}","gists_url":"https://api.github.com/users/tuxedo0801/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxedo0801/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxedo0801/subscriptions","organizations_url":"https://api.github.com/users/tuxedo0801/orgs","repos_url":"https://api.github.com/users/tuxedo0801/repos","events_url":"https://api.github.com/users/tuxedo0801/events{/privacy}","received_events_url":"https://api.github.com/users/tuxedo0801/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-07T14:06:35Z","updated_at":"2016-10-07T14:06:35Z","closed_at":null,"body":"I possibly found another issue, that is possibly caused by the same trap as issue #36 :\r\n\r\nOne of our users is has configured our application to use an KNX IP Interface, so KNX IP Tunneling...\r\n\r\nThe application tries to connect, but fails with:\r\n\r\n> Caused by: tuwien.auto.calimero.exception.KNXTimeoutException: timeout connecting to control endpoint KNX-IPIF-800653.fritz.box/192.168.188.56:3671\r\n> \tat tuwien.auto.calimero.knxnetip.ClientConnection.connect(ClientConnection.java:188)\r\n> \tat tuwien.auto.calimero.knxnetip.KNXnetIPTunnel.<init>(KNXnetIPTunnel.java:131)\r\n> \tat tuwien.auto.calimero.link.KNXNetworkLinkIP.<init>(KNXNetworkLinkIP.java:142)\r\n> \tat tuwien.auto.calimero.link.KNXNetworkLinkIP.<init>(KNXNetworkLinkIP.java:180)\r\n> \tat de.root1.slicknx.Knx.<init>(Knx.java:301)\r\n> \t... 5 more\r\n\r\nI had a look at the code and found this:\r\n\r\nThe first UDP packet to connect to the KNX IP Tunneling Interface, is sent here:\r\n\r\nhttps://github.com/calimero-project/calimero-core/blob/master/src/tuwien/auto/calimero/knxnetip/ClientConnection.java#L158\r\n\r\nBut the \"answer-receiver\" is started a few lines later:\r\n\r\nhttps://github.com/calimero-project/calimero-core/blob/master/src/tuwien/auto/calimero/knxnetip/ClientConnection.java#L177\r\n\r\nSo, I guess there's also a gap where an answer might get lost, due to the not-yet started receiver.\r\n\r\nI asked the user to capture with wireshark to see if there is an response to the connect datagram.\r\n\r\nThe weird thing is: If he's changing the network interface metric from \"auto\" to \"1\", all is working well...?!\r\n\r\nAfter changing the metrik to 1, the routing table looks like:\r\n\r\n```\r\nIPv4-Routentabelle\r\n===========================================================================\r\nAktive Routen:\r\n     Netzwerkziel    Netzwerkmaske          Gateway    Schnittstelle Metrik\r\n          0.0.0.0          0.0.0.0    192.168.188.1   192.168.188.28      1     <--------- CHANGED METRIC TO 1\r\n        127.0.0.0        255.0.0.0   Auf Verbindung         127.0.0.1    331\r\n        127.0.0.1  255.255.255.255   Auf Verbindung         127.0.0.1    331\r\n  127.255.255.255  255.255.255.255   Auf Verbindung         127.0.0.1    331\r\n      169.254.0.0      255.255.0.0   Auf Verbindung   169.254.152.163    281\r\n  169.254.152.163  255.255.255.255   Auf Verbindung   169.254.152.163    281\r\n  169.254.255.255  255.255.255.255   Auf Verbindung   169.254.152.163    281\r\n      192.168.2.0    255.255.255.0   Auf Verbindung       192.168.2.1    291\r\n      192.168.2.1  255.255.255.255   Auf Verbindung       192.168.2.1    291\r\n    192.168.2.255  255.255.255.255   Auf Verbindung       192.168.2.1    291\r\n     192.168.56.0    255.255.255.0   Auf Verbindung      192.168.56.1    281\r\n     192.168.56.1  255.255.255.255   Auf Verbindung      192.168.56.1    281\r\n   192.168.56.255  255.255.255.255   Auf Verbindung      192.168.56.1    281\r\n     192.168.78.0    255.255.255.0   Auf Verbindung      192.168.78.1    291\r\n     192.168.78.1  255.255.255.255   Auf Verbindung      192.168.78.1    291\r\n   192.168.78.255  255.255.255.255   Auf Verbindung      192.168.78.1    291\r\n    192.168.188.0    255.255.255.0   Auf Verbindung    192.168.188.28    257    <----- DEFAULT ROUTE TO LAN\r\n   192.168.188.28  255.255.255.255   Auf Verbindung    192.168.188.28    257\r\n  192.168.188.255  255.255.255.255   Auf Verbindung    192.168.188.28    257\r\n        224.0.0.0        240.0.0.0   Auf Verbindung         127.0.0.1    331\r\n        224.0.0.0        240.0.0.0   Auf Verbindung    192.168.188.28    257\r\n        224.0.0.0        240.0.0.0   Auf Verbindung      192.168.56.1    281\r\n        224.0.0.0        240.0.0.0   Auf Verbindung      192.168.78.1    291\r\n        224.0.0.0        240.0.0.0   Auf Verbindung       192.168.2.1    291\r\n        224.0.0.0        240.0.0.0   Auf Verbindung   169.254.152.163    281\r\n  255.255.255.255  255.255.255.255   Auf Verbindung         127.0.0.1    331\r\n  255.255.255.255  255.255.255.255   Auf Verbindung    192.168.188.28    257\r\n  255.255.255.255  255.255.255.255   Auf Verbindung      192.168.56.1    281\r\n  255.255.255.255  255.255.255.255   Auf Verbindung      192.168.78.1    291\r\n  255.255.255.255  255.255.255.255   Auf Verbindung       192.168.2.1    291\r\n  255.255.255.255  255.255.255.255   Auf Verbindung   169.254.152.163    281\r\n===========================================================================\r\n```\r\n\r\nAnd this works quite well. Calimero is able to connect and KNX telegrams can be sent and received.\r\n\r\nWith the original \"auto\" metric, it's not working and giving the timeout error:\r\n\r\n```\r\nIPv4-Routentabelle\r\n===========================================================================\r\nAktive Routen:\r\n     Netzwerkziel    Netzwerkmaske          Gateway    Schnittstelle Metrik\r\n          0.0.0.0          0.0.0.0    192.168.188.1   192.168.188.28     25        <--------- USING WINDOWS AUTO METRIC\r\n        127.0.0.0        255.0.0.0   Auf Verbindung         127.0.0.1    331\r\n        127.0.0.1  255.255.255.255   Auf Verbindung         127.0.0.1    331\r\n  127.255.255.255  255.255.255.255   Auf Verbindung         127.0.0.1    331\r\n      169.254.0.0      255.255.0.0   Auf Verbindung   169.254.152.163    281\r\n  169.254.152.163  255.255.255.255   Auf Verbindung   169.254.152.163    281\r\n  169.254.255.255  255.255.255.255   Auf Verbindung   169.254.152.163    281\r\n      192.168.2.0    255.255.255.0   Auf Verbindung       192.168.2.1    291\r\n      192.168.2.1  255.255.255.255   Auf Verbindung       192.168.2.1    291\r\n    192.168.2.255  255.255.255.255   Auf Verbindung       192.168.2.1    291\r\n     192.168.56.0    255.255.255.0   Auf Verbindung      192.168.56.1    281\r\n     192.168.56.1  255.255.255.255   Auf Verbindung      192.168.56.1    281\r\n   192.168.56.255  255.255.255.255   Auf Verbindung      192.168.56.1    281\r\n     192.168.78.0    255.255.255.0   Auf Verbindung      192.168.78.1    291\r\n     192.168.78.1  255.255.255.255   Auf Verbindung      192.168.78.1    291\r\n   192.168.78.255  255.255.255.255   Auf Verbindung      192.168.78.1    291\r\n    192.168.188.0    255.255.255.0   Auf Verbindung    192.168.188.28    281     <----- DEFAULT ROUTE TO LAN\r\n   192.168.188.28  255.255.255.255   Auf Verbindung    192.168.188.28    281\r\n  192.168.188.255  255.255.255.255   Auf Verbindung    192.168.188.28    281\r\n        224.0.0.0        240.0.0.0   Auf Verbindung         127.0.0.1    331\r\n        224.0.0.0        240.0.0.0   Auf Verbindung    192.168.188.28    281\r\n        224.0.0.0        240.0.0.0   Auf Verbindung      192.168.56.1    281\r\n        224.0.0.0        240.0.0.0   Auf Verbindung      192.168.78.1    291\r\n        224.0.0.0        240.0.0.0   Auf Verbindung       192.168.2.1    291\r\n        224.0.0.0        240.0.0.0   Auf Verbindung   169.254.152.163    281\r\n  255.255.255.255  255.255.255.255   Auf Verbindung         127.0.0.1    331\r\n  255.255.255.255  255.255.255.255   Auf Verbindung    192.168.188.28    281\r\n  255.255.255.255  255.255.255.255   Auf Verbindung      192.168.56.1    281\r\n  255.255.255.255  255.255.255.255   Auf Verbindung      192.168.78.1    291\r\n  255.255.255.255  255.255.255.255   Auf Verbindung       192.168.2.1    291\r\n  255.255.255.255  255.255.255.255   Auf Verbindung   169.254.152.163    281\r\n===========================================================================\r\n```\r\n\r\nI'm confused ...\r\n\r\n1) Why is the receiver started AFTER the datagram has been sent?! --> GAP?\r\n2) Why does changing the metric to 1 help? java detects the correct interface by the target IP ...\r\n\r\nOf course, disabling all the other network interfaces (vpn, vmware, ...) also helps, but changing the metric or disabling network interfaces is not that user friendly...\r\n\r\nWould be great if someone could give me a hint."}}
{"actor":{"display_login":"tuxedo0801"}}