help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cannot copy cfagent.conf file to client from server


From: Friendly Tourney
Subject: cannot copy cfagent.conf file to client from server
Date: Thu, 17 Nov 2005 10:58:12 -0800 (PST)

Hi Folks,
I have tried to read as much documentation as possible to resolve this, but i am
stuck now.
My objective is to have a master server which has a master cfagent.conf which
will be distributed to all the client machines. I have installed cfengine in
"/usr/local/cfengine" on all machines.
When i run cfrun on the master server i get the following error,
masterserver:/var/cfengine/inputs # cfrun
cfrun(0):         .......... [ Hailing clientmachine.domain.com ] ..........
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
cfengine:clientmachine:/var/cfengine/inputs/update.conf:79: Warning:
actionsequence is empty
cfengine:clientmachine:/var/cfengine/inputs/update.conf:79: Warning: perhaps
cfagent.conf/update.conf have not yet been set up?
cfengine:: Can't stat /var/cfengine/masterfiles/inputs/cfagent in copy
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
I have a master server ( masterserver.domain.com ) and a clientmachine (
clientmachine.domain.com) . They both share the same domain , "domain.com".
The files on my masterserver.domain.com are as follows .
CFAGENT.CONF FILE
masterserver:/var/cfengine/masterfiles/inputs # vi cfagent.conf
control:
   actionsequence = ( files shellcommands )
   domain         = ( doc.nycnet )
   timezone       = ( EST )
   cfrunCommand  = ( "/usr/local/cfengine/sbin/cfagent" )
files:
   /etc/cftest1
         mode=644        # make sure the file permissions are right
         owner=psaraswa      # make sure it's owned by root
         action="" # if anything is wrong, fix it immediately!
         checksum=md5    # keep a "tripwire" checksum to tell us
                         # if any changes occur here
   /etc/cftest2 mode=600 owner=psaraswa action="">shellcommands:
      "/bin/echo Replace me with something useful"
      "/usr/local/bin/MyScript.sh"
# end of cfagent.conf file
UPDATE.CONF : present in both masterserver and clientmachine
masterserver:/var/cfengine/inputs # vi update.conf
control:
   actionsequence  = ( copy tidy )  # Keep this simple and constant
   domain          = ( domain.com )  # Needed for remote copy
   policyhost      = ( masterserver.domain.com )
   master_cfinput  = ( /var/cfengine/masterfiles/inputs )
   workdir         = ( /var/cfengine )
  linux::
   cf_install_dir  = ( /usr/local/cfengine/sbin )
copy:
     $(master_cfinput)            dest=$(workdir)/inputs
                                  r=inf
                                  mode=700
                                  type=binary
                                  exclude=*.lst
                                  exclude=*~
                                  exclude=#*
                                  server=$(policyhost)
                                  trustkey=true
tidy:
     $(workdir)/outputs pattern=* age=7
# end of update.conf file
CFSERVD.CONF : on the masterserver
masterserver:/var/cfengine/inputs # vi cfservd.conf
control:
  domain = ( domain.com )
  cfrunCommand = ( "/var/cfengine/bin/cfagent" )
  trustkeysfrom = ( 10.240.187.184 10.240.181.225 ) #clientserver and            
                                        #masterserveripaddresses
  MaxConnections = ( 50 )
 AllowConnectionsFrom = (
                         10.240.187.184    # IPaddresses of masterserver and
                         10.240.181.225    # clientserver
                         )
AllowUsers = ( root )
grant:
        /var/cfengine/masterfiles/inputs *.doc.nycnet
        /var/cfengine/inputs *.doc.nycnet
        /var/cfengine/bin/cfagent *.doc.nycnet
        /var/cfengine *.doc.nycnet
#end of cfservd.conf file
CFRUN.HOSTS  on masterserver
masterserver:/var/cfengine/inputs # vi cfrun.hosts
domain = domain.com
access=root
clientmachine.domain.com
#end of cfrun.hosts file
Also, cfservd listens on 5308 on the masterserver ,
masterserver:/var/cfengine/inputs # netstat -tanp |grep 5308
tcp        0      0 :::5308                 :::*                    LISTEN     
29446/cfservd   
NOW ON CLIENT , clientmachine.domain.com , has the following files.
The exact same update.conf from the masterserver is copied to 
/var/cfengine/inputs
CFSERVD.CONF FILE ON clientmachine
clientmachine:/var/cfengine/inputs # vi cfservd.conf
control:
  domain = ( domain.com )
  trustkeysfrom = ( 10.240.187.184 10.240.181.225 ) #Both master&client ip's
  cfrunCommand = ( "/var/cfengine/bin/cfagent" )
  MaxConnections = ( 50 )
  AllowConnectionsFrom = (
                         10.240.181.225    # masterserver ip
                         )
   AllowUsers = ( root )
grant:
 /var/cfengine/masterfiles/inputs  *.doc.nycnet
        /var/cfengine/bin/cfagent        *.domain.com
 /var/cfengine/inputs     *.domain.com
        /var/cfengine    *.domain.com
#end of cfservd.conf file

As , you can see the actionsequence in my update.conf file is NOT empty, ? why is
cfagent.conf file not being copied onto the clientmachine
from my masterserver ??? If i manually copy the cfagent.conf from the
masterserver to the clientmachine , then cfrun works without just fine, but
that defeats the purpose , i guess.   There are no firewall issues or security key issues, as i have generated and copied the security keys for mutual authentication.
ANY HELP IS GREATLY APPRECIATED, i am going nuts, hope it is something simple.
Thanks
spk
 
 

 


Yahoo! FareChase - Search multiple travel sites in one click.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]