7 cfengine troubleshooting – HP Linux Server Management Software User Manual
Page 42
•
Most cfagent.conf actions such as "copy," "editfiles," and "processes," support
a syslog = true option to cause the specific action to be logged to syslog.
•
Similarly, most actions support an "inform = true" option to cause cfagent to report
any changes.
•
cfagent.conf
’s control section supports global "inform = (true)" and "syslog =
true"
options.
•
cfagent
(see cfagent(8)) supports the --inform switch on the command line. For more
information, refer to the cfengine reference manual in /opt/dsau/doc/cfengine or the
cfagent
manpage.
2.7 cfengine Troubleshooting
The following are some troubleshooting hints for working with cfengine.
1.
Run cfservd on the master server using the --no-fork (-F) and the --verbose (-v) options.
This will provide useful information for any troubleshooting efforts.
2.
You may see authentication errors. When performing a "cfagent -K" operation, the
following messages are displayed:
cfengine:: BAD: key could not be accepted on trust
cfengine:: Authentication dialogue with
abc.xyz.com failed
cfengine:client:/var/opt/dsau/cfengine/inputs/update.conf:194: Warning:
actionsequence is empty
cfengine:client:/var/opt/dsau/cfengine/inputs/update.conf:194: Warning: perhaps
cfagent.conf/update.conf have not yet been set up?
This problem is most likely due to the cfengine security setup. To resolve the problem, you
will need to exchange cfengine public keys between the managed client and master server.
The csync_wizard (see csync_wizard(8)) automates this process when adding clients. See
the section
“Configuring a Synchronization Managed Client” (page 38)
for instructions on
manually distributing keys to managed clients.
3.
“Warning: actionsequence is empty” errors
Use the cfagent -v option to get more information. One possible cause of this message
is that update.conf has not been added to the client’s /var/opt/dsau/cfengine/
inputs
directory.
4.
Syntax error due to missing or superfluous spaces
#cfagent -K
cfengine::/var/opt/dsau/cfengine/inputs/update.conf:39: syntax error
cfengine::/var/opt/dsau/cfengine/inputs/update.conf:
Execution terminated after parsing due to errors in program
In the first line of the example above, cfengine is reporting a syntax error on line 39 of the
file update.conf. The error reported may be caused by a space in line 38, the previous line
in the file update.conf.
Check for extra spaces in the configuration files. As a general rule, using spaces can improve
readability. One common problem is missing spaces within parentheses. For example, a
function should have no space between the function name and its leading parenthesis but
the function itself requires leading and trailing spaces within its enclosing parentheses. For
example, the following snippet shows the use of required leading and trailing spaces for
the function ExecResult.
control:
my_variable = ( ExecResult(/bin/ls -l) )
5.
Unable to connect to a cfengine client or master.
# cfrun
42
Configuration Synchronization