Date: Wed, 22 May 2013 15:58:07 -0600 From: Jamie Gritton <jamie@FreeBSD.org> To: Tomasz Jaroszyk <tomek@jaroszyk.pl> Cc: freebsd-jail@FreeBSD.org Subject: Re: jail already exists Message-ID: <519D3F6F.7050604@FreeBSD.org> In-Reply-To: <CAAJDDbXs=dP7%2BSugRbQs44W3XMjC9wDWJw8dQNEXqYasp12C7g@mail.gmail.com> References: <CAAJDDbXs=dP7%2BSugRbQs44W3XMjC9wDWJw8dQNEXqYasp12C7g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?519D3F6F.7050604>