The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to stop linux man pages from clearing on exit? akbar Linux 6 03-01-2007 11:28 PM
backing up file everytime script run and saving other backups knc9233 UNIX for Dummies Questions & Answers 4 01-29-2007 06:21 AM
Need to run source .bashrc everytime kalyanraj Shell Programming and Scripting 2 09-22-2006 06:06 AM
sqlplus session being able to see unix variables session within a script 435 Gavea Shell Programming and Scripting 2 07-03-2006 07:11 AM
Makefile relinks everytime bellings Shell Programming and Scripting 10 06-17-2005 12:54 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 04-13-2007
Registered User
 

Join Date: Feb 2007
Posts: 9
Why does my webserver stop everytime I exit my session?

Hi,

We have a webserver which runs on our unix server, we had to stop it for some work to be carried out, and restarted it earlier this week.

I'm logging in as myself and then root and starting the webserver as follows:

cd /etc/init.d
./northgate.web start

this starts it up fine, however whenever I exit as root and exit as myself from my telnet session, the webserver stops. Looks like whichever process is running, stops whenever I log out.

I'm not sure which process is related to the the webserver, so can't monitor it at the moment.

I was just wondering if any of you guys had any suggestions as to how/what I should do to keep the process running in the background even when I end my session.

Cheers, for your help.
Reply With Quote
Forum Sponsor
  #2  
Old 04-13-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Which webserver is it? Take a look at the error file for more information. A webserver is supposed to be a long running service and should not exit when you logout.
Reply With Quote
  #3  
Old 04-13-2007
Registered User
 

Join Date: Feb 2007
Posts: 9
thats right, which is why this is so odd. I've found the processes which get started up and I'll do a bit more investigation.

I was hoping it was maybe something obvious which I'd missed...

cheers anyway.
Reply With Quote
  #4  
Old 04-13-2007
Registered User
 

Join Date: Nov 2003
Location: Minnesota
Posts: 388
I think when you log out it kills the process since you started it "live". You should put your webserver in a startup script linked from /etc/rc3.d or whichever you want if you would like it running at all times when the server is up.

If you do start it live, use nohup to make it so the process started doesn't die when you log out.
Reply With Quote
  #5  
Old 04-13-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Quote:
Originally Posted by rhfrommn
I think when you log out it kills the process since you started it "live". You should put your webserver in a startup script linked from /etc/rc3.d or whichever you want if you would like it running at all times when the server is up.

If you do start it live, use nohup to make it so the process started doesn't die when you log out.
That shouldn't be needed. No webserver would be written to behave the way the OP is saying it is. And since the OP said that some changes were carried out, I'm guessing that those changes are causing the server to behave like this.
Reply With Quote
  #6  
Old 04-16-2007
Registered User
 

Join Date: Feb 2007
Posts: 9
Thanks for the feedback.

No changes were made to the webserver itself, as far as I'm aware, I was going to try using nohup this morning, but another colleague realised that we should just be able to use & at the end of the command to keep the process from ending when I log out.

eg.

./northgate.web start &

Can't believe we didn't think of that last week!

Cheers.
Reply With Quote
  #7  
Old 04-16-2007
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,618
I doubt that the & will do it. nohup might solve it. Or try:
echo /etc/init.d/northgate.web start | at now

By running it via "at", it will not have a controlling terminal. The problem is that your webserver is not daemonizing itself properly when launched in an interactive session.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:59 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0