![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
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. |
|
#5
|
||||
|
||||
|
Quote:
|
|
#6
|
|||
|
|||
|
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. |
|
#7
|
||||
|
||||
|
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. |
||||
| Google The UNIX and Linux Forums |