Jails lose name resolution (DNS) after restart

Status
Not open for further replies.

Kirk Gleason

Cadet
Joined
Jan 31, 2015
Messages
6
All,
I'm certain that i probably screwed something up, but for the life of me I can't figure out what. I recently reconfigured my LAN with a new gateway and DNS server. I reconfigured FreeNAS with the new settings, and things seem to be working -- from the CLI I am able to ping around the internet.
After I reconfigured FreeNAS, I went into the jails, and noticed that none of the changes propagated to the jails -- seems to have been documented here: https://bugs.freenas.org/issues/3758 A quick reboot of the jails and all of the jails had the new gateway settings. However, none of them had any DNS resolution.
I'm certain that the DNS is working as expected (DHCP Clients all use the same server -- and it is really nothing more than PFSense box with dnsmasq running -- and the FreeNAS server itself is able to resolve names.
The quick fix was to `echo "nameserver X.X.X.X" >> /etc/resolv.conf` in each of the jails. Seemed to solve the issue. Until I restart a jail. Once I restart the jail, then all name resolution is once again lost. This same behavior has exhibited itself in both plugin and traditional jails.
Any thoughts on a way for name resolution to be persistent inside a jail?

Here are the vitals of the system:

Code:
Build: FreeNAS-9.3-STABLE-201502060108
Platform: AMD A6-5400K APU with Radeon(tm) HD Graphics
Memory: 7334MB


The ifconfig output from the main FreeNAS host:
Code:
~# ifconfig
re0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKSTATE>
    ether fc:aa:14:54:d9:ae
    inet 10.0.0.6 netmask 0xffffff00 broadcast 10.0.0.255
    nd6 options=9<PERFORMNUD,IFDISABLED>
    media: Ethernet autoselect (1000baseT <full-duplex>)
    status: active
ipfw0: flags=8801<UP,SIMPLEX,MULTICAST> metric 0 mtu 65536
    nd6 options=9<PERFORMNUD,IFDISABLED>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x8
    inet 127.0.0.1 netmask 0xff000000
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 02:53:2d:e6:4a:00
    nd6 options=1<PERFORMNUD>
    id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
    maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200
    root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
    member: epair5a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
           ifmaxaddr 0 port 15 priority 128 path cost 2000
    member: epair4a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
           ifmaxaddr 0 port 14 priority 128 path cost 2000
    member: epair3a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
           ifmaxaddr 0 port 13 priority 128 path cost 2000
    member: epair2a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
           ifmaxaddr 0 port 12 priority 128 path cost 2000
    member: epair1a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
           ifmaxaddr 0 port 11 priority 128 path cost 2000
    member: epair0a flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
           ifmaxaddr 0 port 10 priority 128 path cost 2000
    member: re0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
           ifmaxaddr 0 port 1 priority 128 path cost 20000
epair0a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 02:11:67:00:0a:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 02:e2:d7:00:0b:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
epair2a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 02:da:fc:00:0c:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
epair3a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 02:7b:79:00:0d:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
epair4a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 02:94:08:00:0e:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active
epair5a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 02:02:f6:00:0f:0a
    nd6 options=1<PERFORMNUD>
    media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
    status: active


/etc/resolv.conf from the host:
Code:
~# cat /etc/resolv.conf
search home
nameserver 10.0.0.2
nameserver 8.8.8.8


Thanks in advance!
 
Last edited:
D

dlavigne

Guest
The bug you referred to hasn't been fixed, which is why this still happens. It might not hurt to add a comment asking about its status. In the meantime, the work-around you mentioned is correct.
 

JJD

Dabbler
Joined
Jan 17, 2014
Messages
22
is this still an open issue? I am having the same problem on one of my servers running FreeNAS-9.3-STABLE-201509282017 is there an easy less 'hands on' solution? does anyone happen to know where the ticket is on it? i searched but couldn't find one
 

dredhorse

Dabbler
Joined
Jan 6, 2017
Messages
13
I'm also missing the nameserver in the resolv.conf in jails after a restart. Does somebody know a working workaround for this? (Except manually editing the resolv.conf file in every jails).

Why is the resolv.conf reset?
 

Kirk Gleason

Cadet
Joined
Jan 31, 2015
Messages
6
I'm also missing the nameserver in the resolv.conf in jails after a restart. Does somebody know a working workaround for this? (Except manually editing the resolv.conf file in every jails).

Why is the resolv.conf reset?

I ended up setting up DHCP reservations for my jails, and then switching them over to use DHCP. Seems to have worked around the issue.
 
Status
Not open for further replies.
Top