Help with ERROR TCPConvergenceLayer: bind failed
Hi,
We are testing IBR-DTN for OpenWrt with 2 wireless devices, but we are getting an error we do not know how to solve.
First, we did not get any errors while installing IBR-DTN. Then, we created the wi-fi channel on both devices and pinged (normal ping command) the wireless interfaces and this worked, they were communicating both ways. We then launched the daemon on these wireless interfaces (following the tutorial: https://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn/wiki/ibr-dtn-tut) but we got the same error on both devices:
root@VeniamWorks666:~# dtnd -i wlan2 Thu Jan 1 01:27:36 1970 INFO Configuration: Using default settings. Call with --help for options. Thu Jan 1 01:27:36 1970 INFO NativeDaemon: IBR-DTN daemon 0.10.2 (build 1d89427) Thu Jan 1 01:27:36 1970 INFO Configuration: Using default settings. Call with --help for options. Thu Jan 1 01:27:36 1970 INFO BundleCore: Local node name: dtn://VeniamWorks666 Thu Jan 1 01:27:36 1970 INFO BundleCore: Forwarding of bundles enabled. Thu Jan 1 01:27:36 1970 INFO NativeDaemon: using bundle storage in memory-only mode Thu Jan 1 01:27:36 1970 WARNING DTNTPWorker: The local clock seems to be wrong. Expiration disabled. Thu Jan 1 01:27:36 1970 INFO NativeDaemon: API initialized using tcp socket: loopback:4550 Thu Jan 1 01:27:36 1970 INFO NativeDaemon: TCP ConvergenceLayer added on wlan2:4556 Thu Jan 1 01:27:36 1970 INFO DiscoveryAgent: listen to [ff02::142]:4551 Thu Jan 1 01:27:36 1970 INFO DiscoveryAgent: listen to [224.0.0.142]:4551 Thu Jan 1 01:27:36 1970 INFO DiscoveryAgent: add interface wlan2 Thu Jan 1 01:27:36 1970 ERROR TCPConvergenceLayer: bind failed (Die addr_len war falsch oder der Socket gehrte nicht zur AF_UNIX Familie.) Thu Jan 1 01:27:36 1970 ERROR IPNDAgent: Die addr_len war falsch oder der Socket gehrte nicht zur AF_UNIX Familie. Thu Jan 1 01:27:36 1970 INFO NativeDaemon: Using default routing extens
When we tried running the daemon with no interface specified we did not get this error (although we did not succeed in "dtnpinging" either). With interface eth0 there was no error, and with interface br-lan we get got the same error as above. But we must use interface wlan2 for our work, since it is connected to the wireless techonology we want to use. We are including some more details bellow about the interfaces.
Can you help us please? Thank you,
Romeu Monteiro and Luís Guedes, University of Aveiro, Portugal
**************************
root@VeniamWorks666:~# ip address 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br-lan state UP qlen 1000 link/ether d4:ca:6d:ae:c7:10 brd ff:ff:ff:ff:ff:ff 3: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether d4:ca:6d:ae:c7:10 brd ff:ff:ff:ff:ff:ff inet 192.168.6.66/24 brd 192.168.6.255 scope global br-lan inet6 2001:690:2380:7770:d6ca:6dff:feae:c710/64 scope global dynamic valid_lft 2584321sec preferred_lft 597121sec inet6 fdce:a4d:96d9::1/64 scope global valid_lft forever preferred_lft forever inet6 fe80::d6ca:6dff:feae:c710/64 scope link valid_lft forever preferred_lft forever 8: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN qlen 1000 link/ether 30:14:4a:e9:fb:8b brd ff:ff:ff:ff:ff:ff inet6 fe80::3214:4aff:fee9:fb8b/64 scope link valid_lft forever preferred_lft forever 9: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN qlen 1000 link/ether 30:14:4a:e9:fb:8b brd ff:ff:ff:ff:ff:ff inet 20.0.6.66/24 brd 20.0.255.255 scope global wlan2 inet6 fe80::3214:4aff:fee9:fb8b/64 scope link valid_lft forever preferred_lft forever 10: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 32 link/ether d4:ca:6d:ae:c7:11 brd ff:ff:ff:ff:ff:ff inet 40.0.6.66/24 brd 40.0.255.255 scope global wlan0 100: 3g-3G: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 3 link/ppp
root@VeniamWorks666:~# ifconfig br-lan Link encap:Ethernet HWaddr D4:CA:6D:AE:C7:10 inet addr:192.168.6.66 Bcast:192.168.6.255 Mask:255.255.255.0 inet6 addr: fe80::d6ca:6dff:feae:c710/64 Scope:Link inet6 addr: 2001:690:2380:7770:d6ca:6dff:feae:c710/64 Scope:Global inet6 addr: fdce:a4d:96d9::1/64 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:307359 errors:0 dropped:789 overruns:0 frame:0 TX packets:1447 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:41996927 (40.0 MiB) TX bytes:197944 (193.3 KiB)
eth0 Link encap:Ethernet HWaddr D4:CA:6D:AE:C7:10 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:308310 errors:0 dropped:271 overruns:9 frame:0 TX packets:1458 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:46390072 (44.2 MiB) TX bytes:198538 (193.8 KiB) Interrupt:4
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:448 (448.0 B) TX bytes:448 (448.0 B)
wlan0 Link encap:Ethernet HWaddr D4:CA:6D:AE:C7:11 inet addr:40.0.6.66 Bcast:40.0.255.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:32 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan1 Link encap:Ethernet HWaddr 30:14:4A:E9:FB:8B inet6 addr: fe80::3214:4aff:fee9:fb8b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:832 (832.0 B)
wlan2 Link encap:Ethernet HWaddr 30:14:4A:E9:FB:8B inet addr:20.0.6.66 Bcast:20.0.255.255 Mask:255.255.255.0 inet6 addr: fe80::3214:4aff:fee9:fb8b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:45 errors:0 dropped:0 overruns:0 frame:0 TX packets:76 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3642 (3.5 KiB) TX bytes:7168 (7.0 KiB)
Hello Romeu!
Am 03.02.2014 18:54, schrieb Romeu Monteiro:
Can you help us please?
I'll try.
Are you sure, there is not other instance of the dtnd running? Check it with:
ps | grep dtnd
If not, then please report back the output of this while your dtnd is running with the reported error.
netstat -l -n -p | grep dtnd
It tell me to with interfaces and addresses the dtnd is bound to.
Kind regards, Johannes Morgenroth
Hi Johannes!
Thank you very much for your help! We ran dtnd again on interface wlan2, making sure there were no other instances running, but we got the same errors. The output of the netstat command is:
root@VeniamWorks639:~# netstat -l -n -p | grep dtnd tcp 0 0 127.0.0.1:4550 0.0.0.0:* LISTEN 2109/dtnd tcp 0 0 ::1:4550 :::* LISTEN 2109/dtnd udp 0 0 :::4551 :::* 2109/dtnd
Romeu
On Tue, Feb 4, 2014 at 7:59 AM, Johannes Morgenroth < morgenroth@ibr.cs.tu-bs.de> wrote:
Hello Romeu!
Am 03.02.2014 18:54, schrieb Romeu Monteiro:
Can you help us please?
I'll try.
Are you sure, there is not other instance of the dtnd running? Check it with:
ps | grep dtnd
If not, then please report back the output of this while your dtnd is running with the reported error.
netstat -l -n -p | grep dtnd
It tell me to with interfaces and addresses the dtnd is bound to.
Kind regards, Johannes Morgenroth -- !! This message is brought to you via the `ibr-dtn' mailing list. !! Please do not reply to this message to unsubscribe. To unsubscribe or adjust !! your settings, send a mail message to ibr-dtn-request@ibr.cs.tu-bs.de !! or look at https://mail.ibr.cs.tu-bs.de/listinfo/ibr-dtn.
Hello again,
I can reproduce the issue and this seems to be a bug. The issue is related to the IPv6 support of OpenWrt. For an unknown reason the bind fails if IPv6 is enabled. Since that work on all other supported platforms, that should work here too. A solution is to remove IPv6 support as long this bug is not fixed.
opkg remove kmod-ipv6 # then reboot the system
I will investigate the issue further and report back to the mailinglist if I found a solution.
Kind regards, Johannes Morgenroth
Am 04.02.2014 11:53, schrieb Romeu Monteiro:
Hi Johannes!
Thank you very much for your help! We ran dtnd again on interface wlan2, making sure there were no other instances running, but we got the same errors. The output of the netstat command is:
root@VeniamWorks639:~# netstat -l -n -p | grep dtnd tcp 0 0 127.0.0.1:4550 http://127.0.0.1:4550 0.0.0.0:* LISTEN 2109/dtnd tcp 0 0 ::1:4550 :::* LISTEN 2109/dtnd udp 0 0 :::4551 :::* 2109/dtnd
Romeu
Hi Johannes,
We disabled IPv6 and ran dtnd again, and now we get a different error:
root@VeniamWorks639:~# dtnd -i wlan2 Thu Jan 1 00:03:56 1970 INFO Configuration: Using default settings. Call with --help for options. Thu Jan 1 00:03:56 1970 INFO NativeDaemon: IBR-DTN daemon 0.10.2 (build 1d89427) Thu Jan 1 00:03:56 1970 INFO Configuration: Using default settings. Call with --help for options. Thu Jan 1 00:03:56 1970 INFO BundleCore: Local node name: dtn://VeniamWorks639 Thu Jan 1 00:03:56 1970 INFO BundleCore: Forwarding of bundles enabled. Thu Jan 1 00:03:56 1970 INFO NativeDaemon: using bundle storage in memory-only mode Thu Jan 1 00:03:56 1970 WARNING DTNTPWorker: The local clock seems to be wrong. Expiration disabled. Thu Jan 1 00:03:56 1970 INFO NativeDaemon: API initialized using tcp socket: loopback:4550 Thu Jan 1 00:03:56 1970 INFO NativeDaemon: TCP ConvergenceLayer added on wlan2:4556 Thu Jan 1 00:03:56 1970 INFO DiscoveryAgent: listen to [ff02::142]:4551 Thu Jan 1 00:03:56 1970 INFO DiscoveryAgent: listen to [224.0.0.142]:4551 Thu Jan 1 00:03:56 1970 INFO DiscoveryAgent: add interface wlan2 Thu Jan 1 00:03:56 1970 ERROR IPNDAgent: join failed on wlan2; 99: setsockopt() Thu Jan 1 00:03:56 1970 INFO NativeDaemon: Using default routing extensions
There's some extra information I collected bellow this e-mail. Thank you,
Romeu
******************************
root@VeniamWorks639:~# netstat -l -n -p |grep dtnd tcp 0 0 127.0.0.1:4550 0.0.0.0:* LISTEN 1285/dtnd tcp 0 0 20.0.6.39:4556 0.0.0.0:* LISTEN 1285/dtnd netstat: /proc/net/tcp6: No such file or directory udp 0 0 20.0.6.39:59564 0.0.0.0:* 1285/dtnd udp 0 0 0.0.0.0:4551 0.0.0.0:* 1285/dtnd netstat: /proc/net/udp6: No such file or directory netstat: /proc/net/raw6: No such file or directory
root@VeniamWorks639:~# ifconfig br-lan Link encap:Ethernet HWaddr D4:CA:6D:AE:C6:F6 inet addr:192.168.6.39 Bcast:192.168.6.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:20620 errors:0 dropped:3517 overruns:0 frame:0 TX packets:338 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2693781 (2.5 MiB) TX bytes:44564 (43.5 KiB)
eth0 Link encap:Ethernet HWaddr D4:CA:6D:AE:C6:F6 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:20765 errors:0 dropped:9 overruns:0 frame:0 TX packets:338 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3002684 (2.8 MiB) TX bytes:44564 (43.5 KiB) Interrupt:4
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:896 (896.0 B) TX bytes:896 (896.0 B)
wlan0 Link encap:Ethernet HWaddr D4:CA:6D:AE:C6:F7 inet addr:40.0.6.39 Bcast:40.0.255.255 Mask:255.255.255.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:32 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan1 Link encap:Ethernet HWaddr 30:14:4A:E9:FC:0F UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan2 Link encap:Ethernet HWaddr 30:14:4A:E9:FC:0F inet addr:20.0.6.39 Bcast:20.0.255.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:380 errors:0 dropped:0 overruns:0 frame:0 TX packets:406 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:32655 (31.8 KiB) TX bytes:41915 (40.9 KiB)
root@VeniamWorks639:~# ip address 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br-lan state UP qlen 1000 link/ether d4:ca:6d:ae:c6:f6 brd ff:ff:ff:ff:ff:ff 3: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether d4:ca:6d:ae:c6:f6 brd ff:ff:ff:ff:ff:ff inet 192.168.6.39/24 brd 192.168.6.255 scope global br-lan 8: wlan1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN qlen 1000 link/ether 30:14:4a:e9:fc:0f brd ff:ff:ff:ff:ff:ff 9: wlan2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UNKNOWN qlen 1000 link/ether 30:14:4a:e9:fc:0f brd ff:ff:ff:ff:ff:ff inet 20.0.6.39/24 brd 20.0.255.255 scope global wlan2 10: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 32 link/ether d4:ca:6d:ae:c6:f7 brd ff:ff:ff:ff:ff:ff inet 40.0.6.39/24 brd 40.0.255.255 scope global wlan0 17: 3g-3G: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN qlen 3 link/ppp
On Tue, Feb 4, 2014 at 11:35 AM, Johannes Morgenroth < morgenroth@ibr.cs.tu-bs.de> wrote:
Hello again,
I can reproduce the issue and this seems to be a bug. The issue is related to the IPv6 support of OpenWrt. For an unknown reason the bind fails if IPv6 is enabled. Since that work on all other supported platforms, that should work here too. A solution is to remove IPv6 support as long this bug is not fixed.
opkg remove kmod-ipv6 # then reboot the system
I will investigate the issue further and report back to the mailinglist if I found a solution.
Kind regards, Johannes Morgenroth
Am 04.02.2014 11:53, schrieb Romeu Monteiro:
Hi Johannes!
Thank you very much for your help! We ran dtnd again on interface wlan2, making sure there were no other instances running, but we got the same errors. The output of the netstat command is:
root@VeniamWorks639:~# netstat -l -n -p | grep dtnd tcp 0 0 127.0.0.1:4550 0.0.0.0:* LISTEN 2109/dtnd tcp 0 0 ::1:4550 :::* LISTEN 2109/dtnd udp 0 0 :::4551 :::* 2109/dtnd
Romeu
Am 04.02.2014 13:14, schrieb Romeu Monteiro:
IPNDAgent: join failed on wlan2; 99: setsockopt()
This is no critical error. The root of this is the join to [ff02::142]:4551 which only works if IPv6 is supported. However, the IPv4 part should work and the error can be ignored.
Kind regards, Johannes Morgenroth
Am 04.02.2014 12:35, schrieb Johannes Morgenroth:
I can reproduce the issue and this seems to be a bug. The issue is related to the IPv6 support of OpenWrt. For an unknown reason the bind fails if IPv6 is enabled. Since that work on all other supported platforms, that should work here too. A solution is to remove IPv6 support as long this bug is not fixed.
opkg remove kmod-ipv6 # then reboot the system
I will investigate the issue further and report back to the mailinglist if I found a solution.
I have found a solution to this issue, but it requires some changes in IBR-DTN. The root of this bug is the standard library function getaddr() which is broken on OpenWrt and returns invalid link local IPv6 addresses. As result the bind on those fails and the daemon aborts the bind process.
By using the libnl-2.0 library of OpenWrt it is possible to get correct link-local addresses. The fix will be included the next release 0.12.
Kind regards, Johannes Morgenroth
participants (2)
-
Johannes Morgenroth
-
Romeu Monteiro