-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c8y-remote-access-plugin does not resolved .local addresses #2803
Comments
After some investigation it seems that the musl builds don't support the Name Service Switch: It can be demonstrated easily using the Set the
Then using the musl target (e.g.
Then build a libc variant, e.g. # ldd ./tedge
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
linux-vdso.so.1 (0x00007fff18cf0000)
libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x00007fff180d0000)
libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x00007fff180a0000)
libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x00007fff17ee0000)
libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x00007fff17eb0000)
/lib/ld-linux-aarch64.so.1 (0x00007fff18cb8000)
# ./tedge mqtt sub 'dummy'
INFO: Connected |
In general the lack of the NSS support is also not just affecting name resolution, but also user/groups. I suspect the usage of a musl build is also the root cause for this ticket as well #2042 |
Using another resolver like (trust-dns/hickory-dns) might also improve the reliability of name resolution in the case of misconfiguration (as seen in this ticket #2321) |
I've got the following working with mDNS:
I found that on my Raspberry Pi 4 with rugpi image, mDNS lookup indeed doesn't work on musl builds of Rust binaries. But mDNS lookup worked on musl builds on my x86 dev machine, even though musl shouldn't support it! So upon closer inspection, contents of
So To use |
Experienced the same issue when requesting logs, config files. Hardware: Raspberry pi 3 Temporary solution: edited |
@zhong-ys The recommended way to solve this problem is to use It isn't recommended to add a manual entry for |
Describe the bug
The c8y.proxy does not seem to support the resolution of domain names with the
.local
suffix, though other components such as (ping, curl, wget) do support the resolution of.local
host names.Given the main device,
rpi5-d83addab8e9f
, the c8y-remote-access-plugin is used to try to access a child devicerpizero2-d83add42f121.local
.However other linux tools on the same device (such as ping, curl, wget) do support the resolution of the
.local
names:To Reproduce
This behaviour can be easily reproduced by calling the c8y-remote-access-plugin command. The command is not expected to successfully connect, however it should show that the name resolution does not work.
Given a main device with thin-edge.io installed on it,
Try to start the c8y remote access plugin from the command line.
sudo c8y-remote-access-plugin "530,rpi5-d83addab8e9f,<child_device>.local,22,dd4afed9-37cc-4d23-a923-34612bf628e4"
Expected behavior
If a device supports name resolution of
.local
domains, then thin-edge.io should also support it.Screenshots
Environment (please complete the following information):
Debian GNU/Linux 12 (bookworm)
Raspberry Pi 5 Model B Rev 1.0
Linux rpi5-d83addab8e9f 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux
tedge 1.0.1
Additional context
This might be a general problem with the default name resolver used by thin-edge.io, so I wouldn't be surprised if other components also have the same problem.
The text was updated successfully, but these errors were encountered: