- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- daemon start at boot vs. after boot
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
11-01-2005 04:57 AM
11-01-2005 04:57 AM
daemon start at boot vs. after boot
HP-UX 11.11.
The application runs a daemon, which accepts client connections and starts a server process for each connection. In the past it hasn't mattered whether the daemon is started via rc script at boot time, or after boot from the root account command line. After a recent upgrade it only works if started from rc script at boot. If started from the command line after boot, the client communication server processes are dying immediately after the daemon creates them.
I'm using the same script when starting from the command line that is used at boot. I also tried starting from cron after boot, thinking it would more closeley duplicate the boot environment, but have the same problem.
I modified the start script to log some environment information, then ran it both ways. The differences are few and seem completely inconsequential, - such things as environment variables for rwhod, snmp agents, sendmail, etc. in one environment but not the other, - nothing that would actually be used by the daemon.
Any suggestions about what else I can try?
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:07 AM
11-01-2005 05:07 AM
Re: daemon start at boot vs. after boot
I would do this which should exactly duplicate what the rc script does:
/sbin/init.d/yourrcscriptname stop # stops it
/sbin/init.d/yourrcscriptname start # starts it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:08 AM
11-01-2005 05:08 AM
Re: daemon start at boot vs. after boot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:10 AM
11-01-2005 05:10 AM
Re: daemon start at boot vs. after boot
I have tried invoking the script in the way in which you suggest, both from the command line, as as a cron job. I still have the same problem.
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:12 AM
11-01-2005 05:12 AM
Re: daemon start at boot vs. after boot
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:14 AM
11-01-2005 05:14 AM
Re: daemon start at boot vs. after boot
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:15 AM
11-01-2005 05:15 AM
Re: daemon start at boot vs. after boot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:21 AM
11-01-2005 05:21 AM
Re: daemon start at boot vs. after boot
I don't think it is a problem with listener not being properly killed, process already listening on the port, because if I remove the rc script altogether and reboot, then start the daemon from the command line, I have the same problem.
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:22 AM
11-01-2005 05:22 AM
Re: daemon start at boot vs. after boot
Have you tried starting the script in debug mode? ie. sh -x /sbin/init.d/rcscript start?
maybe another thing you can try is to use tusc http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-7.7/ to start the daemon and see why it fails (when it fails from the command line)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:28 AM
11-01-2005 05:28 AM
Re: daemon start at boot vs. after boot
The startup script is fairly simple, just a few lines. It sets some variables and spawns the daemon process. Since it is the same script running in both cases, at boot or after boot, I think it must be the environment setup before the script runs that is different.
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:38 AM
11-01-2005 05:38 AM
Re: daemon start at boot vs. after boot
The second is to check and make sure you have full path names / environmental setting configured properly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:43 AM
11-01-2005 05:43 AM
Re: daemon start at boot vs. after boot
1. start it up in the normal mode, then use tusc to attach to the spawned daemon to observe it in action.
2. then try starting it up from the command prompt with tusc -f spawned_daemon (which should fail right?). You can compare the output of the tusc run from 1 - there might be a clue to what the problem is.
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:46 AM
11-01-2005 05:46 AM
Re: daemon start at boot vs. after boot
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 05:51 AM
11-01-2005 05:51 AM
Re: daemon start at boot vs. after boot
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 06:31 AM
11-01-2005 06:31 AM
Re: daemon start at boot vs. after boot
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2005 04:48 AM
11-02-2005 04:48 AM
Re: daemon start at boot vs. after boot
umask is the same whether the script is run as boot script or from command line after boot, 022.
output of set -x is identical whether the script is run as boot script or from command line after boot.
tusc is giving me a lot of info, but so far I haven't found the smoking gun.
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2005 05:33 AM
11-02-2005 05:33 AM
Re: daemon start at boot vs. after boot
You should determine if this is a multi-threaded application or does it do a fork-exec for each client connection. You can use tusc to monitor the daemon and depending upon the system calls invoked, you will know that. This will narrow down the possible resources being used.
You should also note that there is another difference when run manually or when executed by rc and that is that stdin, stdout, and stderr are different.
Yours is a perfect example of why every application, patch, and/or upgrade should first be deployeded on a Sandbox so that you know about the bugs before they actually bite you. You are really going to have to work with your vendor to replicate the problem. Compare kernel tunings and most especially compare swlist outputs with their box. I'm betting on a difference in shared libraries so a comparison of ldd outputs for both deamons would be helpful along with a cksum of each shared library listed.
If you don't have a Sandbox, now is a good time to talk with your powers-that-be to get one. Moreover, a good old slow box from the used-equipment market makes a better Sandbox than a brand-new lightning-quick box. Why? Because if it is a dog when running on a slow lightly loaded Sandbox, it's guaranteed to be a dog in Production.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2005 06:22 AM
11-02-2005 06:22 AM
Re: daemon start at boot vs. after boot
The daemon does a fork-exec for each client connection.
(BTW, I tried using the -f switch on tusc, to follow the fork, but using that in the daemon started by the boot process goofs up the forked process so that it doesn't work properly. It is unable to connect properly to the oracle database.)
Your comments about needing a sandbox system are well taken. I neglected to mention it earlier, but this problem is on our development / test system for this application. This upgrade / problem has not made it onto our production system.
- John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2005 11:02 AM
11-29-2005 11:02 AM
Re: daemon start at boot vs. after boot
Something else interesting has just come up. We've been testing and developing with some other vendor's software on our same HP-UX system. It seems to be exhibiting a similar problem. Not entirely sure yet. But it starts a daemon, which fork-execs proceeses for each client connection. The daemon seems fine, but the other processes are dying.
Now I'm wondering if this problem may be caused by something in our HP-UX installation, not specifically with the vendor's software...
- John