Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nohup get terminated 4

Status
Not open for further replies.

khalidaaa

Technical User
Jan 19, 2006
2,323
BH
Hi AIXers,

I have a problem with using nohup command. Commands prefixed with the nohup command should not normally be terminated on logging off the session but mine does!?!

Any body came across this strange problem?

Here is an output of what i have when trying to log off:

Code:
# nohup find / -print & 
[1]     77454

# Sending nohup output to nohup.out.


# exit
There are running jobs.

# exit

Regards,
Khalid
 
Perhaps because you didn't redirect output?


HTH,

p5wizard
 
Still same thing!

Code:
# nohup find / -print >/tmp/files.txt&
[1]     76710

# There are running jobs.

# 
Connection to testhost closed.

Regards,
Khalid
 
From my experience, I get the same message if I use nohup and then log off the server before the command is finished. However, if I log back in, I see the job running in the process table.

Have you logged back in to see if the job is still running? Another thing to note is that command might be finished before you log back in so to test you might want to nohup the sleep command, logout and then log back in to see if it's still running.

Regards,
Chuck
 
Thank you cspilman for the helpful comment.

I did as you adviced and you are right the sleep command stays after i logged off but now this is the real problem is how to make this line runs after i log off from an oracle session:

Code:
nohup /usr/bin/X11/xinit -- :1 -force -vfb -x abx -x dbe -x GLX&

This is a line to start virtual buffer for oracle 10g applicatoin server's report to provide the needed display.

Now our DBA has left a session open on his PC as a workaround to make the developers continue working but once he logs off the nohup dies!

Any thoughts?

Regards,
Khalid
 
Same as cspilman, when I run a job with nohup and then exit, it first shows me this message and I have to re-exit, but then when I log in the server the job is still running.
 
Thanks MoreFeo for the help.

But how can i prove the above shown code in this case?

I thought of putting this in the crontab and then add it to the inittab for later starting at reboot time but still why it doesn't work with the nohup!?!?

Regards,
Khalid
 
Try putting the command in a script and then nohup'ing the script.

Regards,
Chuck
 
Thanks cspilman for the help.

Our DBA is not available for now as it is 4:50PM in this part of the world and my duty finished by 3:30! So I should be going soon.

I will update you tomorrow with your comment.

and i will be waiting for other thoughts as well.

Regards,
Khalid
 
From talking about X11.vfb and OpenGL.OpenGL_X.dev.vfb:
To start the X Server with the XVFB and proper extensions :

/usr/bin/X11/X -force -vfb -x abx -x dbe -x GLX :0 >/dev/null

To restart the X Server automatically at the next reboot, add an entry to the /etc/inittab file :

mkitab “xvfb:2:respawn:/usr/bin/X11/X -force -vfb -x abx -x dbe -x GLX :0 >/dev/null”
 
Thanks MoreFeo for the nice comment. I'm trying to run this command on our test server. This command is running on our production with no problem! I don't deal with the vfb my self so i don't know how our resigned DBA did it!?!

Unfortunately I won't be able to try your command today as we have an official vacation for the death of Kuwait prince!

I will try this day after tomorrow and we'll let you know.

Regards,
Khalid
 
I can only support Morefeo's comments - this is the setup we have on our servers and the respawn seems to do the trick if it dies.

I want to be good, is that not enough?
 
I managed to solve the problem! Thanks for all who tried to assist me in this :)

The solution was exactly what cspilman said! I put that code in another file and then ran that file with nohup. Now its working like a charm :)

Stars all around :)

Regards,
Khalid
 
Gents,

I tried to add this line to the inittab as MoreFeo suggested but now i'm getting this error!

Code:
---------------------------------------------------------------------------
LABEL:          INIT_RAPID
IDENTIFIER:     3A30359F

Date/Time:       Mon Jun 16 00:53:46 SAUST 2008
Sequence Number: 472
Machine Id:      00C5C1EB4C00
Node Id:         
Class:           S
Type:            TEMP
Resource Name:   init

Description
SOFTWARE PROGRAM ERROR

Probable Causes
SOFTWARE PROGRAM

User Causes
PERFORMANCE DEGRADED

        Recommended Actions
        REVIEW DETAILED DATA

Detail Data
SOFTWARE ERROR CODE
Command is respawning too rapidly. Check for possible errors.
COMMAND
id:  xvfb "/usr/bin/su - oracle -c /ora0/app/oracle/scripts/start_xserver.sh >/d

Any idea how to get around this problem?

Regards,
Khalid
 
So change "respawn" to "once".

From init's point of view, the start_xserver.sh process ends after it has launched the X server. So init then has to start the script again - because inittab says so - "respawn"...

But then the next instance of start_xserver.sh also ends, so init tries again and again, ... until init has had enough and temporarily suspends that inittab line...



HTH,

p5wizard
 
Thanks p5wizard :) I've just changed that.

Regards,
Khalid
 
The "init is respawning too rapidly" indicates that the inittab looks for the process - finds that it is not running - and tries to respawn it. It is happening so fast that inittab thinks there is a problem - and reports it as the above error. Something is still wrong. It looks to me like the command is finishing faster than you think - and is going away.
 
Thanks costiles for your input.

When i changed that to once instead of respawn as p5wizard suggested, the process is still running and i don't have the problem of respawning too rapidly any more!

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top