[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-jail
Subject:    Re: jail already exists
From:       Jamie Gritton <jamie () FreeBSD ! org>
Date:       2013-05-22 21:58:07
Message-ID: 519D3F6F.7050604 () FreeBSD ! org
[Download RAW message or body]

On 05/22/13 15:38, Tomasz Jaroszyk wrote:
> I use 9.1-PRERELEASE and have problem with jails.
> Sometimes one of them after shutdown do not want start again.
>
> szafir% sudo jail -rc reverse
> jail: "reverse" not found
> jail: reverse: jail 320 already exists
> szafir% pgrep -j 320
> szafir%
>
> I guess some file was not removed after shutdown but manual of jail(8) did
> say nothing about that.
>
> I have been changing jid when that happened but this is annoying.
> Any better solution?

If I had to guess at your jail.conf, I'd say that "reverse" has a
hard-coded jid of 320. Of course it'd be better if I didn't have to
guess :-).

It looks like the jail "reverse" doesn't currently exist, hence the "not
found" message. But *some* jail with a jid of 320 does exist. There's a
good chance that the 320 that does exist is the same jail as the
"reverse" that doesn't exist. That's because when removing, a dying jail
is usually disregarded. When adding a jail, a dying jail of the same
name can be disregarded, but not one with the same jid.

So if my guess is correct, the solution is jail(8)'s "-d" flag, or the
"allow.dying" jail parameter. An jail with active TCP connections will
generally sit around a while in the dying state, which can cause
problems with the "jail -rc" restart - but only if you try to force it
to a particular jid.

- Jamie
_______________________________________________
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic