Ofbiz goes down every time the terminal connection becomes inactive

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Ofbiz goes down every time the terminal connection becomes inactive

Michael Gawrychowski-2
Hi everyone, I start the ofbiz app by ssh-ing to the server and typing in
./ant start and in a few seconds I have it working. However every time I
close the terminal window the application stops working as well. Why is
that and how do I get it to work so it works all the time?
Reply | Threaded
Open this post in threaded view
|

Re: Ofbiz goes down every time the terminal connection becomes inactive

Ted Byers
On Thu, Oct 30, 2014 at 3:24 PM, Michael Gawrychowski <
[hidden email]> wrote:

> Hi everyone, I start the ofbiz app by ssh-ing to the server and typing in
> ./ant start and in a few seconds I have it working. However every time I
> close the terminal window the application stops working as well. Why is
> that and how do I get it to work so it works all the time?
>

That is basic unix process management (and I'd assume it is similar on
Windows).

When you start a process from a terminal, or commandline session, that
process is a child of the process in which you started it.  In your case,
the ofbiz process is a child of the terminal window's process.  Killing
(closing) the parent kills (terminates) the child.

What you have to do is detach from the application once it has started.  To
take a trivial example, my favourite editor is Emacs.  If, in a terminal, I
execute 'emacs', emacs starts, and the terminal no longer has a cursor.  I
work in Emacs, save my document, close emacs, and then the cursor reappears
in the terminal.  But, if I close the terminal before I finish with emacs,
emacs is closed also.  Now, if I execute 'emacs&' (notice the trialing
'&'), I can continue to work in Emacs even if the terminal is closed for
whatever reason; and this is because I told the terminal to start emacs and
then detach from it.

It has been a while since I looked, but I would expect that there is a
script with it that will start ofbiz as a service.  If you can't find it,
try starting it and detaching from it.

HTH

Ted

--
R.E.(Ted) Byers, Ph.D.,Ed.D.
Reply | Threaded
Open this post in threaded view
|

Re: Ofbiz goes down every time the terminal connection becomes inactive

pinballpaul
In reply to this post by Michael Gawrychowski-2
Well ideally you should run it as a service.. :-)

But if you’re starting it from the command line for testing/whatnot, use nohup ./startofbiz.sh & to keep it from getting killed when the terminal closes.
—P

> On Oct 30, 2014, at 2:24 PM, Michael Gawrychowski <[hidden email]> wrote:
>
> Hi everyone, I start the ofbiz app by ssh-ing to the server and typing in
> ./ant start and in a few seconds I have it working. However every time I
> close the terminal window the application stops working as well. Why is
> that and how do I get it to work so it works all the time?

Reply | Threaded
Open this post in threaded view
|

Re: Ofbiz goes down every time the terminal connection becomes inactive

Michael Gawrychowski-2
It worked perfectly. Thank you!

On Thu, Oct 30, 2014 at 12:37 PM, Paul Mandeltort <[hidden email]> wrote:

> Well ideally you should run it as a service.. :-)
>
> But if you’re starting it from the command line for testing/whatnot, use
> nohup ./startofbiz.sh & to keep it from getting killed when the terminal
> closes.
> —P
>
> > On Oct 30, 2014, at 2:24 PM, Michael Gawrychowski <
> [hidden email]> wrote:
> >
> > Hi everyone, I start the ofbiz app by ssh-ing to the server and typing in
> > ./ant start and in a few seconds I have it working. However every time I
> > close the terminal window the application stops working as well. Why is
> > that and how do I get it to work so it works all the time?
>
>