jails Jails: stopping (prolonged deaths), starting, networking et cetera


7. DNS: Nameserver and domain are set in /etc/resolv.conf

Also, very important: "writing to routing socket: Operation not permitted" - this leads me to think that your jail lacks permissions to access a device file which is controlled by /etc/defaults/devfs.rules on your host. The last one is for VNET jails and the one before that - for all jails. First find out which device is required by your jail and then allow it in devfs.rules.

Can you please post your jail's configuration for more details?
ifconfig, netstat -rn4, sysrc -a, service ipfw status, ipfw list

Code:
root@twelve:/ # netstat -rn4
Routing tables
root@twelve:/ # sysrc -a
defaultrouter: 192.168.1.1
sendmail_msp_queue_enable: NO
sendmail_outbound_enable: NO
sendmail_submit_enable: NO
root@twelve:/ # sysrc firewall_enable
firewall_enable: NO
root@twelve:/ #

Output from ifconfig I'll post in a private message, if you don't mind.
 
Code:
root@twelve:/ # netstat -rn4
Routing tables
root@twelve:/ # sysrc -a
defaultrouter: 192.168.1.1
sendmail_msp_queue_enable: NO
sendmail_outbound_enable: NO
sendmail_submit_enable: NO
root@twelve:/ # sysrc firewall_enable
firewall_enable: NO
root@twelve:/ #

Output from ifconfig I'll post in a private message, if you don't mind.
Not at all.

Your jail does not have any IP addresses or routes. I can see you have a ip4.addr = 192.168.1.19; in your jail.conf but apparently setting the IP address has not worked due to reasons I cannot explain.
Try to find more information in your logs if possible.

As I wrote, I have no experience with non-VNET jails so if you want, try and create a vnet jail by adding the following to your jail.conf as explained in this guide (you could skip the ZFS related parts if you want):
Code:
vnet;
vnet.interface = "e0b_twelve";

You must add the epair interface to a bridge together with your em0 in order to connect the jail to your physical network: ifconfig bridge create, ifconfig bridge0 addm em0 addm epair0a - adjust for the name of the Epair interface that remains on your host, the other end should appear inside the jail as e0b_twelve.

Also, put stuff like this in your jail's rc.conf:
Code:
# jail hostname #
host_hostname="twelve"
 
# IP address and routing #
# e0b_demojail #
ifconfig_e0b_twelve="inet 192.168.2.250 netmask 255.255.255.0"
defaultrouter="192.168.2.254"
... adjusting for your own IP addresses.

You need to make sure that inside your jail ifconfig shows sensible IP addresses, also netstat -rn4 should return at least the default route through your e0b_twelve interface.
 
… try and create a vnet jail by adding the following to your jail.conf …

I might do that.

I can't remember anything about VNET, but there are a few matches for grep vnet /iocage/defaults.json, so I guess that it was used when I experimented with iocage, years ago.
 
Did you ever figure this out?

Thanks for asking, it's the type of thing that I'm avoiding at the moment.

(Cat hospitalised at vets since Saturday 5th March. I'm keeping myself distracted, but shouldn't put my mind to anything that might wind me up …)
 
Thanks for asking, it's the type of thing that I'm avoiding at the moment.

(Cat hospitalised at vets since Saturday 5th March. I'm keeping myself distracted, but shouldn't put my mind to anything that might wind me up …)
This is the third time that the exact problem you're experiencing has happened to me, and I came across your post.
At times, my jails get stuck in a dying state, and consequently, I cannot reclaim my epair interfaces.
I truly need to find a way to troubleshoot dying jails, or at least kill them to reclaim my interfaces.
 
Back
Top