Re: Problem with ezjail: Manually restarted jails don't come up again

2009-01-28 Thread Frank Steinborn
On Wed, Jan 28, 2009 at 03:23:33PM -0900, Mel wrote:
> On Wednesday 28 January 2009 12:24:31 Frank Steinborn wrote:
> > I guess i found a possible answer to my problem: The jail is running
> > mldonkey, which is started via /etc/rc.conf. If I don't start it, the
> > jail comes up as expected. These are the last two processes spawned in
> > the jail:
> >
> > 37947  p3  T+J0:00.01 su -l mldonkey -c /bin/sh -c
> > ^I"/usr/local/bin/mlnet ^I ^I ^I>> /dev/null 2>&1 &"
> > 37948  p3  TJ 0:00.01 -su -c /bin/sh -c ^I"/usr/local/bin/mlnet ^I
> > ^I ^I>> /dev/null 2>&1 &" (zsh)
>  ^^^ 
> Why is zsh shell involved?

This was it. I should not have used the root-account inside the jails
with zsh. I now use the toor account on zsh and put the shell of root
back to csh everywhere.

However, I don't understand why zsh is invoked, since all rc.d-scripts
have shebang lines telling them to use /bin/sh? I'm a bit confused,
maybe can someone give a bit light on this...

However, it works now.

Thanks,

Frank
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: Problem with ezjail: Manually restarted jails don't come up again

2009-01-28 Thread Mel
On Wednesday 28 January 2009 12:24:31 Frank Steinborn wrote:
> On Wed, Jan 28, 2009 at 09:02:35PM +, Bjoern A. Zeeb wrote:
> > if it's network services hanging on startup, check firewall and
> > resolve.conf inside the jail or wait a few minutes to let possible dns
> > queries timeout.
> > Also tpcdumping on the nase system for the jail IP might give a clue
> > in that case.
> >
> > If it's something else that's hanging you can find out easily looking
> > at jail startup logs and/or the last process started inside the
> > jail...
> >
> > /bz
>
> I guess i found a possible answer to my problem: The jail is running
> mldonkey, which is started via /etc/rc.conf. If I don't start it, the
> jail comes up as expected. These are the last two processes spawned in
> the jail:
>
> 37947  p3  T+J0:00.01 su -l mldonkey -c /bin/sh -c
> ^I"/usr/local/bin/mlnet ^I ^I ^I>> /dev/null 2>&1 &"
> 37948  p3  TJ 0:00.01 -su -c /bin/sh -c ^I"/usr/local/bin/mlnet ^I
> ^I ^I>> /dev/null 2>&1 &" (zsh)
 ^^^ 
Why is zsh shell involved?

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: Problem with ezjail: Manually restarted jails don't come up again

2009-01-28 Thread Frank Steinborn
On Wed, Jan 28, 2009 at 12:50:40PM -0900, Mel wrote:
> On Wednesday 28 January 2009 11:25:56 Frank Steinborn wrote:
> 
> > # /usr/local/etc/rc.d/ezjail.sh start mldonkey.local
> > Configuring jails:.
> > Starting jails:
> >
> > If I check with jls and 'pgrep -lfj ', i see that there are processes
> > inside the hanging jail running, including /etc/rc. I guess the
> > jails are hanging somewhere in the boot-process, and i guess it's
> > /etc/rc.
> 
> Install sysutils/pstree. On the host, type pstree|less. Search for the rc 
> process, then see what's running 'underneath' it. Those scripts/services are 
> hanging and take it from there.

Please see my reply to Bjoern, the two processes shown there are the
ones hanging under /etc/rc... I don't have a clue why this happens, if
i start the rc-script for this port manually, it works without a
hitch. And even more noteable: On reboot, all comes up without a
problem too.
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: Problem with ezjail: Manually restarted jails don't come up again

2009-01-28 Thread Mel
On Wednesday 28 January 2009 11:25:56 Frank Steinborn wrote:

> # /usr/local/etc/rc.d/ezjail.sh start mldonkey.local
> Configuring jails:.
> Starting jails:
>
> If I check with jls and 'pgrep -lfj ', i see that there are processes
> inside the hanging jail running, including /etc/rc. I guess the
> jails are hanging somewhere in the boot-process, and i guess it's
> /etc/rc.

Install sysutils/pstree. On the host, type pstree|less. Search for the rc 
process, then see what's running 'underneath' it. Those scripts/services are 
hanging and take it from there.
-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: Problem with ezjail: Manually restarted jails don't come up again

2009-01-28 Thread Frank Steinborn
On Wed, Jan 28, 2009 at 09:02:35PM +, Bjoern A. Zeeb wrote:
> if it's network services hanging on startup, check firewall and
> resolve.conf inside the jail or wait a few minutes to let possible dns
> queries timeout.
> Also tpcdumping on the nase system for the jail IP might give a clue
> in that case.
> 
> If it's something else that's hanging you can find out easily looking
> at jail startup logs and/or the last process started inside the
> jail...
> 
> /bz

I guess i found a possible answer to my problem: The jail is running
mldonkey, which is started via /etc/rc.conf. If I don't start it, the
jail comes up as expected. These are the last two processes spawned in
the jail:

37947  p3  T+J0:00.01 su -l mldonkey -c /bin/sh -c
^I"/usr/local/bin/mlnet ^I ^I ^I>> /dev/null 2>&1 &"
37948  p3  TJ 0:00.01 -su -c /bin/sh -c ^I"/usr/local/bin/mlnet ^I
^I ^I>> /dev/null 2>&1 &" (zsh)

It's suspicious that there are ^I's in there. And as a side-note:
Other jails have the same problem, with completely different services
to start up.

What to do about it? If I start mldonkey manually when the jail came
up, it works as expected, but this is really suboptimal...
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: Problem with ezjail: Manually restarted jails don't come up again

2009-01-28 Thread Michael Scheidell

I installed the jail utilities (forgot which ones)

has a 'jkill' utility.

I then added a /etc/rc.conf.d/ezjail  with a pre-stop() command that 
calls a jkill.


then all works fine.



Frank Steinborn wrote:

Hi folks,

I have a strange problem on my 7.1-RELEASE with ezjail here. I have 5
jails configured with ezjail, and they run flawlessy - they come up on
boot without problems.

However, if i stop a jail (via /usr/local/etc/rc.d/ezjail.sh stop
) and then want to restart it via the rc-script, it stalls here:

# /usr/local/etc/rc.d/ezjail.sh start mldonkey.local
Configuring jails:.
Starting jails:

If I check with jls and 'pgrep -lfj ', i see that there are processes
inside the hanging jail running, including /etc/rc. I guess the
jails are hanging somewhere in the boot-process, and i guess it's
/etc/rc.

I even doubt that this is an ezjail-only problem, but this is just a
guess.

Any hints?

Thanks,
Frank
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"
  


--
Michael Scheidell, CTO
Phone: 561-999-5000, x 1259
> *| *SECNAP Network Security Corporation

   * Certified SNORT Integrator
   * King of Spam Filters, SC Magazine 2008
   * Information Security Award 2008, Info Security Products Guide
   * CRN Magazine Top 40 Emerging Security Vendors
   * Finalist 2009 Network Products Guide Hot Companies


_
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.secnap.com/products/spammertrap/

_
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: Problem with ezjail: Manually restarted jails don't come up again

2009-01-28 Thread Bjoern A. Zeeb

On Wed, 28 Jan 2009, Frank Steinborn wrote:

...

jails are hanging somewhere in the boot-process, and i guess it's
/etc/rc.

I even doubt that this is an ezjail-only problem, but this is just a
guess.

Any hints?


if it's network services hanging on startup, check firewall and
resolve.conf inside the jail or wait a few minutes to let possible dns
queries timeout.
Also tpcdumping on the nase system for the jail IP might give a clue
in that case.

If it's something else that's hanging you can find out easily looking
at jail startup logs and/or the last process started inside the
jail...

/bz

--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Problem with ezjail: Manually restarted jails don't come up again

2009-01-28 Thread Frank Steinborn
Hi folks,

I have a strange problem on my 7.1-RELEASE with ezjail here. I have 5
jails configured with ezjail, and they run flawlessy - they come up on
boot without problems.

However, if i stop a jail (via /usr/local/etc/rc.d/ezjail.sh stop
) and then want to restart it via the rc-script, it stalls here:

# /usr/local/etc/rc.d/ezjail.sh start mldonkey.local
Configuring jails:.
Starting jails:

If I check with jls and 'pgrep -lfj ', i see that there are processes
inside the hanging jail running, including /etc/rc. I guess the
jails are hanging somewhere in the boot-process, and i guess it's
/etc/rc.

I even doubt that this is an ezjail-only problem, but this is just a
guess.

Any hints?

Thanks,
Frank
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: HEADS UP: multi-IPv4/v6/no-IP jails merge to 7-STABLE ahead

2009-01-28 Thread Bjoern A. Zeeb

On Wed, 28 Jan 2009, Bjoern A. Zeeb wrote:


Hi,

I have a possible MFC candidate patch at:
http://people.freebsd.org/~bz/20090128-02-jail7-mfc.diff

to merge the multi-IPv4/v6/no-IP jails to 7-STABLE.  My plan would be
to do so during the weekend of 6-8th February 2009.

In addition to what the patch says at the beginning (__FreeBSD_version
bump), the patch also has the regenerated compat/freebsd32 sysctl
stuff in it so that people can apply, compile and run it directly.
For the merge this would be a second commit.

For committers who want to review that I have done the merge right, it
is an svn diff with mergeinfo included.

For details about the patch, features, .. see the original commit
message and follow-up a few days later (both in one post):
http://lists.freebsd.org/pipermail/freebsd-jail/2008-December/000631.html

Since then a few bug fixes went in, some older PRs were handled, ...

Now is the time for you to try and review it for 7-STABLE, etc.



One more thing that I had forgotten and was pointed at:
sys/kern/kern_jail.c includes the __FBSDID() line.
I just manually edited the patch to contain the proper CVS (not SVN) value.

You may a) want to check that things apply cleanly and/or b) to sure
to manually apply the hunk from the .rej.

/bz

--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


HEADS UP: multi-IPv4/v6/no-IP jails merge to 7-STABLE ahead

2009-01-28 Thread Bjoern A. Zeeb

Hi,

I have a possible MFC candidate patch at:
http://people.freebsd.org/~bz/20090128-02-jail7-mfc.diff

to merge the multi-IPv4/v6/no-IP jails to 7-STABLE.  My plan would be
to do so during the weekend of 6-8th February 2009.

In addition to what the patch says at the beginning (__FreeBSD_version
bump), the patch also has the regenerated compat/freebsd32 sysctl
stuff in it so that people can apply, compile and run it directly.
For the merge this would be a second commit.

For committers who want to review that I have done the merge right, it
is an svn diff with mergeinfo included.

For details about the patch, features, .. see the original commit
message and follow-up a few days later (both in one post):
http://lists.freebsd.org/pipermail/freebsd-jail/2008-December/000631.html

Since then a few bug fixes went in, some older PRs were handled, ...

Now is the time for you to try and review it for 7-STABLE, etc.


/bz

--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"


Re: Multi-IP Jails (7.1-REL)

2009-01-28 Thread Bjoern A. Zeeb

On Wed, 28 Jan 2009, Frank Behrens wrote:

Good morning,


Kage  wrote on 27 Jan 2009 19:09:

   I need a solution for making jails use multiple IPs, be it a
/stable/, good patch, or a hacked solution via ipfw (preferred), or
pf.  The one stipulation is that the jails must be able to connect
out, and MUST connect out via one of the IPs assigned to that jail.


Did you search on the jail mailing list? You should find Bjoern's
excellent patches for RELENG_7 and the anouncement for HEAD:

http://lists.freebsd.org/pipermail/freebsd-jail/2008-November/000615.html
http://lists.freebsd.org/pipermail/freebsd-jail/2008-December/000631.html


I am about to re-gen my patch from last week (wasn't publicly
announced) but I am running it. So if you can wait another few hours,
you'll get the MFC candidate patch for RELENG_7.

/bz

--
Bjoern A. Zeeb  The greatest risk is not taking one.
___
freebsd-jail@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-jail
To unsubscribe, send any mail to "freebsd-jail-unsubscr...@freebsd.org"