iocage network issues

Status
Not open for further replies.

Drew Heath

Explorer
Joined
Mar 7, 2016
Messages
80
For the life of me I am not able to get a network connection in an iocage jail. If I create a jail for warden in the old UI, the jail comes up and networking is fine.

I am creating the iocage jail from the CLI using the following command:

iocage create -n "test" -r 11.1-RELEASE ip4_addr="vnet0|10.250.0.100/24" defaultrouter="10.250.0.1" vnet="on" allow_raw_sockets="1" boot="on"

No other configuration, I am just accessing the jail with jexec, trying to ping and getting 100% loss.


root@test:/ # ping 10.250.0.1
PING 10.250.0.1 (10.250.0.1): 56 data bytes
^C
--- 10.250.0.1 ping statistics ---
3 packets transmitted, 0 packets received, 100.0% packet loss


The network looks like:

root@test:/ # 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>
groups: lo
vnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 02:ff:60:ae:1b:76
hwaddr 02:bf:20:00:0b:0b
inet 10.250.0.249 netmask 0xffffff00 broadcast 10.250.0.255
nd6 options=1<PERFORMNUD>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
groups: epair


Thank you in advance for your time!
 

kazooless

Dabbler
Joined
Aug 9, 2013
Messages
32
I'm running version FreeNAS-11.1-RELEASE and can confirm the same problem. Adding tunables as mentioned above fixed it.


Tunables.png
 

Beep

Dabbler
Joined
Dec 28, 2017
Messages
21
Even after these tunables my iocage jail can't ping. (using latest nightly)

root@test:~ # ifconfig
lo0: flags=8008<LOOPBACK,MULTICAST> metric 0 mtu 16384
options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
groups: lo
epair0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether
hwaddr
inet 192.168.2.11 netmask 0xffffff00 broadcast 192.168.2.255
nd6 options=1<PERFORMNUD>
media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
status: active
groups: epair
Why epair0 and not vnet0 ?

Define was:
Code:
iocage create -n "test" -r 11.1-RELEASE ip4_addr="vnet0|192.168.2.11/24" defaultrouter="192.168.2.1" vnet="on" allow_raw_sockets="1" boot="on"
 

Brandon Schneider

Arbiter of iocage
iXsystems
Joined
Nov 12, 2015
Messages
12
iocage had to change back to calling them epair0 in the jail as it turned out Plex (and probably others) ignored network interfaces starting with v! That was a fun issue to find out, but the nomenclature at the cli was kept the same so existing tutorials and such would work. You can supply anything you want instead of vnet0 and that's what the interface should be named in the jail. But if you keep vnet0, it will be epair0 in the jail :)
 

Beep

Dabbler
Joined
Dec 28, 2017
Messages
21
After downgrading from latest Nightly to latest stable iocage network is working again.
 

Beep

Dabbler
Joined
Dec 28, 2017
Messages
21
With 11.1 U2 from yesterday my iocage server isn't able to bind a port:
2018-02-21 9:09:04 34422743040 [Note] Server socket created on IP: '::'.
2018-02-21 9:09:04 34422743040 [ERROR] Can't start server: Bind on TCP/IP port. Got error: 49: Can't assign requested address
2018-02-21 9:09:04 34422743040 [ERROR] Do you already have another mysqld server running on port: 3306 ?
2018-02-21 9:09:04 34422743040 [ERROR] Aborting
Code:
killall -9 mysqld

No matching processes were found
May it be related to the network? Haven't changed it since 11.1 U1.
 

der_Chris

Cadet
Joined
Feb 21, 2018
Messages
5
I'm having the same Problem with my Plex Server.
The Server has just been set up again yesterday running 11.1-U1, working fine. Today Updated to U2 and getting an error, the Port couldn't be bound:

Feb 21, 2018 09:24:36.303 [0x80a216000] ERROR - HttpServer: Error binding acceptor: Can't assign requested address
 

crumbz

Explorer
Joined
Nov 7, 2013
Messages
63
I'm having the same Problem with my Plex Server.
The Server has just been set up again yesterday running 11.1-U1, working fine. Today Updated to U2 and getting an error, the Port couldn't be bound:

Feb 21, 2018 09:24:36.303 [0x80a216000] ERROR - HttpServer: Error binding acceptor: Can't assign requested address

Same here. Running fine on 11.1-U1 and the same error message as you on 11.1-U2.
 

Celena

Dabbler
Joined
Dec 6, 2016
Messages
13
I'm having the same Problem with my Plex Server.
The Server has just been set up again yesterday running 11.1-U1, working fine. Today Updated to U2 and getting an error, the Port couldn't be bound:

Feb 21, 2018 09:24:36.303 [0x80a216000] ERROR - HttpServer: Error binding acceptor: Can't assign requested address
Same here. Running fine on 11.1-U1 and the same error message as you on 11.1-U2.

Hello;

in the /etc/rc.conf of your jail add :
Code:
ifconfig_epair0_name="epair0b"
OR if you don't want to manually edit the file, send command inside the jail : sysrc ifconfig_epair0_name="epair0b"
after restart the jail

you can replace "epair0b" by "eth0" too
 
Last edited:

Beep

Dabbler
Joined
Dec 28, 2017
Messages
21
Hello;

in the /etc/rc.conf of your jail add :
Code:
ifconfig_epair0_name="eth0"
OR if you don't want to manually edit the file, send command inside the jail : sysrc ifconfig_epair0_name="eth0"
after restart the jail
I rolled back to 11.1-U1 and it's working again. Maybe I give 11.1-U2 later a second try and will try your suggestion.

Have you had the same issue with 11.1-U2 and got it fixed with it?


I think eth0 has to be changed to the network name my FreeNAS server is using as primary?
 

Celena

Dabbler
Joined
Dec 6, 2016
Messages
13
I rolled back to 11.1-U1 and it's working again. Maybe I give 11.1-U2 later a second try and will try your suggestion.

Have you had the same issue with 11.1-U2 and got it fixed with it?


I think eth0 has to be changed to the network name my iocage is using? vnet0 or epair0 ?

yes this solve the problem : sysrc ifconfig_epair0_name="epair0b", maybe Plex doesn't like "epair0" normally epair is noted "epair0a" or "epair0b"
 
Last edited:

crumbz

Explorer
Joined
Nov 7, 2013
Messages
63
Hello;

in the /etc/rc.conf of your jail add :
Code:
ifconfig_epair0_name="eth0"
OR if you don't want to manually edit the file, send command inside the jail : sysrc ifconfig_epair0_name="eth0"
after restart the jail

you can replace "eth0" by "epair0b" too

This solved it for me, thanks.
 
Joined
Dec 22, 2017
Messages
13
I stumbled over this yesterday night when I upgraded to 11.1-U2. At that time I didn't know about this workaround and so just assigned 127.0.0.1 to my loopback interface in the jail. That got me back online, but it's a hack nevertheless.

@Celena Thank you for sharing! TBH, I don't fully understand what the sysrc ifconfig_epair0_name does. Could anyone briefly explain?
 

Celena

Dabbler
Joined
Dec 6, 2016
Messages
13
I stumbled over this yesterday night when I upgraded to 11.1-U2. At that time I didn't know about this workaround and so just assigned 127.0.0.1 to my loopback interface in the jail. That got me back online, but it's a hack nevertheless.

@Celena Thank you for sharing! TBH, I don't fully understand what the sysrc ifconfig_epair0_name does. Could anyone briefly explain?

Simply rename interface epair0 to another name
 
Joined
Dec 22, 2017
Messages
13
Ha, I got that piece. But why does that fix the bind issue? I guess we all have mysql/mariadb binding to a port on localhost, isn't it?
 

Celena

Dabbler
Joined
Dec 6, 2016
Messages
13
Ha, I got that piece. But why does that fix the bind issue? I guess we all have mysql/mariadb binding to a port on localhost, isn't it?
in setting bind = :: say to bind on all interface not only to loopback (commented #bind ... is the same).
to bind only one you specify an ip adress like you have done bind = 127.0.0.1
Not sure about this:
Maybe Mysql/MariaDB doesn't like epair0 for name interface and stop when you want to bind on all interface; but in loopback only it doesn't try to bind on epair0 and start normally
 

Kuro Houou

Contributor
Joined
Jun 17, 2014
Messages
193
This "fix" seemed to work once for me. But after rebooting my entire freenas server I can't get my iocage to work again.. Tried renaming that interface, epair0a, epair0b, eth0.. nothing works now :(
 
Status
Not open for further replies.
Top