LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-21-2005, 03:48 AM   #1
faked
LQ Newbie
 
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6

Rep: Reputation: 0
Exclamation dns client fails after power failure (Debian Sarge)


After a power failure on my Debian Sarge box, the dns client it should use isn't working right anymore....

Each time after reboot, the /etc/resolv.conf file disappears. The dns servers this box' client should use are static, and coded in /etc/network/interfaces:

Code:
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo eth0 eth1
iface lo inet loopback
# The primary network interface

iface eth0 inet static
        address 10.0.0.1
        netmask 255.0.0.0
        network 10.0.0.0
        broadcast 10.255.255.255
        dns-nameservers 194.159.73.135 194.159.73.136 194.159.73.137
        #dns-search thuis
        gateway 10.0.0.250
        # dns-* options are implemented by the resolvconf package, if installed

iface eth1 inet static
        address 10.0.0.2
        netmask 255.0.0.0
        broadcast 10.255.255.255
        network 10.0.0.0
        gateway 10.0.0.250
i can ping my local lan and my gateway, but pinging my dns servers is impossible. When I nslookup, and get the server info, it returns 127.0.0.1.
Even after setting server 194.159.73.135 (ISP dns) with nslookup, I can't ping that dns server, nor hostnames lookups.

this is in /etc/nsswitch.conf:


Code:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

hosts:  dns files
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis
I know all ip adresses are allright. Because nslookup is failing, everything (apache, postfix, enz) is failing too. But I can ssh to my box on my lan (to the ip)

Somewhere on the internet, i found it maybe have to do something with dhcp. But I don't use that, nor dhcp client nor dhcp server.

Can someone give me some hints?

Last edited by faked; 01-21-2005 at 07:47 AM.
 
Old 01-21-2005, 04:08 AM   #2
faked
LQ Newbie
 
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6

Original Poster
Rep: Reputation: 0
Question NOT solved

restarting the box and restarting bind (/etc/init.d/bind9 restart) did not help. Pinging to some <edit>ip</edit> outside my lan is still impossible.

<edit>

When I edit and save my resolv.conf, the whole file resolv.conf disappears after an hour or so. There remains a dir /etc/resolvconf/ (no dot!). Trying /etc/init.d/resolvconf start gives
Code:
./resolvconf start
Setting up resolvconf...run-parts: /etc/resolvconf/update.d/bind exited with return code 1
run-parts: /etc/resolvconf/update.d/libc exited with return code 1
failed.
/etc/init.d/resolvconf reload gives me
Code:
./resolvconf reload
run-parts: /etc/resolvconf/update.d/bind exited with return code 1
run-parts: /etc/resolvconf/update.d/libc exited with return code 1
but the situation gets stranger:
i can ping the ip's on my lan,
i can ping 127.0.0.1,
but i can NOT ping localhost (times out);
i can not ping my isp's dns server :
Code:
 ping 194.159.73.134
connect: Network is unreachable


CAN SOMEBODY PLEASE HELP THIS NEWBEE ?

I think this shouldn't be so difficult....... please help

thanx,.....
faked


</edit>

Last edited by faked; 01-21-2005 at 07:46 AM.
 
Old 01-21-2005, 08:07 AM   #3
faked
LQ Newbie
 
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy not solved, samba very slow but running

I can use samba, but it takes 4 minutes in win. 2k and xp home before the login window appears, and another 3 to browse the available shares. When i'm in a share, browsing is going at the normal speed. But the connection times out sometimes.....

remember:
apache and postfix are not working any more. In apache, i use mod_rewrite to rewrite every undefined virtual host to mydomain.com, including ip's. So when i go to my ip, i will be redirected to mydomain.com. This worked fine, before the power failure


Maybe something went wrong with the drivers? HOW To check that? My two cards have different brands

Please reply!
 
Old 01-21-2005, 08:47 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,230
Blog Entries: 1

Rep: Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085Reputation: 2085
Run:
Code:
ifconfig
to verify your network settings
If they are OK then run:
Code:
route
to see if your gateway is setup correctly
If not, then:
Code:
route add default gw xx.xx.xx.xx
where xx.xx.xx.xx is the IP of your gateway (router, modem whatever connects to to the net)
 
Old 01-21-2005, 05:50 PM   #5
faked
LQ Newbie
 
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6

Original Poster
Rep: Reputation: 0
not solved, some more info's and configs

ifconfig returns:

Code:
eth0      Link encap:Ethernet  HWaddr 00:50:FC:EE:34:F3
          inet addr:10.0.0.1  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6676 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2755 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2015203 (1.9 MiB)  TX bytes:246047 (240.2 KiB)
          Interrupt:11 Base address:0x1800

eth1      Link encap:Ethernet  HWaddr 00:50:BF:98:09:5C
          inet addr:10.0.0.2  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2419 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8753 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:450359 (439.8 KiB)  TX bytes:697012 (680.6 KiB)
          Interrupt:11 Base address:0x1000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:6298 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6298 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:484848 (473.4 KiB)  TX bytes:484848 (473.4 KiB)
this seems to be OK, I think.


running route, I get this:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.0.0.0       U     0      0        0 eth1
localnet        *               255.0.0.0       U     0      0        0 eth0
i didn't thought this was ok, so i did route add default gw 10.0.0.250 (my gateway, working fine) and rebooted.
now route shows:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
localnet        *               255.0.0.0       U     0      0        0 eth1
localnet        *               255.0.0.0       U     0      0        0 eth0
default         10.0.0.250      0.0.0.0         UG    0      0        0 eth0
default         10.0.0.250      0.0.0.0         UG    0      0        0 eth1
note: i was playing around with postfix before this shit started happening

pinging to outside lan keeps timing out

but my resolv.conf is again empty after boot!

i checked out the debian page about networking http://www.debian.org/doc/manuals/re...teway.en.html,
installed the sendmail package instead of postfix (was still in cache)
and commented out everything in /etc/network/if-down.d/sendmail and /etc/network/if-up.d/sendmail

i restarted all interfaces (eth0, eth1, lo) using ifdown interfacename and ifup too.

Now, dns lookups are still not being made!

finally, this is in /etc/network/interfaces:

Code:
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo eth0 eth1
iface lo inet loopback
# The primary network interface

iface eth0 inet static
        address 10.0.0.1
        netmask 255.0.0.0
        network 10.0.0.0
        broadcast 10.255.255.255
        dns-nameservers 194.159.73.135 194.159.73.136 194.159.73.137
        #dns-search thuis
        gateway 10.0.0.250
        # dns-* options are implemented by the resolvconf package, if installed

iface eth1 inet static
        address 10.0.0.2
        netmask 255.0.0.0
        broadcast 10.255.255.255
        network 10.0.0.0
        gateway 10.0.0.250

what to do? I don't know any about the resolvconf package, which may be the cause?

tnx again, faked

EDIT:

route -n (found on the wiki page about networking) doesn't help

/EDIT

EDIT:

samba is now quick, like it was before this problem. But the problems remain...

/EDIT

Last edited by faked; 01-22-2005 at 04:08 AM.
 
Old 01-24-2005, 07:42 AM   #6
faked
LQ Newbie
 
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6

Original Poster
Rep: Reputation: 0
Angry problem found???

I think the problem has been found, but not solved:

"route" gives:

Code:
localnet        *               255.0.0.0       U     0      0        0 eth0
localnet        *               255.0.0.0       U     0      0        0 eth1
default         10.0.0.250      0.0.0.0         UG    0      0        0 eth1
default         10.0.0.250      0.0.0.0         UG    0      0        0 eth0
it takes about 20 seconds to let the last two lines appear.....

I think localnet should use the lo interface, isn't????

also, /etc/resolv.conf keeps getting cleaned. When i save something, it stayes, but after an hour or so, the file is empty.

This server is NOT functioning as a dns server. Though, I tried
Code:
dpkg-reconfigure bind9
, I got this:
Code:
altijd:/etc# dpkg-reconfigure bind9
Stopping domain name service: namedrndc: connect failed: connection refused
.
update-rc.d: warning: /etc/rc2.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc3.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc4.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc5.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc2.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc3.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc4.d/K15bind9 is not a link to ../init.d/bind9
update-rc.d: warning: /etc/rc5.d/K15bind9 is not a link to ../init.d/bind9
restarting bind myself gives no errors. The /var/log/bind9-query.log file is empty!

CAN SOMEONE HELP PLEASE?
 
Old 01-25-2005, 01:05 PM   #7
faked
LQ Newbie
 
Registered: Jan 2005
Location: holland
Distribution: debian sarge
Posts: 6

Original Poster
Rep: Reputation: 0
SOLVED!

problem solved!

I found /etc/resolv.conf was pointing to /etc/resolvconf/run/resolv.conf, something which has to do with a package "resolvconf" (used for dhcp) which wasn't removed well because of power failure.

I renamed the link, and created a /etc/resolv.conf containing
Code:
 nameserver xx.xx.xx.xx
nameserver yy.yy.yy.yy
nameserver zz.zz.zz.zz
and chmodded it 755.

Everything (nslookup, dig, apache) works like before. The brand new file stays there after boot.

Thanx to the people of the debian user list !

------
faked
--------
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian-Sarge never fails to surprise me........ Monkey 9 Debian 7 12-08-2005 06:40 AM
New install of Debian Sarge fails to boot Joe4 Linux - Hardware 3 11-18-2005 10:22 AM
problem with DNS resolving on Debian sarge 3.1 Mr. Asdf Linux - Networking 6 10-22-2005 06:12 PM
Debian Sarge 3.1 LXF70 XWindows fails to start - Missing symbols cgtueno Debian 1 09-05-2005 09:07 AM
X-Windows fails to start & other Debian sarge install issues tommilo Linux - Newbie 30 03-02-2005 09:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration