Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

jail not working with DHCP

Western Digital Drives - The Preferred Drives of FreeNAS and TrueNAS CORE
Status
Not open for further replies.

Stubb

Member
Joined
Apr 11, 2015
Messages
27
I'm having this problem as well running on a FreeNAS Mini. I blew away an jail created under 9.3 and replaced it with a fresh one generated by my system running
FreeNAS-9.10-STABLE-201605240427 (64fcd8e). The jail boots and does not have an IP address, but logging into the jail and running "dhclient epair4b" retrieves one. Rebooting the jail gives the following lines in the main system log:

Code:
May 26 16:43:55 davros kernel: epair4a: link state changed to DOWN
May 26 16:43:55 davros kernel: epair4a: link state changed to DOWN
May 26 16:43:55 davros kernel: epair4b: link state changed to DOWN
May 26 16:43:55 davros kernel: epair4b: link state changed to DOWN
May 26 16:43:57 davros kernel: ifa_del_loopback_route: deletion failed: 48
May 26 16:43:57 davros Freed UMA keg (udp_inpcb) was not empty (240 items). Lost 24 pages of memory.
May 26 16:43:57 davros Freed UMA keg (udpcb) was not empty (2171 items). Lost 13 pages of memory.
May 26 16:43:57 davros Freed UMA keg (tcptw) was not empty (405 items). Lost 9 pages of memory.
May 26 16:43:57 davros Freed UMA keg (tcp_inpcb) was not empty (210 items). Lost 21 pages of memory.
May 26 16:43:57 davros Freed UMA keg (tcpcb) was not empty (63 items). Lost 21 pages of memory.
May 26 16:43:57 davros Freed UMA keg (ripcb) was not empty (60 items). Lost 6 pages of memory.
May 26 16:43:57 davros hhook_vnet_uninit: hhook_head type=1, id=1 cleanup required
May 26 16:43:57 davros hhook_vnet_uninit: hhook_head type=1, id=0 cleanup required
May 26 20:43:57 davros devd: Executing '/etc/pccard_ether epair4a start'
May 26 16:43:57 davros epair4a: Ethernet address: 02:ff:60:00:0a:0a
May 26 16:43:57 davros epair4b: Ethernet address: 02:ff:b0:00:0b:0b
May 26 16:43:57 davros kernel: epair4a: link state changed to UP
May 26 16:43:57 davros kernel: epair4a: link state changed to UP
May 26 16:43:57 davros kernel: epair4b: link state changed to UP
May 26 16:43:57 davros kernel: epair4b: link state changed to UP
May 26 16:43:57 davros kernel: epair4a: promiscuous mode enabled
May 26 20:43:57 davros devd: Executing '/etc/pccard_ether epair4b start'
May 26 20:43:57 davros devd: Executing '/etc/rc.d/dhclient quietstart epair4a'
May 26 16:43:58 davros kernel: ng_ether_ifnet_arrival_event: can't re-name node epair4b
May 26 16:43:58 davros kernel: ng_ether_ifnet_arrival_event: can't re-name node epair4b 


I'm not sure what epair4a is all about. The interface epair4b has the address that I assigned in jail configuration.

I can then log into the jail and do:

Code:
root@remote_1:/ # ifconfig
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 0x1
inet 127.0.0.1 netmask 0xff000000
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
epair4b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:c4:0f:00:0a:0b
inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255
nd6 options=9<PERFORMNUD,IFDISABLED>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
root@remote_1:/ # dhclient epair4b
DHCPREQUEST on epair4b to 255.255.255.255 port 67
DHCPACK from 10.0.0.1
bound to 10.0.0.108 -- renewal in 43200 seconds.
root@remote_1:/ #
 
Joined
May 29, 2016
Messages
5
Hey, brand new FreeNAS user, and I seem to have run into this too. The one new tidbit I can share is my plugins/jails work fine for the first plugin installed, but if I install a second, it starts failing. If I use the GUI interface to get to a jail's shell, and run the dhclient INTERFACE command, it grabs an IP, but it grabs the same IP for both jails. I looked closer at the ifconfig output and found that while each jail has a differently-named network interface (one is epair0b and the other is epair1b), they have the same MAC address, so my router is giving them the same IP address. Making a new jail manually creates a new MAC address, and it gets a new IP address assigned.

I'm running on a hand-me-down PowerEdge 2950 server, which has two NIC cards, but I've only got one plugged in right now, which has been noted might cause an issue in the current version of FreeNAS if it tries to look up information using the other NIC?
 

PhilZJ81

Member
Joined
Mar 29, 2016
Messages
94
I ran into an issue with my 9.10 jails on clean install as well, I was on "FreeNAS-9.10-STABLE-201605240427". I also had a different issue where from my jail it couldn't connect out to install an application. What fixed it in my case was setting the default gateway under Network -> global configuration, then a reboot. Perhaps it was 2 different issues though, but I'm posting here because I'm also interested in the issue.
 

melloa

Dedicated Sage
Joined
May 22, 2016
Messages
1,726
Never had a problem with the 2950s on 9.3. In fact one of them was on two network at the same time, so I could use the Clonezilla CIFS from both network without any special configuration on my router (I'm lazy yes).
 

Marcet

Member
Joined
May 31, 2013
Messages
193
Done.
 

Tom_

Member
Joined
Jan 4, 2015
Messages
62
@sharky I've just added a link to the earlier bug report in your bug report.
 

Silwanyx

Junior Member
Joined
Oct 18, 2014
Messages
19
Hi all

Just to inform everyone, if someone has the problem with starting the Syncthing plugin after updating it, i found the problem! (If you click on Syncthing plugin button to start it, but, it won't turn "On", it stay "Off")

Here is the steps i have done, and my Syncthing WORK AGAIN:

For some reason, after updating it, the "syncthing" binary on:
"/mnt/(your mnt pool)/jails/syncthing_1/usr/pbi/syncthing-amd64/bin/"

and on:
"mnt/(your mnt pool)/jails/syncthing_1/usr/pbi/syncthing-amd64/bin/ST"

IS NOT THERE, disapeared (on ".../ST" folder not there, but on ".../bin" folder, transformed on "syncthing" symlink folder, which is wrong.

I have simply installed another copy of Syncthing plugin, and checked his folders, and have found, that the binary's from this 2 folders are missing. Perhaps, on:

"mnt/(your mnt pool)/jails/syncthing_1/usr/pbi/syncthing-amd64/bin/"

is transformed in a folder symlink, and the bin was not there.

I have deleted this symlink folder, because, on the other copy of Syncthing plugin, this symlink was not there, and if "syncthing" folder shortcut exist there, you won't be able to copy or to put the synthing binary there. Therefore, you should delete this "syncthing" folder symlink, and put there a copy of synthing binary.

I have just simply copyed the entire "mnt/(your mnt pool)/jails/syncthing_1/usr/pbi/syncthing-amd64/bin" folder from the 2nd installed copy of syncthing plugin to my PC, and from there, copyed to my first Syncthing plugin on "mnt/(your mnt pool)/jails/syncthing_1/usr/pbi/syncthing-amd64/bin/", but, it was just this 2 binary files that was missed there, and this was the problem, if i clicked on FreeNAS GUI to start the Syncthing plugin, the indicator won't turn to "On", just keep stay off.

I hope this would help many people out there with the starting Syncthing plugin after updating it.

Salutations.
 

Pinz

Newbie
Joined
Jul 9, 2016
Messages
1
It's my first time setting up FreeNAS and using FreeBSD and I think I'm running into this issue. I thought I was doing something wrong trying to configure a plugin but I couldn't figure it out. The only thing that seemed to work was to set a static IP instead of DHCP.

I also noticed if I ran "dhclient epair1b" manually, that also seemed to fix it. Only temporarily, however.

Is there a way to add "dhclient" during the jail startup?

Thanks
 

melloa

Dedicated Sage
Joined
May 22, 2016
Messages
1,726
It's my first time setting up FreeNAS and using FreeBSD and I think I'm running into this issue. I thought I was doing something wrong trying to configure a plugin but I couldn't figure it out. The only thing that seemed to work was to set a static IP instead of DHCP.

I also noticed if I ran "dhclient epair1b" manually, that also seemed to fix it. Only temporarily, however.

Is there a way to add "dhclient" during the jail startup?

Thanks
First things first: Welcome.

Now... In order to better help the folks here will need some information about your system: Configuration (cpu/ram/hds/pools/etc), FN version installed, etc. Check https://forums.freenas.org/index.php?threads/forum-rules.22553/

Also check the bug I've opened: https://bugs.freenas.org/issues/15817. You will find there what has worked for me.
 

Tom_

Member
Joined
Jan 4, 2015
Messages
62
@melloa, your system is working with a tunable for "kern.chroot_allow_open_directories=2"?

It looks like the devs have tracked down the bug so I'll wait for their fix to appear in STABLE. But good to know there's a workaround. Thanks!
 

melloa

Dedicated Sage
Joined
May 22, 2016
Messages
1,726
@melloa, your system is working with a tunable for "kern.chroot_allow_open_directories=2"?
Yes, my FNs are running fine with that workaround since posted by devs.
 

Tom_

Member
Joined
Jan 4, 2015
Messages
62
It looks like bug 15817 is now fixed in STABLE. Anyone tried it?

Code:
Version: FreeNAS-9.10.1
Changelog:
...
#15817  Bug     Expected        Plugins not obtaining an IP from DHCP
...
 

melloa

Dedicated Sage
Joined
May 22, 2016
Messages
1,726
Not on my system.
 

Attachments

twk95

Junior Member
Joined
Oct 27, 2015
Messages
13
It looks like bug 15817 is now fixed in STABLE. Anyone tried it?

Code:
Version: FreeNAS-9.10.1
Changelog:
...
#15817  Bug     Expected        Plugins not obtaining an IP from DHCP
...
Seems to be working fine for me now. No more 'dhclient epairxb'.
 

MindBender

Member
Joined
Oct 12, 2015
Messages
66
It looks like bug 15817 is now fixed in STABLE. Anyone tried it?
I had this problem when creating a Jail this afternoon, found this topic and updated my box just a moment ago: I can confirm that updating fixed this problem, even for a standard jail I created before the update. I was, and am still, running 9.10 STABLE.

However, it also introduced a problem for the Jails I created under 9.3 for Plex and VirtualBox. Both were receiving DHCP addresses before the update, and after the update they still do, but the VMs cannot be started due to an error about epair1b. I can fix this by switching the VMs over to epair2b, but as far as I remember, I always had just one, and that was epair1b.
 
Last edited:

melloa

Dedicated Sage
Joined
May 22, 2016
Messages
1,726
Can't confirm. Out of my 4 boxes, only one is getting an IP from DHCP. Even that one still messing up with the Static Internet Protocol (spelling this time) configuration. I can create the jail, get an IP from the DHCP, change it to Static IP, and when open that jail configuration, FN overwrites my configuration changing it to DHCP again.

Will get my test box back, install fresh and test when have time.
 

getsnoopy

Newbie
Joined
Nov 24, 2016
Messages
1
As it's been discussed in Issue 15817, this seems like a JavaScript bug in the GUI interface where checking the IPv4 DHCP checkbox doesn't work because it expects the IPv4 address field to be set to the value DHCP, instead of filling it out when the checkbox is selected as is the case for the IPV6 DHCP checkbox. Manually typing the value into the address box and then checking the checkbox worked for me, even after restarting the jail.
 
Status
Not open for further replies.
Top