Why does my webserver stop everytime I exit my session?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Why does my webserver stop everytime I exit my session?
# 1  
Old 04-13-2007
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. Smilie
# 2  
Old 04-13-2007
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  
Old 04-13-2007
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. Smilie
# 4  
Old 04-13-2007
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  
Old 04-13-2007
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.
# 6  
Old 04-16-2007
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! Smilie Smilie

Cheers.
# 7  
Old 04-16-2007
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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remote Desktop Session Prints Warning Message Everytime I Hit One Specific Key

Hello All, My question has to do with a Remote Desktop Session going from my Linux HOST to a Windows GUEST. Linux OS: OpenSuSE 11.4 i586 Windows OS: Windows Server 2003 For some reason after I have run rdekstop to connect to the Windows Guest, whenever I click on the Shift key I get the... (0 Replies)
Discussion started by: mrm5102
0 Replies

2. UNIX for Dummies Questions & Answers

Need help to stop a qlogin session

Hi Everyone, I am a new unix user. I started a qlogin session in SSH terminal, then I closed the window assuming that the qlogin session will be closed automatically. But it was still running. I tried to kill the process using kill ID or kill -9 ID, but the ID I got using ps aux | grep... (1 Reply)
Discussion started by: ttroo2003
1 Replies

3. Shell Programming and Scripting

how to exit ssh session

Hi , I am running a script on multiple servers.When I run that script on one server,I want to exit from that server and want to go to next server.PFB script: Suppose there are 3 servers:server1,server2,server3.I am currently in server1. for h in {2..3} do ssh username@server$h <<EOF ... (4 Replies)
Discussion started by: sonu141
4 Replies

4. Shell Programming and Scripting

Ctrl-C or Ctrl-Z causing exit the session

H! I have written script where it need to invoke the perl script in background, then write the pid in temp file then bring back the job to foreground. whenever the Ctrl-C or Ctrl-Z is pressed in the script has to exit and prompt should be dispalyed. but this script causing exit from shell session... (2 Replies)
Discussion started by: jramesh1
2 Replies

5. Solaris

I am not able to login in gnome session and java session in Sun solaris 9& 10

I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies

6. Shell Programming and Scripting

Hiding Directories on a Session by Session basis

Hi, Apologies if anyone has read my recent post on the same subject in the Linux forum, just thought actually the solution might more likely come from scripting. Essentially, I am trying to restrict access to directories based on the user's name AND their location on a session-by-session... (3 Replies)
Discussion started by: en7smb
3 Replies

7. Linux

How to stop linux man pages from clearing on exit?

Whenever I quit out of reading a man page, it clears the screen. I do not like this behavior, as I'd like to keep part of the man page on the screen while I type out a command. How do I stop this behavior? (6 Replies)
Discussion started by: akbar
6 Replies

8. Shell Programming and Scripting

sqlplus session being able to see unix variables session within a script

Hi there. How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly. sqlplus << EOF user1@db1/pass1 BEGIN PACKAGE1.perform_updates($1,$2,$3); END; EOF Thanks in advance, Abrahao. (2 Replies)
Discussion started by: 435 Gavea
2 Replies

9. Shell Programming and Scripting

Makefile relinks everytime

Hi guys, I'm a firsttime poster. My makefile is relinking everytime, even if nothing changes. Is there anyway to have it stop doing this? Here the makefile: F77C = /usr/bin/f77 -O VERSION =9.4 VPATH = ../poten # executables that can be built from this makefile OH3S =... (10 Replies)
Discussion started by: bellings
10 Replies
Login or Register to Ask a Question