Project

General

Profile

Bug #28627

Add the iocage host interface to the bridge and only rename if the default vnet0 interface is supplied

Added by A B over 1 year ago. Updated about 1 year ago.

Status:
Done
Priority:
Important
Assignee:
Brandon Schneider
Category:
OS
Target version:
Seen in:
Severity:
Med High
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

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

Workaround from Celena:

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

See this post and following: https://forums.freenas.org/index.php?threads/iocage-network-issues.60402/#post-439759


Related issues

Related to FreeNAS - Bug #28796: iocage vnet jail missing localhost IP on lo0Closed2018-02-25
Related to FreeNAS - Bug #40484: Add ability to customize default vnet interface to middlewareDone
Has duplicate FreeNAS - Bug #28631: Iocage Vnet not working in FreeNAS-11.1-U2Closed2018-02-21
Has duplicate FreeNAS - Bug #30276: Reuse existing bridge for VM's and jailsClosed

History

#1 Updated by Dru Lavigne over 1 year ago

  • Category set to OS
  • Assignee changed from Release Council to Brandon Schneider
  • Target version set to 11.2-BETA1

#2 Updated by Brandon Schneider over 1 year ago

Can you post the iocage get -a JAIL of the jail please?

#3 Updated by A B over 1 year ago

Brandon Schneider wrote:

Can you post the iocage get -a JAIL of the jail please?

Sure.

root@freenas:~ # iocage get -a nextcloud13
CONFIG_VERSION:9
allow_chflags:0
allow_mount:0
allow_mount_devfs:0
allow_mount_nullfs:0
allow_mount_procfs:0
allow_mount_tmpfs:0
allow_mount_zfs:0
allow_quotas:0
allow_raw_sockets:1
allow_set_hostname:1
allow_socket_af:0
allow_sysvipc:0
available:readonly
basejail:no
boot:on
bpf:yes
children_max:0
cloned_release:11.1-RELEASE
comment:none
compression:lz4
compressratio:readonly
coredumpsize:off
count:1
cpuset:off
cputime:off
datasize:off
dedup:off
defaultrouter:192.168.2.1
defaultrouter6:none
depends:none
devfs_ruleset:4
dhcp:off
enforce_statfs:2
exec_clean:1
exec_fib:0
exec_jail_user:root
exec_poststart:/usr/bin/true
exec_poststop:/usr/bin/true
exec_prestart:/usr/bin/true
exec_prestop:/usr/bin/true
exec_start:/bin/sh /etc/rc
exec_stop:/bin/sh /etc/rc.shutdown
exec_system_jail_user:0
exec_system_user:root
exec_timeout:60
host_domainname:none
host_hostname:nextcloud13
host_hostuuid:nextcloud13
host_time:yes
hostid:[XXX]
interfaces:vnet0:bridge0
ip4:new
ip4_addr:vnet0|192.168.2.6/24
ip4_saddrsel:1
ip6:new
ip6_addr:none
ip6_saddrsel:1
jail_zfs:off
jail_zfs_dataset:iocage/jails/nextcloud13/data
jail_zfs_mountpoint:none
last_started:2018-02-21 09:45:59
login_flags:-f root
mac_prefix:[xxx]
maxproc:off
memorylocked:off
memoryuse:off
mount_devfs:1
mount_fdescfs:1
mount_linprocfs:0
mount_procfs:0
mountpoint:readonly
msgqqueued:off
msgqsize:off
nmsgq:off
notes:none
nsemop:off
nshm:off
nthr:off
openfiles:off
origin:readonly
owner:root
pcpu:off
priority:99
pseudoterminals:off
quota:none
release:11.1-RELEASE-p6
reservation:none
resolver:nameserver 192.168.2.1
rlimits:off
securelevel:2
shmsize:off
stacksize:off
state:up
stop_timeout:30
swapuse:off
sync_state:none
sync_target:none
sync_tgt_zpool:none
sysvmsg:new
sysvsem:new
sysvshm:new
template:no
type:jail
used:readonly
vmemoryuse:off
vnet:on
vnet0_mac:[xxx]1,[xxx]2
vnet1_mac:none
vnet2_mac:none
vnet3_mac:none
wallclock:off

Im' currently using:

sysrc ifconfig_epair0_name="epair0a" 

as workaround.

#4 Updated by Brandon Schneider over 1 year ago

Interesting, with vnet you wouldn't think you'd run into conflictions. What processes are you running in the jail? Just mysqld?

As exact of steps as you can remember will aid in this ;)

#5 Updated by A B over 1 year ago

Brandon Schneider wrote:

Interesting, with vnet you wouldn't think you'd run into conflictions. What processes are you running in the jail? Just mysqld?

As exact of steps as you can remember will aid in this ;)

I more or less used this how to: https://forums.freenas.org/index.php?threads/how-to-install-nextcloud-12-3-on-freenas-11-with-all-checks-passed.58634/

With PHP7.1 but without https.

I hope this helped...

#6 Updated by Kevin J over 1 year ago

Seeing the same thing on my system with Plex and Unifi after updating to U2. Plex comes back if I reboot to the saved U1 on my boot, but I'm not sure if that is actually a downgrade of the OS. Ran sysrc ifconfig_epair0_name="epair0b" in the jails and restarted them and they're happy again under U2.

I create them both in essentially the same way, as follows. If I use epair0 instead of vnet0, there is no network capability at all inside the jail.
iocage create --name "${JAIL_NAME}" -r 11.1-RELEASE ip4_addr="vnet0|${JAIL_IP}/24" vnet="on" allow_raw_sockets="1" defaultrouter="${DEFAULT_GW_IP}" boot="on" host_hostname="${JAIL_NAME}" mount_linprocfs="1" allow_mount_tmpfs="1"

#7 Updated by Brandon Schneider over 1 year ago

  • Related to Bug #28631: Iocage Vnet not working in FreeNAS-11.1-U2 added

#8 Updated by Jakub Zlámal over 1 year ago

I have found that loopback interface does not have ip address

calling

ifconfig lo0 127.0.0.1

is ip address added and services can be started

#9 Updated by Brandon Schneider over 1 year ago

  • Status changed from Not Started to Done
  • Priority changed from No priority to Important

This should now be solved with https://github.com/iocage/iocage/commit/fc7995cd327968e077b99c4a1458ae20a2eb98f8 when 11.2-BETA1 is released.

Thanks for all the reports!

#10 Updated by Dru Lavigne over 1 year ago

  • Subject changed from iocage jail can't bind ports to Add the iocage host interface to the bridge and only rename if the default vnet0 interface is supplied
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#11 Updated by Dru Lavigne over 1 year ago

  • Related to deleted (Bug #28631: Iocage Vnet not working in FreeNAS-11.1-U2)

#12 Updated by Dru Lavigne over 1 year ago

  • Has duplicate Bug #28631: Iocage Vnet not working in FreeNAS-11.1-U2 added

#13 Updated by Brandon Schneider over 1 year ago

  • Related to Bug #28796: iocage vnet jail missing localhost IP on lo0 added

#14 Updated by Dru Lavigne over 1 year ago

  • Related to Bug #30276: Reuse existing bridge for VM's and jails added

#15 Updated by Dru Lavigne about 1 year ago

  • Status changed from Done to Ready for Testing

#16 Updated by Nick Wolff about 1 year ago

  • Status changed from Ready for Testing to Passed Testing
  • Severity set to New

Tested with creation of jail using command from forum post.

 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" 

Then entering jail and looking at interfaces
root@fncertified:~ # iocage console test 
iLast login: Thu Jun 21 09:14:05 on pts/0
FreeBSD 11.1-STABLE (FreeNAS.amd64) #0 854e3946a(freenas/11-stable): Thu Jun 21 01:43:51 EDT 2018

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
^R
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 
epair0b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8<VLAN_MTU>
    ether 02:ff:60:ae:1b:76
    hwaddr 02:18:d0:00:08:0b
    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 
root@test:~ # 

#17 Updated by Nick Wolff about 1 year ago

  • Severity changed from New to Med High

#18 Updated by Dru Lavigne about 1 year ago

  • Status changed from Passed Testing to Done
  • Needs QA changed from Yes to No

#19 Updated by Dru Lavigne about 1 year ago

  • Related to deleted (Bug #30276: Reuse existing bridge for VM's and jails)

#20 Updated by Dru Lavigne about 1 year ago

  • Has duplicate Bug #30276: Reuse existing bridge for VM's and jails added

#21 Updated by Dru Lavigne 12 months ago

  • Related to Bug #40484: Add ability to customize default vnet interface to middleware added

Also available in: Atom PDF