SparkyLinux Forums

Software & hardware support => Newbie questions => Topic started by: frogprince on April 15, 2014, 01:46:03 AM

Title: (Solved) "DNS Lookup Failed"
Post by: frogprince on April 15, 2014, 01:46:03 AM
After my last update, I can no longer access the internet from either wired or wireless connection. I booted Knoppix from a flash drive and was easily able to connect via wifi and bring up the duckduckgo.com search engine, so it's not the hardware. My desktop machines and my wife's lap top all connect and run as well, so it's not the ISP or the connection. I tried running ifconfig, but got a message that that command wasn't installed on my system, and without a connection, I can't install it. Running apt-get update gets me a long list of sources with "failed to resolve". I searched the Debian forums and bug reports from my desk top machine, but found nothing like this. The connection icon indicates that the system is connected; it just won't resolve the DNS. Has anyone else seen this?



Thanks in advance.
Title: Re: "DNS Lookup Failed"
Post by: pavroo on April 15, 2014, 12:45:02 PM
It looks like the last update went wrong.

Run the command to try fix it:

Code:

dpkg --configure -a


Title: Re: "DNS Lookup Failed"
Post by: frogprince on April 15, 2014, 01:42:01 PM
Pavroo: thanks for responding! I ran that, but to no avail; I still have the same error.
Title: Re: "DNS Lookup Failed"
Post by: pavroo on April 15, 2014, 04:59:55 PM
OK, run it and show me the output:

Code:

ping -c 2 46.28.247.119


and:

Code:

cat /etc/networks
cat /etc/network/interfaces
cat /etc/resolv.conf


and as root:

Code:

ifconfig -a


Title: Re: "DNS Lookup Failed"
Post by: frogprince on April 15, 2014, 05:33:49 PM
Here we go:



Code:

myusername@dellx1:~$ ping -c 2 46.28.247.119
PING 46.28.247.119 (46.28.247.119) 56(84) bytes of data.

--- 46.28.247.119 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1009ms

myusername@dellx1:~$ cat /etc/networks
default      0.0.0.0
loopback   127.0.0.0
link-local   169.254.0.0

myusername@dellx1:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

myusername@dellx1:~$ cat /etc/resolv.conf
# Generated by NetworkManager
domain zoomtown.com
search zoomtown.com
nameserver 192.168.0.1
myusername@dellx1:~$ su
Password:

root@dellx1:/home/myusername# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:12:3f:69:10:ef  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:16

eth1      Link encap:Ethernet  HWaddr 00:12:f0:74:a1:18  
          inet6 addr: fe80::212:f0ff:fe74:a118/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:825 errors:756 dropped:756 overruns:0 frame:0
          TX packets:132 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:205266 (200.4 KiB)  TX bytes:15670 (15.3 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:239 errors:0 dropped:0 overruns:0 frame:0
          TX packets:239 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:21807 (21.2 KiB)  TX bytes:21807 (21.2 KiB)

root@dellx1:/home/myusername#


Title: Re: "DNS Lookup Failed"
Post by: pavroo on April 15, 2014, 06:16:26 PM
Try manually to bring the interfaces up (as root):

Code:

ifdown -a
ifup -a


Title: Re: "DNS Lookup Failed"
Post by: frogprince on April 15, 2014, 10:02:19 PM
Unfortunately:

Code:

myusername@dellx1:su
Password:
root@dellx1:/home/myusername# ifdown  -a
root@dellx1:/home/myusername# ifup  -a
root@dellx1:/home/myusername# ping -c 2 46.28.247.119
PING 46.28.247.119 (46.28.247.119) 56(84) bytes of data.

--- 46.28.247.119 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1001ms






Title: Re: "DNS Lookup Failed"
Post by: MoroS on April 15, 2014, 11:08:51 PM
Hi.



It's strange, as Wicd or NetworkManager should be managing your network connection in Sparky. Maybe check out that first. Depending on which you have installed try running:

Code:

sudo service wicd restart


or

Code:

sudo service network-manager restart




Alternatively, if the interface is up ("UP BROADCAST ..."), which is your case, then you can use either dhcpcd or dhclient (depending on which one is installed). Run either:

Code:

sudo dhcpcd ethX


(X being the interface number - 0 or 1 in your case) or

Code:

sudo dhclient ethX




Let us know if that helped. It's only a temporary solution and after a reboot the problem should return, but it'll help us identify what's wrong.
Title: Re: "DNS Lookup Failed"
Post by: frogprince on April 16, 2014, 12:36:47 AM
MoroS: We're finally on to something. I have network-manager, but restarting it did not help. dhcpcd isn't installed, but dhclient is:



Code:

root@dellx1:/home/myusername# service network-manager restart
root@dellx1:/home/myusername# ping -c 2 46.28.247.119
PING 46.28.247.119 (46.28.247.119) 56(84) bytes of data.

--- 46.28.247.119 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1002ms

root@dellx1:/home/myusername# dhcpcd eth1
bash: dhcpcd: command not found
root@dellx1:/home/myusername# dhclient eth1
root@dellx1:/home/myusername# ping -c 2 46.28.247.119
PING 46.28.247.119 (46.28.247.119) 56(84) bytes of data.
64 bytes from 46.28.247.119: icmp_seq=1 ttl=45 time=186 ms
64 bytes from 46.28.247.119: icmp_seq=2 ttl=45 time=209 ms

--- 46.28.247.119 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 186.804/198.203/209.603/11.408 ms
root@dellx1:/home/myusername#




So running dhclient eth1 restored the DNS service. And as you suspected, rebooting returned the problem. I ran the command again, and then, just for grins:



Code:

apt-get update
apt-get dist-upgrade




And as luck would have it, there was an update to network-manager included. After installing all of that and rebooting, the DNS server worked again and my browser's home page loaded promptly. So I thought woo-hoo!, but then got wary and rebooted a second time. And then the problem returned..~(8^{)=.. So there is still something else at fault, and an intermittent something at that.



Thanks for your response!



Title: Re: "DNS Lookup Failed"
Post by: MoroS on April 19, 2014, 10:17:13 AM
Hi. Sorry for the late response. I'm a bit busy right now. We'll need to configure your NetworkManager, so that it automatically runs the DHCP client to get the IP address from the DHCP server, but sadly I can't find the time to explain it step by step, so please wait a while. I understand that getting the network to work manually every time you boot the system is quite stressful, but I need some time to explain it step by step (including screenshots). I hope to complete it by the end of the week and if Pavroo doesn't mind, we'll post it on the website.
Title: Re: "DNS Lookup Failed"
Post by: pavroo on April 19, 2014, 04:12:07 PM
It's good idea.
Title: Re: "DNS Lookup Failed"
Post by: frogprince on April 19, 2014, 07:30:52 PM
MoroS: Thank you! I'll do a bit of investigating toward that end myself, and post what I find.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on April 23, 2014, 05:01:11 AM
MoroS & Pavroo: I took the easy way out of this one and installed the latest Sparky. Fixed both the network and suspend problems. Runs great.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: pavroo on April 23, 2014, 05:35:06 PM
That's great !
Title: Re: (Solved) "DNS Lookup Failed"
Post by: MoroS on April 23, 2014, 08:38:50 PM
frogprince: Cool. We're glad that everything works, although it took a reinstall to make it that way. The tutorial is still going to made, just in case. :)
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on April 29, 2014, 04:25:46 AM
He's back..I reinstalled Sparky 3 on a desktop machine, ran apt-get dist-upgrade, and now have lost my internet connection. It's now a wired connection, but running dhclient as above restores access. Have you had any further luck with this one? Thanks.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: MoroS on April 29, 2014, 12:10:01 PM
Should have seen this one coming. :P I'll look into it in the evening (don't know what time zone you're in, but here it's in 6-8 hours). If I won't find the problem, then at the very least we'll solve yours. :) Which version are you using? The one with LXDE?
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on April 29, 2014, 04:42:36 PM
MoroS: Yeah, I thought it might be about the wireless Intel drivers in the X1 laptop, so I moved Sparky to a P4 machine I have with wired access, an nVidia 6200 video card and an Intel mobo. But as soon as I did the big update, I lost internet access in exactly the same way. I have a number of different machines, so I'm not shut down and it's not critical for me. Unfortunately, you may see this one from other users.. :(



I'm in the US, Eastern Time Zone, and yes, it's the latest and greatest 32-bit LXDE version. Debian bug? If so, I can post it there.. :P
Title: Re: (Solved) "DNS Lookup Failed"
Post by: pavroo on April 29, 2014, 05:31:43 PM
Your problem doesn't let me sleep well :)

If you keep open connection, install package 'resolvconf'.

If not, download it from the Debian repo using other computer:

packages.debian.org/jessie/all/resolvconf/download

and install it manually:

Code:

sudo dpkg -i resolvconf_1.74_all.deb


When you install it, run:

Code:

ifdown eth0
ifup eth0


and

Code:

ifdown eth1
ifup eth1


Title: Re: (Solved) "DNS Lookup Failed"
Post by: MoroS on April 29, 2014, 06:02:04 PM
Pavroo: it's not a question of resolvconf, but NetworkManager running a DHCP client (dhclient for instance, which also handles resolvconf). Maybe the update scrambles something in the NetworkManager or service configurations. That I have yet to test.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on April 29, 2014, 06:30:54 PM
Pavroo: Please sleep. We'll figure this out in due time, and I'm not shut down!



I installed resolvconf_1.74_all.deb as above, and then ran:



Code:

root@zapper:/home/username# ifdown eth0
ifdown: eth0 not configured




So, I tried:

Code:

root@zapper:/home/username#nano /etc/network/interfaces

auto lo
iface lo inet loopback




I did a quick duckduckgo search, and modified as follows:



Code:

auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp




Saved it, logged out and back in, and checked:



Code:

root@zapper:/home/username# ifdown eth0
ifdown: eth0 not configured


. :



I'm not afraid to go mucking around in config files, but I must confess that I really don't know what I'm doing here.

The good news is, there's no data at risk on this machine, so there's no risk in trying things.



Please let me know what else I can do, and thanks.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: pavroo on April 29, 2014, 06:36:35 PM
MoroS: Ok, just test it.

Frogprince: wait for MoroS tests. Anyway I think  you have connected eth1 not eth0.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on April 29, 2014, 10:39:03 PM
Pavroo: I checked before I tried ifdown, menu/preferences/Network Connections, both "Wired connection 1" and "Auto Ethernet" show:



Code:

MAC Address   00:07:E9:D5:4B:12 (eth0)




What apparently I missed was rebooting after installing resolvconf. After sending my last message, I shut the machine down to run a couple of errands. After coming back and rebooting, I got:



Code:

username@zapper:~$ su
Password:
root@zapper:/home/username# ifdown eth1
ifdown: interface eth1 not configured
root@zapper:/home/username ifdown eth0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:07:e9:d5:4b:12
Sending on   LPF/eth0/00:07:e9:d5:4b:12
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.0.1 port 67
root@zapper:/home/username# ifup eth0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:07:e9:d5:4b:12
Sending on   LPF/eth0/00:07:e9:d5:4b:12
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.0.1
DHCPACK from 192.168.0.1
bound to 192.168.0.105 -- renewal in 4783 seconds.
root@zapper:/home/username#




So I opened Iceweasel, and it immediately connected to www.google.com as usual. To further test, I rebooted the system twice more. Each time I opened Iceweasel without running ifdown/up in a terminal, just running the software, and each time it opened google.com without any problem or other intervention.



So, did installing resolvconf fix the problem? That package was not present after the apt-get dist-upgrade session. Or did I have to run ifdown/up as well? You may still want to test a new install to see if this is a Jessie bug or ??



Thanks for all your help talking me through this one!

Title: Re: (Solved) "DNS Lookup Failed"
Post by: MoroS on April 30, 2014, 12:46:51 AM
It seems that installing resolvconf worked around the problem. I can see that ifdown launched the ISC DHCP client who's responsible for assigning the IP address to the network interface. For some reason the dist-upgrade stopped this process, but now you've got it working (not through NetworkManager, but still it's automatic right now, so it generally solves the problem of no internet connection).



As you mentioned before: other users might still have that problem, so we need to know the root cause of all this. I'm still entangled in finishing a part of my engineering thesis, so I didn't have time to test it yet, but I'm finishing it as we speak/write, so I'll be testing that case tomorrow.



It's good to know it's working for you again. :)
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on April 30, 2014, 01:23:16 PM
MoroS: If and when you get two minutes to rub together (I've been a grad student myself, minutes are hard to find), I'm a retired EE and would love to know your thesis topic and the eventual root cause of all of this. Thanks for all your help!
Title: Re: (Solved) "DNS Lookup Failed"
Post by: MoroS on May 02, 2014, 12:59:18 PM
frogprince: I'll write something about my thesis later, but right now I need to know if you did the systemd upgrade after installing of a normal dist-upgrade and nothing more?
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on May 02, 2014, 05:25:53 PM
Unfortunately, no, I went ahead and did the rest of it as well. My apologies; I didn't get that you needed that info, and I should have. Rebooting after that upgrade left me with no icons or background on the desktop, and a group of error messages about failed dependencies for sparky initialization routines. I did a dist-upgrade -f and an additional forced update to intramfs, and now finally everything seems to work. One must pay careful attention to the error messages during the updates!



1.) Might the information you're seeking be in my log file somewhere?



2.) Since the machine I'm running Sparky on right now is a test machine, I'd be happy to reinstall from my original CD and document the update process more carefully, if that would help the Sparky QA process.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: MoroS on May 02, 2014, 06:59:56 PM
I did a test in an attempt to recreate the situation, but after running dist-upgrade and rebooting nothing bad happened. The network was still working (although the LightDM theme did change to the default, maybe I overwrote some config file). I would be good if you could do a reinstall and give us a detailed description of it (what steps you took, what commands you ran and what was their output... it would also be nice if you could save the output of the dmesg command after each reboot). The log files from the /var/log folder would also be helpful. I know it's a lot to ask, so feel free to ignore it if you don't have the time or interest to do it. I'll be trying to recreate the problem myself. :)
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on May 04, 2014, 02:26:26 AM
MoroS: Open source has been very good to me over the last few years; I'm happy to contribute if I can. We have some family commitments tomorrow, and I teach Monday morning, but I'll check things out this next week.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: frogprince on May 04, 2014, 03:11:07 AM
MoroS: I see no way to forward attachments to you on this forum. Please email me at wmichaelb@fuse.net to let me know how to handle that.
Title: Re: (Solved) "DNS Lookup Failed"
Post by: pavroo on May 26, 2014, 03:46:02 PM
I'd like to refresh this topic.

I have upgraded one of my testing sparky installations (sparky-3.3-base) which has wicd and resolveconf (package) preinstalled.

After upgrading all packages, the /var/resolveconf directory has been removed from the system. So it couldn't make symlink to /etc/resolveconf/ and another symlink to /etc/resolve.conf (it work with resolveconf.deb package so it has to).



I manualy reinstalled resolveconf.deb package but it did not make any change.

So I removed wicd and resolvconf packages and all its dependencies and installed network-manager-gnome instead.

It doesn't need resolveconf package preinstalled, becouse it creates /etc/resolveconf file itself.



Anyway the latest iso image of sparky-3.3.2-test3 doesn't have wicd nor resolveconf anymore, but has network-manager-gnome so it shouldn't make any problem with networing any more.