Forum: Cfengine Help Subject: Re: Need help troubleshooting Remote Access key exchange Author: regan99 Link to topic: https://cfengine.com/forum/read.php?3,21233,21297#msg-21297
Ok, this is really killing me. At this point, all I'm trying to do is get a client to copy the contents of "/var/cfengine/masterfiles" on my policy server to a test location "/var/cfengine/test_dir." I simply can't get it to work. Here's the file I'm using: # # The goal here is to get the contents of the directory "/var/cfengine/masterfiles" # on the policy server (IP 192.168.52.140) copied to this client at the destination # of "/var/cfengine/test_dir" # body common control { bundlesequence => { "copy" }; inputs => { "/var/cfengine/masterfiles/cfengine_stdlib.cf", }; } bundle agent copy { vars: "master_location" string => "/var/cfengine/masterfiles"; "policy_server" string => "192.168.52.140"; files: "/var/cfengine/test_dir" handle => "remote_file_copy", comment => "Basic remote directory copy, straight out of the cf3-solutions manual", copy_from => secure_cp("$(master_location)", "$(policy_server)"), depth_search => recurse("inf"); } And here's the output from `cf-agent -Kv -f ./copy.cf -I`: community> -> Bundlesequence => {'copy'} community> community> ***************************************************************** community> BUNDLE copy community> ***************************************************************** community> community> community> ========================================================= community> vars in bundle copy (1) community> ========================================================= community> community> community> + Private classes augmented: community> community> - Private classes diminished: community> community> community> community> ========================================================= community> files in bundle copy (1) community> ========================================================= community> community> community> ......................................................... community> Promise handle: remote_file_copy community> Promise made by: /var/cfengine/test_dir community> community> Comment: Basic remote directory copy, straight out of the cf3-solutions manual community> ......................................................... community> community> -> Handling file existence constraints on /var/cfengine/test_dir community> -> Copy file /var/cfengine/test_dir from /var/cfengine/masterfiles check community> No existing connection to 192.168.52.140 is established... community> Set cfengine port number to 5308 = 5308 community> Set connection timeout to 10 community> -> Connect to 192.168.52.140 = 192.168.52.140 on port 5308 community> -> Matched IP 192.168.52.140 to key MD5=a33e830c762e09c701076553fa3decf9 community> -> Going to secondary storage for key community> .....................[.h.a.i.l.]................................. community> Strong authentication of server=192.168.52.140 connection confirmed community> -> Public key identity of host "192.168.52.140" is "MD5=a33e830c762e09c701076553fa3decf9" community> -> Last saw 192.168.52.140 (+MD5=a33e830c762e09c701076553fa3decf9) first time now community> -> Going to secondary storage for key community> Server returned error: Unspecified server refusal (see verbose server output) community> Can't stat /var/cfengine/masterfiles in files.copyfrom promise community> community> ========================================================= community> vars in bundle copy (2) community> ========================================================= community> community> community> + Private classes augmented: community> community> - Private classes diminished: community> community> community> community> ========================================================= community> files in bundle copy (2) community> ========================================================= community> community> community> ========================================================= community> vars in bundle copy (3) community> ========================================================= community> community> community> + Private classes augmented: community> community> - Private classes diminished: community> community> community> community> ========================================================= community> files in bundle copy (3) community> ========================================================= community> community> Outcome of version (not specified) (agent-0): Promises observed to be kept 0%, Promises repaired 0%, Promises not repaired 100% community> Estimated system complexity as touched objects = 1, for 7 promises community> -> Writing last-seen observations community> -> Last saw +MD5=a33e830c762e09c701076553fa3decf9 (alias 192.168.52.140) at Tue Mar 29 17:21:44 2011 (noexpiry 0.3 <= 168.0) community> -> No lock purging scheduled I see two weird things happening. First one is this: community> -> Handling file existence constraints on /var/cfengine/test_dir community> -> Copy file /var/cfengine/test_dir from /var/cfengine/masterfiles check This looks as though the secure_cp is going to attempt to copy a file named "/var/cfengine/test_dir" from "/var/cfengine/masterfiles" which will fail. Am I perhaps misusing secure_cp by not giving it the right arguments, or starting off with the wrong promise altogether? The second weird thing I saw was this: community> Server returned error: Unspecified server refusal (see verbose server output) community> Can't stat /var/cfengine/masterfiles in files.copyfrom promise My earlier issues where with the keys, but they seem to be working now (aside from the fact that every time I connect to the policy server, cf-agent acts like it's the first time it has seen 192.168.52.140). Any ideas why the client can't get the files copied? _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine