- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script will not start processes from /sbin/init.d
Operating System - HP-UX
1824976
Members
3706
Online
109678
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
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
тАО02-10-2007 06:40 AM
тАО02-10-2007 06:40 AM
Script will not start processes from /sbin/init.d
HP-UX swprodso B.11.11 U 9000/800/rp7420
##################################
Hello anyone who cares to help. I have a script that will execute just fine from command line ( start processes ), but will
not start processes from /sbin/init.d when system reboots ?
##################################
# ll /sbin/rc3.d/S999mqmjava
lrwx------ 1 root sys 27 Feb 9 16:56 /sbin/rc3.d/S999mqmjava -> /sbin/init.d/mqm_abrrc_java
###########
Attempt to start in rc.log :
#
Starting mqm , java applications
Output from "/sbin/rc3.d/S999mqmjava start":
----------------------------
java did not start successfully. exiting...
"/sbin/rc3.d/S999mqmjava start" SKIPPED
###########
Produced outputted log files :
Failed after system reboot :
-rw-r--r-- 1 root root 37656 Feb 10 04:25 mqm_one_script.log.021007.0425
No processes started :
Successfull after command line execution :
-rw-r--r-- 1 root root 37859 Feb 10 10:34 mqm_one_script.log.021007.1034
starts the following processes :
root@swprodso[/sbin/init.d]
# ps -aef | grep -i mqm
mqm 20209 1 0 07:21:31 ? 0:11 /opt/java1.4/bin/PA_RISC2.0/rmiregistry
mqm 20213 1 0 07:21:31 ? 0:25 /opt/java1.4/bin/PA_RISC2.0/java -DInst=EPEUAT -classpath /home
######################################
Difference between
successful-command line :
mqm_one_script.log.021007.1034
failed-rc3.d startup
mqm_one_script.log.021007.0425
root@swprodso[/tmp]
# diff mqm_one_script.log.021007.0425 mqm_one_script.log.021007.1034 > /tmp/diff.mqm.out ; cat /tmp/diff.mqm.out
1d0
< stty: : Not a typewriter
31,33c30
< stty: : Not a typewriter
< stty: : Not a typewriter
#!/sbin/sh -vx
---
#!/sbin/sh -vx
160d156
< + /opt/java1.4/bin/rmiregistry
163a160
> + /opt/java1.4/bin/rmiregistry
192d188
< + 1>> /var/mqm/epe.out
193a190
> + 1>> /var/mqm/epe.out
##################################
Hello anyone who cares to help. I have a script that will execute just fine from command line ( start processes ), but will
not start processes from /sbin/init.d when system reboots ?
##################################
# ll /sbin/rc3.d/S999mqmjava
lrwx------ 1 root sys 27 Feb 9 16:56 /sbin/rc3.d/S999mqmjava -> /sbin/init.d/mqm_abrrc_java
###########
Attempt to start in rc.log :
#
Starting mqm , java applications
Output from "/sbin/rc3.d/S999mqmjava start":
----------------------------
java did not start successfully. exiting...
"/sbin/rc3.d/S999mqmjava start" SKIPPED
###########
Produced outputted log files :
Failed after system reboot :
-rw-r--r-- 1 root root 37656 Feb 10 04:25 mqm_one_script.log.021007.0425
No processes started :
Successfull after command line execution :
-rw-r--r-- 1 root root 37859 Feb 10 10:34 mqm_one_script.log.021007.1034
starts the following processes :
root@swprodso[/sbin/init.d]
# ps -aef | grep -i mqm
mqm 20209 1 0 07:21:31 ? 0:11 /opt/java1.4/bin/PA_RISC2.0/rmiregistry
mqm 20213 1 0 07:21:31 ? 0:25 /opt/java1.4/bin/PA_RISC2.0/java -DInst=EPEUAT -classpath /home
######################################
Difference between
successful-command line :
mqm_one_script.log.021007.1034
failed-rc3.d startup
mqm_one_script.log.021007.0425
root@swprodso[/tmp]
# diff mqm_one_script.log.021007.0425 mqm_one_script.log.021007.1034 > /tmp/diff.mqm.out ; cat /tmp/diff.mqm.out
1d0
< stty: : Not a typewriter
31,33c30
< stty: : Not a typewriter
< stty: : Not a typewriter
#!/sbin/sh -vx
---
#!/sbin/sh -vx
160d156
< + /opt/java1.4/bin/rmiregistry
163a160
> + /opt/java1.4/bin/rmiregistry
192d188
< + 1>> /var/mqm/epe.out
193a190
> + 1>> /var/mqm/epe.out
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2007 07:04 AM
тАО02-10-2007 07:04 AM
Re: Script will not start processes from /sbin/init.d
Hi:
Your '/etc/rc.log' shows:
"/sbin/rc3.d/S999mqmjava start" SKIPPED
This indicates that your script exited with a return value of two (2). This would occur if, in turn, the controlling variable the configuration file for 'mqmjava' in the '/etc/rc.config.d/' directory is set to zero (0).
Regards!
...JRF...
Your '/etc/rc.log' shows:
"/sbin/rc3.d/S999mqmjava start" SKIPPED
This indicates that your script exited with a return value of two (2). This would occur if, in turn, the controlling variable the configuration file for 'mqmjava' in the '/etc/rc.config.d/' directory is set to zero (0).
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2007 07:38 AM
тАО02-10-2007 07:38 AM
Re: Script will not start processes from /sbin/init.d
Also, make sure your script has all the required PATH settings inside it.
When running this from root it seems it can find correct paths, but they may not be set in the environment when run from system boot up
When running this from root it seems it can find correct paths, but they may not be set in the environment when run from system boot up
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-10-2007 08:54 AM
тАО02-10-2007 08:54 AM
Re: Script will not start processes from /sbin/init.d
> stty: : Not a typewriter
While this is not the cause of the startup error, it indicates that you are likely using su and the user's profile has not been adjusted for batch mode processing. Every terminal dependent command must be protected in profiles that may be used in batch mode (ie, scripts like start/stop, cron, etc). Take a look at /etc/profile and the MQM user's .profile and protect the commands:
stty
ttytype
tabs
tset
tput
something like this:
if tty -s
then
eval $(ttytype -s)
stty ...
tabs ...
tput
fi
The other step is to trace the startup script during execution. Add set -x at the top of the script and a set +x at the end of the script to turn off tracing. That will show what happens when the system boots up (in /etc/rc.log).
Bill Hassell, sysadmin
While this is not the cause of the startup error, it indicates that you are likely using su and the user's profile has not been adjusted for batch mode processing. Every terminal dependent command must be protected in profiles that may be used in batch mode (ie, scripts like start/stop, cron, etc). Take a look at /etc/profile and the MQM user's .profile and protect the commands:
stty
ttytype
tabs
tset
tput
something like this:
if tty -s
then
eval $(ttytype -s)
stty ...
tabs ...
tput
fi
The other step is to trace the startup script during execution. Add set -x at the top of the script and a set +x at the end of the script to turn off tracing. That will show what happens when the system boots up (in /etc/rc.log).
Bill Hassell, sysadmin
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
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP