Forum Discussion

raga's avatar
raga
Level 3
13 years ago

Unable to add user parameter while configuring Apache Agent

Im Using VCS 4.0 on linux.

Cluster Manager : 4.4

Cluster Server : 4.1

When im trying to Do "Import Types" and import  vcsApacheTypes.cf , I dont see user parameter here!.

Moreover , If i try to manually add a User parameter that doesnt work either.

Please let me know how to configure an Apache agent so that the apache process starts with a specified user, instead of root user where i installed VCS.

  • You can't just add "user" to Apache types file - it should already be there - what version of the Apache agent are you using (look at package for Apache which is probably something like VRTSvcsap) - it should be 4.1.

    It maybe you import of types failed, so look at original location of types file - there should be one in /etc/VRTSvcs/conf/sample_Apache/ApacheTypes.cf and see if this contains User attribute - if it does then delete current Apache type (in GUI) and re-add.  To re-add you can use command line as follows:

     mkdir /etc/VRTSvcs/conf/config/tmp 
    cd  /etc/VRTSvcs/conf/config/tmp
    cp /etc/VRTSvcs/conf/sample_Apache/ApacheTypes.cf .
    echo "include \"Apache/ApacheTypes.cf\"" > main.cf
    hacf -verify .
    haconf -makerw
    . ./main.cmd
    haconf -dump -makero 

    Mike

9 Replies

  • Can you provide the output of the following:

     hatype -list
    hatype -display Apache 
    hares -modify apache_res_name User required_user
    cat /etc/VRTSvcs/conf/config/vcsApacheTypes.cf

    Also can you provide the command you are using to manually add User attribute and any error messages it gives.

    Mike

  • Hi Mike

     Im unable to post the result of the commands you requsted for here!.

      But when i said i manually added user, i edited the ApacheTypes.cf file and added a user parameter.

     Im unable to circumvent the word verification here.

  • hatype -list
    Apache
    Application
    CampusCluster
    DNS
    Db2udb
    DiskGroup
    DiskReservation
    ElifNone
    FileNone
    FileOnOff
    FileOnOnly
    IP
    IPMultiNIC
    LVMLogicalVolume
    LVMVolumeGroup
    Mount
    MultiNICA
    NFS
    NIC
    NetBios
    NotifierMngr
    Phantom
    Process
    ProcessOnOnly
    Proxy
    SambaServer
    SambaShare
    Share
    VRTSWebApp
    Volume

  • You can't just add "user" to Apache types file - it should already be there - what version of the Apache agent are you using (look at package for Apache which is probably something like VRTSvcsap) - it should be 4.1.

    It maybe you import of types failed, so look at original location of types file - there should be one in /etc/VRTSvcs/conf/sample_Apache/ApacheTypes.cf and see if this contains User attribute - if it does then delete current Apache type (in GUI) and re-add.  To re-add you can use command line as follows:

     mkdir /etc/VRTSvcs/conf/config/tmp 
    cd  /etc/VRTSvcs/conf/config/tmp
    cp /etc/VRTSvcs/conf/sample_Apache/ApacheTypes.cf .
    echo "include \"Apache/ApacheTypes.cf\"" > main.cf
    hacf -verify .
    haconf -makerw
    . ./main.cmd
    haconf -dump -makero 

    Mike

  • Hi Mike.

    Thanks for the help!. my apache agent is 4.0. i saw the code. it was not accepting any User attribute!.

    So have to find a way to upgrade the agent to 4.1!.

    thanks for your help!

  • You can use Application agent to start Apache. It has all the attributes for configuring a User, StartProgram, StopProgram, MonitorProgram, CleanProgram, MonitorProcesses etc.

  • Hi Satish. Agreed , we can use Application agent to start apache process. But the problem is ,if i use apachectl -k start. this runs in back ground and is not created the httpd.pid file immediately. so my monitoring process is not fool proof. So i thought,using an inbuilt agent is a better idea than writing scripts myself. Moreover Im surprised why my agent cannot be configured with user name?? is this something available only 4.1 onwards?
  • You are right, you should use inbuilt agent rather than Application agent.  Agents in the Symantec agent pack are tried and tested and so are more reliable than using Application agent.  I don't know why 4.1 agent is not easily found on sort.symantec.com, but I suspect it maybe because VCS 4.1 is unsupported on all platforms except Linux.  There is an option to download a tar of all agents for Linux on Sort, so it MAY be in this tar ball and Satish (as a Symantec employee) should also be able to help you locate this agent as it will be in any agent pack (agent packs were used before agents started been made available on SORT)

    If you are not able to get hold of the 4.1 Linux Apache agent, let me know as I am pretty sure I have agent packs on an external disk somewhere, so I could extract the agent you require.

    I have attached documention for 4.1 agent

    Mike

  • Thanks Mike for your help.

    For my problem, i've modified the "online" perl script /opt/VRTvcs/bin/Apache to run the httpd command to run as the user i wish.

    So now, my apache starts as the user i want.

    Thanks for the help. Mostly we are not going to upgrade the agent.... this seems to be simple solution and works for me now.