I think this problem happened for a long time (from time to time), but only today I have checked the resolv.conf file and found only 2 lines:
# Generated by Connection Manager
search home
no nameserver lines.
When this problem happens, any Internet access from Kodi fails (obviously, because all are done by DNS names) while home network accesses (SSH, SMB) works, because I use .local names.
While network problem is a probable cause, I belive (as this DNS problem appear only on Vero) that the DHCP client isn’t stable enough to handle the inevitability of network errors.
I don’t want to nail my Vero2 on google d’evil servers (or ISP servers - subject to change) and switch to static IP (or fight to protect resolv.conf from being rewritten).
My quick fix was always to reboot Vero. It is a Windows(c) method, which I found it more often needed on Linux machines, now, in the presence of the new cool kids like systemd and connman.
The DHCP client should never give up the IP and the DNS servers on any kind of error (DHCP server not responding, full disk, duplicate IP when the server is not responding). Otherwise, the network device will be pushed to coma.
resolv.conf only contains static defined nameservers.
Either you use a static nameserver and configure it there or you use DHCP and the nameserver should be specified in the DHCP response.
From your post it seems you do not want a static setup so there shouldn’t be a static entry.
Is your problem that you are not getting any DNS resolution at all? Or only after some time?
If only after some time then this would almost certainly be a local network issue (possibly too short a lease beinf offered by the DHCP server). We would ned a full set of logs to see why the network drops.
To get a better understanding of the problem you are experiencing we need more information, including logs from you. Our wiki contains detailed steps for providing the relevant info we need to help you.
Not quite. DHCP will populate /etc/resolv.conf unless nodnsproxy is not set in ConnMan. We enable this by default. NetworkManager, standard if.d behaves the same. libc6 consults this file for domain resolution.
This is actually a potential connectivity issue, but obviously logs are needed (from ConnMan). I haven’t seen this problem before. You seem to know what you’re doing on the network side (as you’ve debugged far enough to identify the current problem). Can you let me know if you’re running a custom DHCP server?
Does the issue only begin with renewal of a lease, i.e. if you reboot a few times, do you always get a nameserver?
I’ve checked with the ConnMan team and they’re not presently aware of any recent bugs that would cause this, but we’re a little behind on the ConnMan version. If you can reliably reproduce this I can produce a new ConnMan build for testing
We don’t follow the conventional /etc/network/interfaces approach. It makes perfect sense on a Linux desktop or server in a static environment, but doesn’t work for OSMC where users roam and expect to be able to configure things via a GUI.
Not sure what you are talking about but to enable persistent logging on OSMC you just edit /etc/systemd/journal.conf and set Storage= persistent.
After next reboot your journal should be in /var/log/journal/ but be aware that this can be a SD card killer.
I’ve put a hourly timer to save the connman log if nameserver is not present in resolv.conf.
This way I’ll see how often it happens and what connman has to say about that.