tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milt Epstein <mepst...@uiuc.edu>
Subject Re: tomcat process dies out...
Date Tue, 29 May 2001 04:35:33 GMT
On Mon, 28 May 2001, Krishna Kishore Thotakura wrote:

> yeah..now, it works.
>
> >nohup ./startup.sh -f server_1.xml >&1 &
>
> could u please explain how it made a difference?
> What does redirection to '&1' mean? sorry, i am not a unix pro.

Ummm, the command you show above doesn't match either of the commands
Jan gave.  Did you make a typo, or are you really using what you show
above?  And exactly which shell are you using?  (You should be able to
do "echo $SHELL" to find out.)

The syntax is somewhat different for the sh et al shells and the csh
et al shells.  But, basically, ">" indicates "redirection".  More
specifically:

In the sh et al command, "> /tmp/mytomcat.log" indicates to redirect
stdout to /tmp/mytomcat.log, and "2>&1" indicates to redirect stderr
to the same place stdout is going to (in this case, /tmp/mytomcat.log)
-- 2 is the file descriptor for stderr, 1 is the file descriptor for
stdout.

In the csh et al command, first of all, I think Jan made a typo
(unless I misunderstand it, which is certainly possible :-), and left
out the file to redirect to.  So I think the command should be:

  nohup ./startup.sh -f server_1.xml >& /tmp/mytomcat.log &

But recall that csh et al shells don't need the "nohup" when a job is
backgrounded (done by the final "&"), so this can be simplified to:

  ./startup.sh -f server_1.xml >& /tmp/mytomcat.log &

">&" means to redirect both stdout and stderr to the specified file.

AFAIK, the "!" has to do with changing the behavior slightly when you
have the shell variable noclobber set.  At this point, I'd suggest
reading the csh man page for more specifics.


> Jan Labanowski wrote:
> >
> > The commands can also look like:
> >
> > Under /bin/sh, /bin/ksh, /bin/bash, etc:
> >
> >   nohup ./startup.sh -f server_1.xml > /tmp/mytomcat.log 2>&1 &
> >
> > Under /bin/csh or /bin/tcsh
> >
> >   nohup ./startup.sh -f server_1.xml >&! &
> >
> > Jan
> > jkl@osc.edu
> >
> > On Mon, 28 May 2001, Krishna Kishore Thotakura wrote:
> >
> > > It still doesnt work. I was under the impression that tomcat
> > > would run in the background automatically. Also, i use the same
> > > command to start the tomcat process on my other port(8080), and
> > > it works just fine.
> > >
> > > Milt Epstein wrote:
> > > >
> > > > On Mon, 28 May 2001, Mathew Clark wrote:
> > > >
> > > > > You may need to try
> > > > >
> > > > > nohup ./startup.sh -f server_1.xml &
> > > > >

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
mepstein@uiuc.edu


Mime
View raw message