emonPi periodically unable to resolve emoncms.org - flush DNS cache?

Periodically (not that regular but perhaps once every 2-3 weeks), I see my emonPi unable to resolve emoncms.org. Consequently, it then becomes unable to upload data to emoncms.org, so I see data missing on there. Local emoncms continues getting the data just fine.

When this happens, if I SSH onto the emonPi and run wget www.emoncms.org > /dev/null it shows that it’s unable to resolve the address. If I reboot the pi, or even just just restart the network service on it (sudo service networking restart) it will then begin resolving the URL again and uploading data.

No other devices on my network suffer this problem (that is, I can browse emoncms.org okay), so I’m not sure where the fault lies. Is there a quick command that I can schedule daily on the pi that will flush its DNS cache (i.e. the equivalent of ‘ipconfig /flushdns’ on Windows)? I’d rather not have to schedule a restart of the networking service or the pi, as that seems a little heavy-handed and may produce gaps in data.

not sure on your on your specific issue. but mentioning some network equipment can block specific devices due to what it classifies as suspicious behavior. and it can only be one device out of group of them. malformed tCPs, spanning etc , i see this issue alot as i run a small ISP . simply reseting or swapping out your router can correct the issue. but as to flushing your DNS you can try sudo /etc/init.d/dnsmasq restart OR service dnsmasq restart

Thanks. I’ll see if I can look at firewall logs on my router to see if it’s deciding to block the traffic for some reason.

I now remember that rebooting the router also got the pi resolving the URL again, but that could just be because it cycles the pi’s WiFi link.