RE: tomcat process dies out...
Maybe it's because you don't start it with nohup. It's common in unix to kill all process that are initiated the parent if the parent (your shell) ceases to exist (you are logging out). See 'man nohup' Wouter -Original Message- From: Krishna Kishore Thotakura [mailto:[EMAIL PROTECTED]] Sent: 28 May 2001 17:02 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: tomcat process dies out... Hi, thanks for your quick response. But my server is a unix box running Red Hat 6.2. Pernica, Jan wrote: this is a known bug of JDK 1.3 on NT On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura [SMTP:[EMAIL PROTECTED]] wrote: hello, I am trying to setup multiple JVMs using mod_jk. the JVM running at port 8080 is okay. I'm having problem with the JVM running at port 8090. whenever, i log out of my server machine(the machine where i am starting my apache and tomcat), the tomcat process stops listening to the port 8090. Actually, the Tomcat(java) threads are getting killed when i log out. Please let me know where i am going wrong? i am starting tomcat1 as ./startup.sh -f server_1.xml thanks, kishore. __ Tato komunikace je urcena vyhradne pro adresata a je duverna. This communication is intended solely for the addressee and is confidential. -- Krishna Kishore Thotakura. Work 256 961 7818 Home 256 837 9927
Re: tomcat process dies out... (fwd)
The commands can also look like: Under /bin/sh, /bin/ksh, /bin/bash, etc: nohup ./startup.sh -f server_1.xml /tmp/mytomcat.log 21 This means: nohup -- do not kill process on terminal interrupt file -- redirect STDOUT to file 21 -- join STDERR(2) with STDOUT (1) put to background Under /bin/csh or /bin/tcsh nohup ./startup.sh -f server_1.xml ! I made a mistake here and forgot to put the file. SHould be: nohup ./startup.sh -f server_1.xml ! /tmp/mytomcat.log ! means: send STDERR and STDOUT to a file and overwrite file if exists means: do it in background Jan K. Labanowski|phone: 614-292-9279, FAX: 614-292-7168 Ohio Supercomputer Center|Internet: [EMAIL PROTECTED] 1224 Kinnear Rd, |http://www.ccl.net/chemistry.html Columbus, OH 43212-1163 |http://www.osc.edu/
Re: tomcat process dies out...
On Tue, 29 May 2001, Krishna Kishore Thotakura wrote: Hi, yeah, i made a typo and nohup ./startup.sh -f server_1.xml 1 did work. I am using tcsh shell. I now understand that nohup ./startup.sh -f server_1.xml also works. But i think i should redirect stdout,stderr to some file coz i dont see the stdout,stderr written to nohup.out as described in the man pages. i dont see the nohup.out file at all. anyway, i'll work around that. thanks for your help. u were very informative. OK, here's some more information (hopefully not too much :-). First, note that tcsh is in the csh family of shells. In csh shells, nohup is a shell built-in command, as opposed to be a separate executable/command, like /usr/bin/nohup. nohup.out is relevant to /usr/bin/nohup, but not to the csh built-in nohup. (I'm not sure how things are in ksh, but the ksh man page doesn't indicate that nohup is a shell built-in command.) That would explain why you don't see a nohup.out file. In csh shells, 1 is actually a valid redirection -- to a file named 1! That is, it redirects both stdout and stderr to the file 1 in the current directory. You might look for that file in the directory you were in when you invoked this command. (In csh shells, you cannot redirect stdout and stderr separately as you can do in sh shells.) Recall that as I've mentioned previously, in csh shells, if you invoke something in the background (i.e. by having a at the end of the command), you do not need to use nohup (i.e. backgrounded jobs are automatically nohup'ed). So, you should be able to use something like this to do what you want: ./startup.sh -f server_1.xml /path/to/log/file Sorry for those of you on the list that are not interested in this, I just kept it here since it started here and in case it might be of interest to anyone else. Milt Epstein wrote: 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 21 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 21 Under /bin/csh or /bin/tcsh nohup ./startup.sh -f server_1.xml ! Jan [EMAIL PROTECTED] 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) [EMAIL PROTECTED] -- Krishna Kishore Thotakura. Work 256 961 7818 Home 256 837 9927 Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
tomcat process dies out...
hello, I am trying to setup multiple JVMs using mod_jk. the JVM running at port 8080 is okay. I'm having problem with the JVM running at port 8090. whenever, i log out of my server machine(the machine where i am starting my apache and tomcat), the tomcat process stops listening to the port 8090. Actually, the Tomcat(java) threads are getting killed when i log out. Please let me know where i am going wrong? i am starting tomcat1 as ./startup.sh -f server_1.xml thanks, kishore.
RE: tomcat process dies out...
this is a known bug of JDK 1.3 on NT On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura [SMTP:[EMAIL PROTECTED]] wrote: hello, I am trying to setup multiple JVMs using mod_jk. the JVM running at port 8080 is okay. I'm having problem with the JVM running at port 8090. whenever, i log out of my server machine(the machine where i am starting my apache and tomcat), the tomcat process stops listening to the port 8090. Actually, the Tomcat(java) threads are getting killed when i log out. Please let me know where i am going wrong? i am starting tomcat1 as ./startup.sh -f server_1.xml thanks, kishore. __ Tato komunikace je urcena vyhradne pro adresata a je duverna. This communication is intended solely for the addressee and is confidential.
Re: tomcat process dies out...
Hi, thanks for your quick response. But my server is a unix box running Red Hat 6.2. Pernica, Jan wrote: this is a known bug of JDK 1.3 on NT On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura [SMTP:[EMAIL PROTECTED]] wrote: hello, I am trying to setup multiple JVMs using mod_jk. the JVM running at port 8080 is okay. I'm having problem with the JVM running at port 8090. whenever, i log out of my server machine(the machine where i am starting my apache and tomcat), the tomcat process stops listening to the port 8090. Actually, the Tomcat(java) threads are getting killed when i log out. Please let me know where i am going wrong? i am starting tomcat1 as ./startup.sh -f server_1.xml thanks, kishore. __ Tato komunikace je urcena vyhradne pro adresata a je duverna. This communication is intended solely for the addressee and is confidential. -- Krishna Kishore Thotakura. Work 256 961 7818 Home 256 837 9927
RE: tomcat process dies out...
On Mon, 28 May 2001, Pernica, Jan wrote: this is a known bug of JDK 1.3 on NT But from the command he shows as how he's starting tomcat, it looks like he's on a UNIX machine. I'd say that probably all he needs to do is start it in the background, a la: ./startup.sh -f server_1.xml Might want to redirect to capture stdout and stderr to files as well. On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura [SMTP:[EMAIL PROTECTED]] wrote: hello, I am trying to setup multiple JVMs using mod_jk. the JVM running at port 8080 is okay. I'm having problem with the JVM running at port 8090. whenever, i log out of my server machine(the machine where i am starting my apache and tomcat), the tomcat process stops listening to the port 8090. Actually, the Tomcat(java) threads are getting killed when i log out. Please let me know where i am going wrong? i am starting tomcat1 as ./startup.sh -f server_1.xml thanks, kishore. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
RE: tomcat process dies out...
You may need to try nohup ./startup.sh -f server_1.xml This starts the process in the background and ignores hangups - output is to a non-tty. Regards, Matthew -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: 28 May 2001 16:22 To: [EMAIL PROTECTED] Subject: RE: tomcat process dies out... On Mon, 28 May 2001, Pernica, Jan wrote: this is a known bug of JDK 1.3 on NT But from the command he shows as how he's starting tomcat, it looks like he's on a UNIX machine. I'd say that probably all he needs to do is start it in the background, a la: ./startup.sh -f server_1.xml Might want to redirect to capture stdout and stderr to files as well. On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura [SMTP:[EMAIL PROTECTED]] wrote: hello, I am trying to setup multiple JVMs using mod_jk. the JVM running at port 8080 is okay. I'm having problem with the JVM running at port 8090. whenever, i log out of my server machine(the machine where i am starting my apache and tomcat), the tomcat process stops listening to the port 8090. Actually, the Tomcat(java) threads are getting killed when i log out. Please let me know where i am going wrong? i am starting tomcat1 as ./startup.sh -f server_1.xml thanks, kishore. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
RE: tomcat process dies out...
On Mon, 28 May 2001, Mathew Clark wrote: You may need to try nohup ./startup.sh -f server_1.xml This starts the process in the background and ignores hangups - output is to a non-tty. It was my impression that for most/all non-basic shells (e.g. anything but sh :-), backgrounding a job effectively nohup'ed it. I use csh and tcsh, and have never ever had to use nohup, simple backgrounding was sufficient. I thought such was the case for ksh (and its derivatives) as well, but upon checking out a few things, it appears that may not be the case. So perhaps if one is using ksh et al, one needs to use nohup. -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: 28 May 2001 16:22 To: [EMAIL PROTECTED] Subject: RE: tomcat process dies out... On Mon, 28 May 2001, Pernica, Jan wrote: this is a known bug of JDK 1.3 on NT But from the command he shows as how he's starting tomcat, it looks like he's on a UNIX machine. I'd say that probably all he needs to do is start it in the background, a la: ./startup.sh -f server_1.xml Might want to redirect to capture stdout and stderr to files as well. On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura [SMTP:[EMAIL PROTECTED]] wrote: hello, I am trying to setup multiple JVMs using mod_jk. the JVM running at port 8080 is okay. I'm having problem with the JVM running at port 8090. whenever, i log out of my server machine(the machine where i am starting my apache and tomcat), the tomcat process stops listening to the port 8090. Actually, the Tomcat(java) threads are getting killed when i log out. Please let me know where i am going wrong? i am starting tomcat1 as ./startup.sh -f server_1.xml thanks, kishore. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED]
Re: tomcat process dies out...
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 This starts the process in the background and ignores hangups - output is to a non-tty. It was my impression that for most/all non-basic shells (e.g. anything but sh :-), backgrounding a job effectively nohup'ed it. I use csh and tcsh, and have never ever had to use nohup, simple backgrounding was sufficient. I thought such was the case for ksh (and its derivatives) as well, but upon checking out a few things, it appears that may not be the case. So perhaps if one is using ksh et al, one needs to use nohup. -Original Message- From: Milt Epstein [mailto:[EMAIL PROTECTED]] Sent: 28 May 2001 16:22 To: [EMAIL PROTECTED] Subject: RE: tomcat process dies out... On Mon, 28 May 2001, Pernica, Jan wrote: this is a known bug of JDK 1.3 on NT But from the command he shows as how he's starting tomcat, it looks like he's on a UNIX machine. I'd say that probably all he needs to do is start it in the background, a la: ./startup.sh -f server_1.xml Might want to redirect to capture stdout and stderr to files as well. On Monday, May 28, 2001 4:52 PM, Krishna Kishore Thotakura [SMTP:[EMAIL PROTECTED]] wrote: hello, I am trying to setup multiple JVMs using mod_jk. the JVM running at port 8080 is okay. I'm having problem with the JVM running at port 8090. whenever, i log out of my server machine(the machine where i am starting my apache and tomcat), the tomcat process stops listening to the port 8090. Actually, the Tomcat(java) threads are getting killed when i log out. Please let me know where i am going wrong? i am starting tomcat1 as ./startup.sh -f server_1.xml thanks, kishore. Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] Milt Epstein Research Programmer Software/Systems Development Group Computing and Communications Services Office (CCSO) University of Illinois at Urbana-Champaign (UIUC) [EMAIL PROTECTED] -- Krishna Kishore Thotakura. Work 256 961 7818 Home 256 837 9927
Re: tomcat process dies out...
The commands can also look like: Under /bin/sh, /bin/ksh, /bin/bash, etc: nohup ./startup.sh -f server_1.xml /tmp/mytomcat.log 21 Under /bin/csh or /bin/tcsh nohup ./startup.sh -f server_1.xml ! Jan [EMAIL PROTECTED] 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 Jan K. Labanowski|phone: 614-292-9279, FAX: 614-292-7168 Ohio Supercomputer Center|Internet: [EMAIL PROTECTED] 1224 Kinnear Rd, |http://www.ccl.net/chemistry.html Columbus, OH 43212-1163 |http://www.osc.edu/
Re: tomcat process dies out...
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. 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 21 Under /bin/csh or /bin/tcsh nohup ./startup.sh -f server_1.xml ! Jan [EMAIL PROTECTED] 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 Jan K. Labanowski|phone: 614-292-9279, FAX: 614-292-7168 Ohio Supercomputer Center|Internet: [EMAIL PROTECTED] 1224 Kinnear Rd, |http://www.ccl.net/chemistry.html Columbus, OH 43212-1163 |http://www.osc.edu/ -- Krishna Kishore Thotakura. Work 256 961 7818 Home 256 837 9927
Re: tomcat process dies out...
On Mon, 28 May 2001, 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 21 Under /bin/csh or /bin/tcsh nohup ./startup.sh -f server_1.xml ! Don't you need a file name on that last one (after the !)? 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) [EMAIL PROTECTED]
Re: tomcat process dies out...
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 21 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 21 Under /bin/csh or /bin/tcsh nohup ./startup.sh -f server_1.xml ! Jan [EMAIL PROTECTED] 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) [EMAIL PROTECTED]