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?
 
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
 
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
 
NopiusCommented:
> 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
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
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
 
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
 
arnoldCommented:
When troubleshooting issues with applications, checking the logs often helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.