Ubuntu 16.04 cannot resolve dns - connection timed out; no servers could be reached
#1
Hi,

I'm running Ubuntu 16.04 (Linux pine64 3.10.104-2-pine64-longsleep) for a few days on my Pine64 2GB. What I notice is that after a reboot DNS works fine, but after sometime DNS is no longer able to resolve. 

When DNS fails I get a message like:

nslookup www.google.com
;; connection timed out; no servers could be reached

However, if I reboot the Pine64 DNS works like a charm. 

I've got a fixed IP defined in /etc/network/interfaces.d/eth0
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.158
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8


Which works because ifconfig shows the following:

eth0      Link encap:Ethernet  HWaddr 4a:7c:01:2a:0d:57
          inet addr:192.168.1.158  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::487c:1ff:fe2a:d57/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:172911 errors:0 dropped:9 overruns:0 frame:0
          TX packets:84150 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:28673200 (28.6 MB)  TX bytes:26435938 (26.4 MB)
          Interrupt:114


ip route shows the following:
default via 192.168.1.1 dev eth0 onlink
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.158

Does anybody have a suggestion where I should look for the rootcause/solution?
#2
(03-01-2017, 02:16 PM)marcosti Wrote: Hi,

I'm running Ubuntu 16.04 (Linux pine64 3.10.104-2-pine64-longsleep) for a few days on my Pine64 2GB. What I notice is that after a reboot DNS works fine, but after sometime DNS is no longer able to resolve. 

When DNS fails I get a message like:

nslookup www.google.com
;; connection timed out; no servers could be reached

However, if I reboot the Pine64 DNS works like a charm. 

I've got a fixed IP defined in /etc/network/interfaces.d/eth0
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.1.158
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8


Which works because ifconfig shows the following:

eth0      Link encap:Ethernet  HWaddr 4a:7c:01:2a:0d:57
          inet addr:192.168.1.158  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::487c:1ff:fe2a:d57/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:172911 errors:0 dropped:9 overruns:0 frame:0
          TX packets:84150 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:28673200 (28.6 MB)  TX bytes:26435938 (26.4 MB)
          Interrupt:114


ip route shows the following:
default via 192.168.1.1 dev eth0 onlink
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.158

Does anybody have a suggestion where I should look for the rootcause/solution?


hi, try adding an automated ping to the nameserver ( temporarily ) to see if it helps.

Setup a crontab entry to run a script containing something like the following:

ping -c 3  <nameserveraddress>

( or similar.,  its a counted ping to the nameserver ip address )

Have the crontab entry ping the server every thirty minutes or an hour and see if that helps.  If so, you need to find out why things are going to sleep.  It would not hurt at all to maintain the ping in crontab forever.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#3
google probably dumps people in some kind of load shift scheme. do you list a secondary?


Possibly Related Threads…
Thread Author Replies Views Last Post
  Issues with both Deb and Ubuntu germanshep 0 2,746 08-28-2018, 05:47 PM
Last Post: germanshep
  Help debug my pine64A+ ubuntu/plex hangs XaRz 8 11,169 11-02-2017, 06:34 AM
Last Post: XaRz
Question Ultrawide Display for Ubuntu Mate DE dudeytsang 1 5,394 01-01-2017, 07:26 AM
Last Post: CaptainZalo
Question No more ethernet with linux... Android connection is fine?!?! cr2016 9 13,711 11-12-2016, 07:29 PM
Last Post: cr2016
  Pine64+Ubuntu+Tvheadend+DVBT Dongle Shai 3 6,998 10-03-2016, 04:23 AM
Last Post: Shai
  Dmesg output Ubuntu Mate S265 1 3,915 10-02-2016, 07:28 AM
Last Post: MarkHaysHarris777
  Overclocking ubuntu mate Mixermic 2 5,465 10-01-2016, 04:36 AM
Last Post: pfeerick
  How to make multicast working on ubuntu and debian brengthdom 3 7,544 09-18-2016, 02:05 PM
Last Post: brengthdom
  Camera support - Ubuntu Xenial 16.04 LTS @lex 3 5,784 08-07-2016, 03:47 AM
Last Post: romansavrulin
  [How-To] Make PINE 64 with Ubuntu Xenial Longsleep build crunch BOINC Tasks moisesmcardona 3 9,005 07-27-2016, 01:16 PM
Last Post: NexusDude

Forum Jump:


Users browsing this thread: 2 Guest(s)