Solaris 10 - Apache 2.0.58 will not start using startup script ???

Greetings.  Having an issue on Solaris 10 with Apache 2.0 not starting.  Our apache build is very basic.  All the web server does is host an html file that we use for monitoring.  Everything works fine when I start it manually.  However, whenever there's any maintenance and the server is re-booted apache is not starting automatically like it should.  Here's the details:

Server Version - SunOS uuccs20 5.10 Generic_142900-01 sun4u sparc SUNW,Sun-Fire-V240

In /etc/rc3.d there is a link as follows:

lrwxrwxrwx   1 root     root          22 Jan  5 08:36 S98sm -> /etc/init.d/checkers

"checkers" is our startup script and the inside of it looks like:
/usr/local/NewAtlanta/ServletExecAS/se-OneViewMonitor/StartServletExec &
sleep 100
/usr/local/apache2/bin/apachectl start
sleep 300

Servlet Exec starts fine but apache does not.  What am I missing?  Alternatively if someone can provide a basic apache 2.0 startup script my pathing is /usr/local/apache2.

thanks!

jdissupportAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jdissupportAuthor Commented:
One other thing I should mention.  The main thing I am looking for is for apache to start when the server is re-booted for any kind of maintenance.  The svcs -a output looks like this:

"legacy_run     Apr_16   lrc:/etc/rc3_d/S98sm"
0
Artysystem administratorCommented:
> However, whenever there's any maintenance and the server is re-booted apache is not starting automatically like it should.  Here's the details:

What do you mean by 'maintanance' state? From the point of view of Solaris 'maintanance' state may occur when the system is not bootable, no local fylesystems are mounted (except / in read-only), when no network is configured yet...
Do you mean the same?

0
arnoldCommented:
The script is usually straight forward.
Check for the existence of the httpd.conf file.
Do you need SSL enabled?
What happens if you run the apachectl start from the command line.
Check the apache log files.

It sounds as though the script runs at boot, but apache fails to start or starts and exits.
0
The 7 Worst Nightmares of a Sysadmin

Fear not! To defend your business’ IT systems we’re going to shine a light on the seven most sinister terrors that haunt sysadmins. That way you can be sure there’s nothing in your stack waiting to go bump in the night.

jdissupportAuthor Commented:
Ok - to clarify maintenance.  What I mean by that is like a routine update or something that causes the server to be re-booted.  That is all.  Apache only needs to start when the server is coming up "normally" for production use.    When I run "apachectl -k start" from the apache "bin" directory at the command line it starts fine...
0
arnoldCommented:
what happens if you run it in the same manner you have in the script.
/usr/local/apache2/bin/apachectl start?
Try adding the -k option and see if that makes a difference,
ps -ef | grep httpd is definetly not running? Or you may have the default Sun httpd starting which prevents the starting of the updated/compiled apache.
disable the sun included/installed apache in /usr/sbin/httpd or is it in.httpd from starting on boot..

0
RowleyCommented:
To elaborate on arnolds last point, check for sun apache install by doing the following:

root@opensolaris0906:/etc/squid# svcs \*apac\*
STATE          STIME    FMRI
online         Apr_13   svc:/network/http:apache22
$

Then disable if found to be running:
root@opensolaris0906:/etc/squid# svcs \*apac\*
STATE          STIME    FMRI
disabled       12:14:18 svc:/network/http:apache22

Then try starting your apache instance. If all else fails, post details from you error_log, ssl_engine_log and messages file.
Also, consider creating a smf manifest for your services instead of legacy rc scripts.




0
jdissupportAuthor Commented:
# svcs \*apac\*
STATE          STIME    FMRI
disabled       11:43:42 svc:/network/http:apache2

For whatever reason the script is not kicking off at all...  there is nothing in the error_log.  I'll continue to dig
0
RowleyCommented:
Anything in any error log? Have you a listen statement in your conf? Does netstat -anf inet | grep LISTEN show anything listening on the port you have configured apache to listen on?
0
arnoldCommented:
Into what initlevel does your system boot initlevel 3 mutliuser or 5 graphical multiuser?? Check /etc/inittab
Often these scripts should be in rc2.d
The rc3.d script is a symbolic link S88sm, what are the permissions on /etc/init.d/checkers?

0
jdissupportAuthor Commented:
I solved the problem.  We use Siteminder which loads as an apache module/plug-in and although I was loading environment variables globally through /etc/profile they were not avail at boot time which was why the script was failing.  Once I added the environment variables to the script everything started working fine.  Thanks for all of your suggestions.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
arnoldCommented:
When troubleshooting issues with applications, checking the logs often helps.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.