HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Start/Stop script terminates even with nohup
Operating System - HP-UX
1833853
Members
2506
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2006 01:01 AM
01-26-2006 01:01 AM
Guys
Hopefully someone can help me with this as I am starting to pull my hair out....
I have a script under /sbin/init.d called stream. Bascially it sets up environ variable and then issues a command to run a command as a specific user....
STREAM_CONFIG=/stream/config
nohup su ssr -c $STREAM_CONFIG/stream.rc >> $log 2>&1
The stream.rc file looks like....
cd /stream/stream/bin
./stream -p 4501 -s ssr &
It rellies on Oracle running. Oracle gets started up before S855stream If I start up via /sbin/init.d/stream start the process starts and stays up and the log file reports that it is happy.
I have linked it ... /sbin/init.d/stream in the /sbin/rc3.d as S855stream
I can do.. /sbin/rc3.d/S855stream start and again the process starts and stays up.
If I reboot the system - the process starts and dies as soon as the login prompt appears on the console. The log file reports 'User Abort'
I did try it though cron ( thinking that perhaps some PATHS/ENV werent being picked up ) that worked!
Any ideas of how I can keep this process running or another way of starting it up please?
Hopefully someone can help me with this as I am starting to pull my hair out....
I have a script under /sbin/init.d called stream. Bascially it sets up environ variable and then issues a command to run a command as a specific user....
STREAM_CONFIG=/stream/config
nohup su ssr -c $STREAM_CONFIG/stream.rc >> $log 2>&1
The stream.rc file looks like....
cd /stream/stream/bin
./stream -p 4501 -s ssr &
It rellies on Oracle running. Oracle gets started up before S855stream If I start up via /sbin/init.d/stream start the process starts and stays up and the log file reports that it is happy.
I have linked it ... /sbin/init.d/stream in the /sbin/rc3.d as S855stream
I can do.. /sbin/rc3.d/S855stream start and again the process starts and stays up.
If I reboot the system - the process starts and dies as soon as the login prompt appears on the console. The log file reports 'User Abort'
I did try it though cron ( thinking that perhaps some PATHS/ENV werent being picked up ) that worked!
Any ideas of how I can keep this process running or another way of starting it up please?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2006 01:16 AM
01-26-2006 01:16 AM
Solution
Shalom,
If this process depends on oracle, starting it with nohup inadvisable. This is because the startup will not wait and is run in background. This will let other process start first.
Steps to fix.
1) Get it to start correctly on the command line.
2) Create a script that does what you did on the command line.
3) Test the script.
4) Add a line to the script env > /tmp/normal.txt
5) Add env > /tmp/startup.txt to the normal startup.
6) Compare the two files. Make the environment in the startup script the same as the one from the working script.
7) Reboot, the service will start.
SEP
If this process depends on oracle, starting it with nohup inadvisable. This is because the startup will not wait and is run in background. This will let other process start first.
Steps to fix.
1) Get it to start correctly on the command line.
2) Create a script that does what you did on the command line.
3) Test the script.
4) Add a line to the script env > /tmp/normal.txt
5) Add env > /tmp/startup.txt to the normal startup.
6) Compare the two files. Make the environment in the startup script the same as the one from the working script.
7) Reboot, the service will start.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2006 01:24 AM
01-26-2006 01:24 AM
Re: Start/Stop script terminates even with nohup
I will advice that you use full path names for all your file references. instead of $ then try to add some debugging lines to it. Running scripts from during startup or cron mostly require this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2006 01:49 AM
01-26-2006 01:49 AM
Re: Start/Stop script terminates even with nohup
Hi Kevin:
You are no-hupping the 'su'. That's not what you want! To see what's happening (in part), at command line, do:
# nohup su someuser -c somescript
Regards!
...JRF...
You are no-hupping the 'su'. That's not what you want! To see what's happening (in part), at command line, do:
# nohup su someuser -c somescript
Regards!
...JRF...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP