cancel
Showing results for 
Search instead for 
Did you mean: 

Apache Agent

Pietro_from_Mon
Level 3
Partner
Hi everybody,
    my system setup is Veritas 5.0, geographical single cluster redundancy.

One of the Agents in the configuration is monitoring the Apache Server.

Recently i faced the following error:
-----------------------------------------------------------------------------------------------------------------------------------------------
"2007/12/05 01:59:20 VCS ERROR V-16-55005-20017 (sun-ibm4) Apache:CTM_APACHE:online:<Apache::Start> Command [/Apache/bin/httpd] with args [ -f /Apache/conf/httpd.conf   -k start] returned exit code [1]"
 
"2007/12/05 01:59:20 VCS ERROR V-16-55005-20018 (sun-ibm4) Apache:CTM_APACHE:online:<Apache::Start> Start Failed. Return code [1]"
-----------------------------------------------------------------------------------------------------------------------------------------------

My troubleshooting was to try manually from terminal "
/Apache/bin/httpd" but ended with errors.
From documentation i see the Veritas Apache Agents uses this script to start the Apache Server, is it correct ?
This happens only on one setup, the same configuration in another setup works perfectly, what could I check to
further troubleshooting ?

Thank you a lot for any support
--Pietro

7 REPLIES 7

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified
Hi Pietro

You're thinking in trying to manually start apache it correct. You must also make sure that the other resources are online as well.

I imagine that your service group would contain a NIC, IP, MOUNT, APACHE processes, and possibly a VOLUME AND DISKGROUP (depending on the install)

Make sure that all the other resources below your apache resource are online i.e the file system is mounted, the ip address is only. I dont know what the dependencies of your service group are but it might be impossible for apache to start without these resources online.

What you can then do is freeze the service group or stop the cluster (hagrp -all -force) and leave those resources online.

Once all the resources are online you can troubleshoot the apache problem.

Pietro_from_Mon
Level 3
Partner
Hi Riaan,
    all other resources other than Apache Agent are online and working no problem with than, do you know
exactly what script / executable is launched to "start" the Apache Server by the related Agent ?

I need this information because I suppose the correct way to run Apache is using the command :
# apachectl start

but according to documentation Veritas made the Agent calling for "httpd" command, which is missing
some libraries on my servers, both the one working fine and the other with the ERROR message.

thanks
--Pietro

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified
Hi.

I've not done an apache cluster before but try this.

hagrp -resources "service group name"

This will give you a list of resources in the service group
then run this command on the apache resource.

hares -display "resource name"

It should give you the command and all the arguments its using to start apache. It should be in the section called start, or paste the output in here and i'll try and see what it is.

R

Pietro_from_Mon
Level 3
Partner
Thank you for the support here is the output :


root@sun-ibm4 # hares -display CTM_APACHE
#Resource    Attribute           System               Value
CTM_APACHE   Group               RIYADH               ctmgrp
CTM_APACHE   Group               localclus            ctmgrp
CTM_APACHE   Type                RIYADH               Apache
CTM_APACHE   Type                localclus            Apache
CTM_APACHE   AutoStart           localclus            1
CTM_APACHE   Critical            RIYADH               1
CTM_APACHE   Critical            localclus            1
CTM_APACHE   Enabled             RIYADH               1
CTM_APACHE   Enabled             localclus            1
CTM_APACHE   LastOnline          localclus            sun-ibm4
CTM_APACHE   MonitorOnly         RIYADH               0
CTM_APACHE   MonitorOnly         localclus            0
CTM_APACHE   ResourceOwner       localclus            unknown
CTM_APACHE   TriggerEvent        localclus            0
CTM_APACHE   ArgListValues       localclus:sun-ibm4   WARN      2       0                                                      /Apache/bin     ""      /Apache/bin/envvars     x.x.x.x      8051    root                                                   1       30      /Apache/conf/httpd.conf 0       0       0
CTM_APACHE   ConfidenceLevel     localclus:sun-ibm4   100
CTM_APACHE   Flags               RIYADH:sun-ibm3
CTM_APACHE   Flags               localclus:sun-ibm4
CTM_APACHE   IState              RIYADH:sun-ibm3      not waiting
CTM_APACHE   IState              localclus:sun-ibm4   not waiting
CTM_APACHE   Probed              RIYADH:sun-ibm3      1
CTM_APACHE   Probed              localclus:sun-ibm4   1
CTM_APACHE   Start               localclus:sun-ibm4   1
CTM_APACHE   State               RIYADH:sun-ibm3      OFFLINE
CTM_APACHE   State               localclus:sun-ibm4   ONLINE
CTM_APACHE   Cluster             RIYADH               RIYADH
CTM_APACHE   ComputeStats        localclus            0
CTM_APACHE   ConfigFile          localclus            /Apache/conf/httpd.conf
CTM_APACHE   DirectiveAfter      localclus
CTM_APACHE   DirectiveBefore     localclus
CTM_APACHE   EnableSSL           localclus            0
CTM_APACHE   EnvFile             localclus            /Apache/bin/envvars
CTM_APACHE   HostName            localclus            x.x.x.x
CTM_APACHE   Port                localclus            8051
CTM_APACHE   ResLogLevel         localclus            WARN
CTM_APACHE   ResName             RIYADH               CTM_APACHE
CTM_APACHE   ResourceInfo        RIYADH               State     Stale   Msg                                                            TS
CTM_APACHE   ResourceInfo        localclus            State     Valid   Msg                                                            TS
CTM_APACHE   RestartLimit        localclus            3
CTM_APACHE   SecondLevelMonitor  localclus            1
CTM_APACHE   SecondLevelTimeout  localclus            30
CTM_APACHE   SharedObjDir        localclus
CTM_APACHE   User                localclus            root
CTM_APACHE   httpdDir            localclus            /Apache/bin
CTM_APACHE   MonitorTimeStats    localclus:sun-ibm4   Avg       0       TS



Message Edited by Pietro from Monza on 12-10-2007 10:19 AM

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified
Hi,

I think its because you have x.x.x.x in the hostname section. The required attributes for the agent to work are

ConfigFile
httpdDir
HostName
Port
ResLogLevel
User

Please check and see if the working cluster has a value other than x.x.x.x it does not look right.

Pietro_from_Mon
Level 3
Partner
Sorry I only manually deleted the real IP with x.x.x.x just no to deliver personal information.
This is the configuration of the Agent
Apache CTM_APACHE (
        httpdDir = "/Apache/bin"
        SecondLevelMonitor = 1
        ResLogLevel = WARN
        ConfigFile = "/Apache/conf/httpd.conf"
        User = root
        HostName = "10.10.10.10"
        Port = 8051
        EnvFile = "/Apache/bin/envvars"
        RestartLimit = 3
        )


RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified
Ok,

I haven't done it for a while but i think you can start the application manually by running the online script for the agent with the required attributes i described in the previous post. The agent would be in /opt/VRTSvcs/bin/Apache/ but i dont think that will work because you say you cant start apache with the httpdir/httpd commands. That is the way the cluster starts it.

How else is it possible to start apache? If you can get it going you might be able to fool the cluster into thinking it brought it online. The cluster checks for the processes, and optionally use second level monitoring to also check it.

Is there any way for you to start it?