resolv.conf keeps changing by itself
-
- Posts: 29
- Joined: Fri Sep 12, 2014 11:16 pm
- Location: NL
- ZCS/ZD Version: Release 8.8.15_GA_3869.RHEL7_64_201
- Contact:
resolv.conf keeps changing by itself
I installed Zimbra on a new VM but after a restart of zimbra my /etc/resolv.conf gets changed.
When I restart zimbra (zmcontrol restart as zimbra user) at the top of /etc/resolv.conf appears a line "nameserver 127.0.0.1"
Anyone have a sollution for this problem?
At first I thought I did something wrong, but now it is happening on a second server also.
The technical details:
VM1: CentOS 7 - Firewall and PowerDNS (192.168.52.201 - firewall.mydomain.home)
VM2: CentOS 7 - Zimbra Release 8.6.0_GA_1153.RHEL7_64_20141215151110 RHEL7_64 FOSS edition, Patch 8.6.0_P4 (192.168.52.203 - zimbra.mydomain.home)
#cat /etc/resolv.conf:
domain mydomain.home
search mydomain.home
nameserver 192.168.52.201
nameserver 8.8.8.8
#cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.52.202 zimbra.mydomain.home zimbra
When I restart zimbra (zmcontrol restart as zimbra user) at the top of /etc/resolv.conf appears a line "nameserver 127.0.0.1"
Anyone have a sollution for this problem?
At first I thought I did something wrong, but now it is happening on a second server also.
The technical details:
VM1: CentOS 7 - Firewall and PowerDNS (192.168.52.201 - firewall.mydomain.home)
VM2: CentOS 7 - Zimbra Release 8.6.0_GA_1153.RHEL7_64_20141215151110 RHEL7_64 FOSS edition, Patch 8.6.0_P4 (192.168.52.203 - zimbra.mydomain.home)
#cat /etc/resolv.conf:
domain mydomain.home
search mydomain.home
nameserver 192.168.52.201
nameserver 8.8.8.8
#cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.52.202 zimbra.mydomain.home zimbra
-
- Posts: 29
- Joined: Fri Sep 12, 2014 11:16 pm
- Location: NL
- ZCS/ZD Version: Release 8.8.15_GA_3869.RHEL7_64_201
- Contact:
resolv.conf keeps changing by itself
The change occurs when dnscache is started
resolv.conf keeps changing by itself
The resolv.conf gets changed because you're using DHCP to allocate an IP address, this is nothing to do with Zimbra.
-
- Posts: 29
- Joined: Fri Sep 12, 2014 11:16 pm
- Location: NL
- ZCS/ZD Version: Release 8.8.15_GA_3869.RHEL7_64_201
- Contact:
resolv.conf keeps changing by itself
@phoenix:
This is NOT a DHCP-problem, cause the VMs both use static IPs.
The changing is being done by dnscache when it is started after zmconfigd.
I verified this by monitoring the /etc/resolv.conf during a restart of zimbra
This is NOT a DHCP-problem, cause the VMs both use static IPs.
The changing is being done by dnscache when it is started after zmconfigd.
I verified this by monitoring the /etc/resolv.conf during a restart of zimbra
-
- Posts: 27
- Joined: Thu Jun 18, 2015 3:00 pm
resolv.conf keeps changing by itself
easy, you /etc/resolv.conf most like a:
search yourdomain.com
nameserver xx.xxx.xx.xx (ip dns)
in some cases, in the first line says: automatic update by ...... (something)
in the config of interface eth0, eth1 or something add or edit the attribute NM_CONTROLLED=no (this is the network manager)
search yourdomain.com
nameserver xx.xxx.xx.xx (ip dns)
in some cases, in the first line says: automatic update by ...... (something)
in the config of interface eth0, eth1 or something add or edit the attribute NM_CONTROLLED=no (this is the network manager)
resolv.conf keeps changing by itself
[quote user="jaapaikema"]@phoenix:
This is NOT a DHCP-problem, cause the VMs both use static IPs.
The changing is being done by dnscache when it is started after zmconfigd.
I verified this by monitoring the /etc/resolv.conf during a restart of zimbra[/quote]Well, it might help if you didn't leave out vital information from your problem description. This still isn't a Zimbra problem, it's a configuration problem as mentioned in the post above. You could always leave out dnscache, it's not obligatory and this doesn't happen on my server with the changes mentioned above. I'd suggest that in future you give a complete description of the problem and what you've done to try and debug it then you probably won't end up with half an answer. [;)]
This is NOT a DHCP-problem, cause the VMs both use static IPs.
The changing is being done by dnscache when it is started after zmconfigd.
I verified this by monitoring the /etc/resolv.conf during a restart of zimbra[/quote]Well, it might help if you didn't leave out vital information from your problem description. This still isn't a Zimbra problem, it's a configuration problem as mentioned in the post above. You could always leave out dnscache, it's not obligatory and this doesn't happen on my server with the changes mentioned above. I'd suggest that in future you give a complete description of the problem and what you've done to try and debug it then you probably won't end up with half an answer. [;)]
-
- Posts: 29
- Joined: Fri Sep 12, 2014 11:16 pm
- Location: NL
- ZCS/ZD Version: Release 8.8.15_GA_3869.RHEL7_64_201
- Contact:
resolv.conf keeps changing by itself
Removing dnscache does the trick.
Now after a "zmcontrol restart" resolv.conf is unaffected.
This is however not realy a satisfatory soluting.
The initial problem still exsists and is somehow connected to the dnscaching function.
Now after a "zmcontrol restart" resolv.conf is unaffected.
This is however not realy a satisfatory soluting.
The initial problem still exsists and is somehow connected to the dnscaching function.
resolv.conf keeps changing by itself
The problem isn't dnscache it's your nic configuration. As I mentioned earlier, if I have correctly configured fixed IP nics I don't see the behaviour you've described.
-
- Posts: 29
- Joined: Fri Sep 12, 2014 11:16 pm
- Location: NL
- ZCS/ZD Version: Release 8.8.15_GA_3869.RHEL7_64_201
- Contact:
resolv.conf keeps changing by itself
The NIC config:
NAME="Interface eth0"
DEVICE="eth0"
ONBOOT=yes
NM_CONTROLLED=no
IPV4_FAILURE_FATAL=no
BOOTPROTO=static
NETWORK=192.168.52.0
IPADDR=192.168.52.202
NETMASK=255.255.255.0
BROADCAST=192.168.52.255
GATEWAY=192.168.52.201
TYPE="Ethernet"
DEFROUTE=yes
PEERDNS=no
PEERROUTES=no
USERCTL=no
I don't see anything wrong with this config
NAME="Interface eth0"
DEVICE="eth0"
ONBOOT=yes
NM_CONTROLLED=no
IPV4_FAILURE_FATAL=no
BOOTPROTO=static
NETWORK=192.168.52.0
IPADDR=192.168.52.202
NETMASK=255.255.255.0
BROADCAST=192.168.52.255
GATEWAY=192.168.52.201
TYPE="Ethernet"
DEFROUTE=yes
PEERDNS=no
PEERROUTES=no
USERCTL=no
I don't see anything wrong with this config
Re: resolv.conf keeps changing by itself
The other thing you can do is hack around it by making it immutable.
chattr +i /etc/resolv.conf
chattr +i /etc/resolv.conf