You are not logged in.

#1 2020-01-09 15:21:29

StanleyRick
Member
Registered: 2016-12-02
Posts: 8

[Solved] nscd needs to be manually restarted to refresh DNS

Hi, I'm having trouble with DNS caching (I think it is the problem). From time to time I need to restart 'nscd.service' for some programs and eventually some sites to work properly.
For example, when I open spotify it shows that I'm offline (error code 4), thinking it was just spotify, cleared '~/.cache/spotify' didn't work, but after restarting 'nscd.service' exiting the app and opening again it works as well as the sites that sometimes didn't work for DNS resolution issues.

I checked my '/etc/resolv.conf', seems fine to me:

# Generated by NetworkManager
search br
nameserver 1.1.1.1
nameserver 1.0.0.1
nameserver fe80::1272:23ff:fe45:df8f%wlp3s0

This happens only when I'm connected to another wireless network, from my work place for instance. Furthermore, I've noticed that my connection is oddly slow, I think it's related to domain resolution, but I guess it's another topic.

I need help tracking down the root of this issue (or misconfiguration). As I've said, I need to restart 'nscd' for some programs to work.

References:
https://bbs.archlinux.org/viewtopic.php?id=247097

Last edited by StanleyRick (2020-01-14 15:13:29)

Offline

#2 2020-01-10 17:11:30

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: [Solved] nscd needs to be manually restarted to refresh DNS

From time to time

What's the actual frequency here? Minutes, hours, days, weeks, months…?

some programs and eventually some sites

Is there a pattern (for the target addresses)?

spotify is hosted at googles cloudservice, so your cache might simply be outdated. Try to compare the IP resolution for a failing webpage w/ "ping" and "dig @8.8.8.8"

Offline

#3 2020-01-11 17:41:03

StanleyRick
Member
Registered: 2016-12-02
Posts: 8

Re: [Solved] nscd needs to be manually restarted to refresh DNS

What's the actual frequency here? Minutes, hours, days, weeks, months…?

It happens almost always when my laptop sleeps and I log in to my session, and when my connection drops and then reconnect. But it always happens when I connect to my works place's network for the first time n a day.

Is there a pattern (for the target addresses)?

For websites, it happens sparsely. I remember having problem with websites (github, youtube/google) only two times. It normalizes after restarting "NetworkManager.service", but spotify for instance it its 'nscd.service'

Try to compare the IP resolution for a failing webpage w/ "ping" and "dig @8.8.8.8"

I'll do it when I'm there.

so your cache might simply be outdated

Yes, it might be that. In the mean time, I'll look into some related issues: Can't seem to refresh my DNS cache; Clear DNS cache;

Offline

#4 2020-01-14 15:13:13

StanleyRick
Member
Registered: 2016-12-02
Posts: 8

Re: [Solved] nscd needs to be manually restarted to refresh DNS

Well aparently, after some packages update and installing the Dnsmasq package, starting and enabling it, solved the problem. I don't know which exactly solved, but it is.

Offline

Board footer

Powered by FluxBB