View previous topic :: View next topic |
Author |
Message |
net n00b
Joined: 18 Mar 2006 Posts: 5
|
Posted: Thu Apr 24, 2014 7:07 pm Post subject: blank resolv.conf after some time |
|
|
for some time I use a amd64 setup.
Code: |
Linux gentoo-x64-src 3.12.13-gentoo #2 SMP Sun Apr 13 20:59:30 CEST 2014 x86_64 Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz GenuineIntel GNU/Linux
|
and lose the resolv.conf after some time. It can work for 1 day or 1 week.
It never worked correctly with this or older kernels.
my /etc/conf.d/net is :
Code: |
config_eth0="dhcp"
dhcp_eth0="nontp nonis"
|
when it happen i get:
Code: |
!!! getaddrinfo failed for 'rsync.fr.gentoo.org': [Errno 111] Connection refused
|
and resolv.conf is empty:
Code: |
gentoo-x64-src ~ # cat /etc/resolv.conf
gentoo-x64-src ~ #
|
to resolve it, i restart the interface:
Code: |
gentoo-x64-src ~ # /etc/init.d/net.eth0 restart
* Bringing down interface eth0
* Stopping dhcpcd on eth0 ... [ ok ]
* Bringing up interface eth0
* dhcp ...
* Running dhcpcd ...
dhcpcd[21743]: sending commands to master dhcpcd process [ ok ]
* received address [ ok ]
gentoo-x64-src ~ #
gentoo-x64-src ~ # cat /etc/resolv.conf
# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
domain sk.loc
nameserver 192.168.0.200
# /etc/resolv.conf.tail can replace this line
gentoo-x64-src ~ #
|
The ip is always good
The DHCP server:
Code: |
Linux sk-srv 3.12.13-gentoo #1 Thu Mar 27 22:32:47 CET 2014 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz GenuineIntel GNU/Linux
[ebuild R ] net-misc/dhcp-4.2.5_p1-r2 USE="client ldap server ssl -ipv6 (-selinux) -vim-syntax"
|
Any idea about that ? |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Apr 26, 2014 3:46 am Post subject: |
|
|
assuming nameserver 192.168.0.200 is correct
Code: | echo "nameserver 192.168.0.200" > /etc/resolv.conf.head
echo "nameserver 8.8.8.8" >> /etc/resolv.conf.head |
or
/etc/conf.d/net:
Quote: | dns_servers="192.168.0.200 8.8.8.8"
config_eth0="dhcp"
dhcp_eth0="nontp nonis nodns" |
may or may not fix the problem since the cause of the erasure is not known. _________________ Defund the FCC. |
|
Back to top |
|
|
net n00b
Joined: 18 Mar 2006 Posts: 5
|
Posted: Sat Apr 26, 2014 5:11 pm Post subject: |
|
|
Good workaround, but I need to make it work with DNS pushed by the DHCP server.
What can I try to grab more informations:
Network trace, Kernel parameter,.... ?
One more information : It run as VM in a VMware Workstation 10.0.2 on a Windows 8.1 Pro, 64-bit PC
Should move to a ESX farm later |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Apr 26, 2014 7:49 pm Post subject: |
|
|
dmesg
/var/log/rc.log after enabling logging in /etc/rc.conf
run wireshark or the like on the interface _________________ Defund the FCC. |
|
Back to top |
|
|
queen Veteran
Joined: 19 Jul 2005 Posts: 1642
|
Posted: Sat Apr 26, 2014 8:57 pm Post subject: |
|
|
DONAHUE wrote: | assuming nameserver 192.168.0.200 is correct
Code: | echo "nameserver 192.168.0.200" > /etc/resolv.conf.head
echo "nameserver 8.8.8.8" >> /etc/resolv.conf.head |
or
/etc/conf.d/net:
Quote: | dns_servers="192.168.0.200 8.8.8.8"
config_eth0="dhcp"
dhcp_eth0="nontp nonis nodns" |
may or may not fix the problem since the cause of the erasure is not known. |
I have the same problem with /etc/resolv.conf. My workaround is to copy a backup of the nameservers that I have, into /etc/resolv.conf. I don't know why it gets empty. |
|
Back to top |
|
|
net n00b
Joined: 18 Mar 2006 Posts: 5
|
Posted: Fri May 09, 2014 9:00 pm Post subject: |
|
|
I found this in the logs:
May 9 21:42:39 gentoo-x64-src dhcpcd[3301]: eth0: IAID 29:4c:d9:c1
May 9 21:42:39 gentoo-x64-src dhcpcd[3301]: eth0: IAID conflicts with one assigned to eth0
May 9 21:42:39 gentoo-x64-src dhcpcd[3301]: eth0: rebinding lease of 192.168.0.103
May 9 21:42:39 gentoo-x64-src dhcpcd[3301]: lo: unsupported interface type 00, falling back to ethernet
May 9 21:42:39 gentoo-x64-src dhcpcd[3301]: lo: IAID 00:00:01:00
May 9 21:42:39 gentoo-x64-src dhcpcd[3301]: lo: needs a clientid to configure
May 9 21:42:42 gentoo-x64-src kernel: [523345.765316] dhcpcd[3301]: segfault at 60a2 ip 00000000004119cf sp 00007fff0a2a2eb0 error 4 in dhcpcd[400000+1d000]
my /etc/conf.d/net file
Code: |
config_eth0="dhcp"
dhcp_eth0="nontp nonis"
|
result of /etc/init.d/net.eth0 restart
Code: |
gentoo-x64-src ~ # /etc/init.d/net.eth0 restart
* Caching service dependencies ... [ ok ]
* Bringing down interface eth0
* Caching network module dependencies
need firewalld
* Bringing up interface eth0
* dhcp ...
* Running dhcpcd ...
dhcpcd[24275]: control_open: Connection refused
dhcpcd[24275]: version 6.2.0 starting
dhcpcd[24275]: eth0: waiting for carrier
dhcpcd[24275]: eth0: carrier acquired
dhcpcd[24275]: DUID 00:01:00:01:1a:dd:b9:44:00:0c:29:4c:d9:c1
dhcpcd[24275]: eth0: IAID 29:4c:d9:c1
dhcpcd[24275]: eth0: soliciting a DHCP lease
dhcpcd[24275]: eth0: offered 192.168.0.103 from 192.168.0.200
dhcpcd[24275]: eth0: leased 192.168.0.103 for 300 seconds
dhcpcd[24275]: eth0: adding route to 192.168.0.0/24
dhcpcd[24275]: eth0: adding default route via 192.168.0.254
dhcpcd[24275]: forked to background, child pid 24307 [ ok ]
* received address 192.168.0.103/24 [ ok ]
|
Any idea ? |
|
Back to top |
|
|
vaxbrat l33t
Joined: 05 Oct 2005 Posts: 731 Location: DC Burbs
|
Posted: Sat May 10, 2014 5:51 am Post subject: dhcp will mod /etc/resolv.conf |
|
|
One thing to note is that the dhcp setup will modify the /etc/resolv.conf file based on "option" records that got put into the lease pool that it manages. It looks like your dhcp server has an option record for the default route but maybe not ones that set the domain-name nor the dns-name-servers. That will tend to whack you with a blank resolv.conf file.
Another possible culprit is network-mangler (err, network-manager) but that tends to only rear its ugly head around my Redhat and Fedora boxes.
If your dhcp servers are brain dead, you might try putting something like the following into your /etc/conf.d/net file:
Code: |
dns_domain_eth0="example.com"
dns_servers_eth0="xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy zzz.zzz.zzz.zzz"
dns_search_eth0="example.com"
|
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sat May 10, 2014 8:40 am Post subject: |
|
|
net,
The following /etc/dhcp/dhcpd.conf covers my wireless segment
Code: | # wireless
# lease times from 1 to 4 hours
# option interface-mtu 1492 for PPoE
subnet 192.168.54.0 netmask 255.255.255.0 {
range 192.168.54.220 192.168.54.239;
default-lease-time 3600;
max-lease-time 14400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.54.255;
option routers 192.168.54.253;
option interface-mtu 1492;
} |
Globally I have
Code: | # we could run unbound and do our own dns but we don't
option domain-name "example.org";
option domain-name-servers 212.23.3.100,212.23.6.100; |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
|