You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by test <te...@uminum.com> on 2002/02/13 17:35:50 UTC

JAMES shuts down when ssh session ends

I use ssh instead of telnet. When I login to my server with ssh and start
james using "./run.sh &" and then close my terminal/ssh session JAMES will
shutdown too. I looked at my processes "ps -A f" and noticed that JAMES is
starting as a child process of my ssh session. How do I start JAMES remotely
without it starting as a child process of ssh. Shouldn't the "&" allow for
this?

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
mail@phase.ws
http://www.phase.ws



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JAMES shuts down when ssh session ends

Posted by Eric Weidner <er...@ejbsolutions.com>.
I use the following for starting and stopping James on startup in RedHat
7.2.  I tried to get the 'daemon' command to work, but couldn't get it to
start so I gave up.

Eric Weidner
Sr. Consultant
EJB Solutions Inc.


#!/bin/sh
# Startup script for James Mail server
#
# chkconfig: 2345 95 92
# description: Run James Mail server

[ -f /opt/james/bin/run.sh ] || exit 0

start() {
    echo -n  "Starting James Mail Server: "
    JAVA_HOME=/usr/java;export JAVA_HOME
    cd /opt/james/bin
    nohup /opt/james/bin/run.sh &
    RETVAL=$?
    echo
    return $RETVAL
}

stop() {
    echo -n "Shutting down James Mail Server "
    ps -auxwwwww | grep valon | awk '{print $2}' | xargs -i kill {}
    echo killing run shell
    ps -auxwwwww | grep james | awk '{print $2}' | xargs -i kill {}
    echo
    return 0
}

case "$1" in
        start)
            start
            ;;

        stop)
            stop
            ;;

        *)
            echo "Usage: james {start|stop}"
            exit 1

esac

exit 0


----- Original Message -----
From: "wursttrooper" <wu...@gmx.net>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, February 13, 2002 9:59 AM
Subject: Re: JAMES shuts down when ssh session ends


> There is a workaround for that, using the startproc tool.
>
> startproc /usr/local/james/bin/run.sh
>
> this works for me, until starting/stopping is implemented in JAMES. But
> there is a drawback. Stopping JAMES is only possible via
>
> killall java
>
> This is especially painful if you are also running other java servers
(e.g.
> tomcat).
>
> Eike
>
> ----- Original Message -----
> From: "test" <te...@uminum.com>
> To: "James Users List" <ja...@jakarta.apache.org>
> Sent: Wednesday, February 13, 2002 5:35 PM
> Subject: JAMES shuts down when ssh session ends
>
>
> > I use ssh instead of telnet. When I login to my server with ssh and
start
> > james using "./run.sh &" and then close my terminal/ssh session JAMES
will
> > shutdown too. I looked at my processes "ps -A f" and noticed that JAMES
is
> > starting as a child process of my ssh session. How do I start JAMES
> remotely
> > without it starting as a child process of ssh. Shouldn't the "&" allow
for
> > this?
> >
> > Brandon Goodin
> > Phase Web and Multimedia
> > P (406) 862-2245
> > F (406) 862-0354
> > mail@phase.ws
> > http://www.phase.ws
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JAMES shuts down when ssh session ends

Posted by Danny Angus <da...@thought.co.uk>.
You can kill james by telnetting into the administrator and typing shutdown

> -----Original Message-----
> From: Stephan Schiessling [mailto:s@rapi.com]
> Sent: Wednesday, February 13, 2002 7:25 PM
> To: James Users List
> Subject: Re: JAMES shuts down when ssh session ends
>
>
>
> For starting James I use
>
> nohup ./run.sh &
>
> which does not kill james if you close terminal and for stopping james,
> I use:
>
> ps auxwww|grep james|grep -v grep|grep java|awk '{print $2}'|xargs kill -9
>
> which should only kill those java processes belonging to james.
>
> Stephan
>
>
> wursttrooper wrote:
>
> >There is a workaround for that, using the startproc tool.
> >
> >startproc /usr/local/james/bin/run.sh
> >
> >this works for me, until starting/stopping is implemented in JAMES. But
> >there is a drawback. Stopping JAMES is only possible via
> >
> >killall java
> >
> >This is especially painful if you are also running other java
> servers (e.g.
> >tomcat).
> >
> >Eike
> >
> >----- Original Message -----
> >From: "test" <te...@uminum.com>
> >To: "James Users List" <ja...@jakarta.apache.org>
> >Sent: Wednesday, February 13, 2002 5:35 PM
> >Subject: JAMES shuts down when ssh session ends
> >
> >
> >>I use ssh instead of telnet. When I login to my server with ssh
> and start
> >>james using "./run.sh &" and then close my terminal/ssh session
> JAMES will
> >>shutdown too. I looked at my processes "ps -A f" and noticed
> that JAMES is
> >>starting as a child process of my ssh session. How do I start JAMES
> >>
> >remotely
> >
> >>without it starting as a child process of ssh. Shouldn't the
> "&" allow for
> >>this?
> >>
> >>Brandon Goodin
> >>Phase Web and Multimedia
> >>P (406) 862-2245
> >>F (406) 862-0354
> >>mail@phase.ws
> >>http://www.phase.ws
> >>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >>
> ><ma...@jakarta.apache.org>
> >
> >>For additional commands, e-mail:
> >>
> ><ma...@jakarta.apache.org>
> >
> >>
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
>For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JAMES shuts down when ssh session ends

Posted by Stephan Schiessling <s...@rapi.com>.
For starting James I use

nohup ./run.sh &

which does not kill james if you close terminal and for stopping james, 
I use:

ps auxwww|grep james|grep -v grep|grep java|awk '{print $2}'|xargs kill -9

which should only kill those java processes belonging to james.

Stephan


wursttrooper wrote:

>There is a workaround for that, using the startproc tool.
>
>startproc /usr/local/james/bin/run.sh
>
>this works for me, until starting/stopping is implemented in JAMES. But
>there is a drawback. Stopping JAMES is only possible via
>
>killall java
>
>This is especially painful if you are also running other java servers (e.g.
>tomcat).
>
>Eike
>
>----- Original Message -----
>From: "test" <te...@uminum.com>
>To: "James Users List" <ja...@jakarta.apache.org>
>Sent: Wednesday, February 13, 2002 5:35 PM
>Subject: JAMES shuts down when ssh session ends
>
>
>>I use ssh instead of telnet. When I login to my server with ssh and start
>>james using "./run.sh &" and then close my terminal/ssh session JAMES will
>>shutdown too. I looked at my processes "ps -A f" and noticed that JAMES is
>>starting as a child process of my ssh session. How do I start JAMES
>>
>remotely
>
>>without it starting as a child process of ssh. Shouldn't the "&" allow for
>>this?
>>
>>Brandon Goodin
>>Phase Web and Multimedia
>>P (406) 862-2245
>>F (406) 862-0354
>>mail@phase.ws
>>http://www.phase.ws
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>>
><ma...@jakarta.apache.org>
>
>>For additional commands, e-mail:
>>
><ma...@jakarta.apache.org>
>
>>
>
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JAMES shuts down when ssh session ends

Posted by wursttrooper <wu...@gmx.net>.
There is a workaround for that, using the startproc tool.

startproc /usr/local/james/bin/run.sh

this works for me, until starting/stopping is implemented in JAMES. But
there is a drawback. Stopping JAMES is only possible via

killall java

This is especially painful if you are also running other java servers (e.g.
tomcat).

Eike

----- Original Message -----
From: "test" <te...@uminum.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, February 13, 2002 5:35 PM
Subject: JAMES shuts down when ssh session ends


> I use ssh instead of telnet. When I login to my server with ssh and start
> james using "./run.sh &" and then close my terminal/ssh session JAMES will
> shutdown too. I looked at my processes "ps -A f" and noticed that JAMES is
> starting as a child process of my ssh session. How do I start JAMES
remotely
> without it starting as a child process of ssh. Shouldn't the "&" allow for
> this?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JAMES shuts down when ssh session ends

Posted by Jordi Pujol <jo...@aujac.org>.
Perhaps it's useful to use: nohup process & 1>out_trace_file
2>err_trace_file


+--------------------------------------------------------------------------+
Aujac (Associació d'Usuaris de Java de Catalunya)
 WWW: http://www.aujac.org
 Fòrum Aujac: http://www.aujac.org/serveis/nexus?ACTION=FORUM&ID_FORUM=1
 Adreces electròniques de contacte:
 Informació general: info@aujac.org
 Per establir un conveni amb l'Aujac: convenis@aujac.org
 Per establir projectes amb les universitats: universitats@aujac.org
 Per fer-vos soci : https://www.aujac.org/seccioSocis/altaSoci.xml
 Si sou una empresa, institució o organització i voleu fer-vos socis,
   feu-ho a travès de: https://www.aujac.org/seccioSocis/altaSociEmp.xml

 Gràcies!!!
+--------------------------------------------------------------------------+

----- Original Message -----
From: "Danny Angus" <da...@thought.co.uk>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, February 13, 2002 6:14 PM
Subject: RE: JAMES shuts down when ssh session ends


> so do I and if you "logout" or "exit" daemon processes started with "&"
will
> keep on running, but if you just close the terminal they stop.
>
> > -----Original Message-----
> > From: test [mailto:test@uminum.com]
> > Sent: Wednesday, February 13, 2002 4:36 PM
> > To: James Users List
> > Subject: JAMES shuts down when ssh session ends
> >
> >
> > I use ssh instead of telnet. When I login to my server with ssh and
start
> > james using "./run.sh &" and then close my terminal/ssh session JAMES
will
> > shutdown too. I looked at my processes "ps -A f" and noticed that JAMES
is
> > starting as a child process of my ssh session. How do I start
> > JAMES remotely
> > without it starting as a child process of ssh. Shouldn't the "&" allow
for
> > this?
> >
> > Brandon Goodin
> > Phase Web and Multimedia
> > P (406) 862-2245
> > F (406) 862-0354
> > mail@phase.ws
> > http://www.phase.ws
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JAMES shuts down when ssh session ends

Posted by Danny Angus <da...@thought.co.uk>.
No it happens to all processes started with &

> -----Original Message-----
> From: Phase Communcations [mailto:mail@phase.ws]
> Sent: Wednesday, February 13, 2002 5:17 PM
> To: James Users List
> Subject: RE: JAMES shuts down when ssh session ends
>
>
> Is this a bug in JAMES?
>
> -----Original Message-----
> From: Danny Angus [mailto:danny@thought.co.uk]
> Sent: Wednesday, February 13, 2002 10:14 AM
> To: James Users List
> Subject: RE: JAMES shuts down when ssh session ends
>
>
> so do I and if you "logout" or "exit" daemon processes started
> with "&" will
> keep on running, but if you just close the terminal they stop.
>
> > -----Original Message-----
> > From: test [mailto:test@uminum.com]
> > Sent: Wednesday, February 13, 2002 4:36 PM
> > To: James Users List
> > Subject: JAMES shuts down when ssh session ends
> >
> >
> > I use ssh instead of telnet. When I login to my server with ssh
> and start
> > james using "./run.sh &" and then close my terminal/ssh session
> JAMES will
> > shutdown too. I looked at my processes "ps -A f" and noticed
> that JAMES is
> > starting as a child process of my ssh session. How do I start
> > JAMES remotely
> > without it starting as a child process of ssh. Shouldn't the
> "&" allow for
> > this?
> >
> > Brandon Goodin
> > Phase Web and Multimedia
> > P (406) 862-2245
> > F (406) 862-0354
> > mail@phase.ws
> > http://www.phase.ws
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JAMES shuts down when ssh session ends

Posted by Phase Communcations <ma...@phase.ws>.
Is this a bug in JAMES?

-----Original Message-----
From: Danny Angus [mailto:danny@thought.co.uk]
Sent: Wednesday, February 13, 2002 10:14 AM
To: James Users List
Subject: RE: JAMES shuts down when ssh session ends


so do I and if you "logout" or "exit" daemon processes started with "&" will
keep on running, but if you just close the terminal they stop.

> -----Original Message-----
> From: test [mailto:test@uminum.com]
> Sent: Wednesday, February 13, 2002 4:36 PM
> To: James Users List
> Subject: JAMES shuts down when ssh session ends
>
>
> I use ssh instead of telnet. When I login to my server with ssh and start
> james using "./run.sh &" and then close my terminal/ssh session JAMES will
> shutdown too. I looked at my processes "ps -A f" and noticed that JAMES is
> starting as a child process of my ssh session. How do I start
> JAMES remotely
> without it starting as a child process of ssh. Shouldn't the "&" allow for
> this?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: JAMES shuts down when ssh session ends

Posted by Danny Angus <da...@thought.co.uk>.
so do I and if you "logout" or "exit" daemon processes started with "&" will
keep on running, but if you just close the terminal they stop.

> -----Original Message-----
> From: test [mailto:test@uminum.com]
> Sent: Wednesday, February 13, 2002 4:36 PM
> To: James Users List
> Subject: JAMES shuts down when ssh session ends
>
>
> I use ssh instead of telnet. When I login to my server with ssh and start
> james using "./run.sh &" and then close my terminal/ssh session JAMES will
> shutdown too. I looked at my processes "ps -A f" and noticed that JAMES is
> starting as a child process of my ssh session. How do I start
> JAMES remotely
> without it starting as a child process of ssh. Shouldn't the "&" allow for
> this?
>
> Brandon Goodin
> Phase Web and Multimedia
> P (406) 862-2245
> F (406) 862-0354
> mail@phase.ws
> http://www.phase.ws
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>