Re: [Puppet Users] Puppet run fails with service, succeeds with "puppet agent -t"

78 views
Skip to first unread message

Josh Cooper

unread,
Jul 15, 2013, 12:38:42 PM7/15/13
to puppet...@googlegroups.com



On Mon, Jul 15, 2013 at 2:53 AM, cko <der...@gmail.com> wrote:

hi everybody,

im trying to install a package on a windows server host. my source parameter looks like this:

$package_filename = "check-mk-agent-1.2.3i1.exe"
 $package_name     = "Check_MK Agent 1.2.3i1"

          package { "$package_name":
             ensure   => installed,
             provider => windows,
             source => "\\\server/install/Tools/check_mk-agent/$package_filename",
             install_options => ['/S', '/D=C:\check_mk']
          }

here is the problem: when i run "puppet agent -t" on the server , it works and the package is installed.

but when the puppet service (every 30 minutes) runs, there is an error:

change from absent to present failed: The source does not exist: '\\server\install\Tools\check_mk-agent\check-mk-agent-1.2.3i1.exe'

when i open the directory (\server\install\Tools\check_mk-agent\check-mk-agent-1.2.3i1.exe) the file opens.

how can i fix this?


When puppet is running under the LocalSystem account, it does not have any credentials with which to access the network. As a result, if the remote server does not accept null sessions (which it shouldn't), then you'll get this error.[1] Of course, it works when you're at the command prompt, because puppet is running as you, and has credentials to access the network.

You can either enable null sessions (not recommended) or configure the puppet service to run under a domain user account. You'll need to add the user account to the local Administrators group. Unfortunately, there is a bug in puppet that prevents it from being able to add domain users to the local group[2], though it's very high on our list. In the meantime, you can use an exec resource to do that[3].

Josh


--
Josh Cooper
Developer, Puppet Labs

Join us at PuppetConf 2013, August 22-23 in San Francisco - http://bit.ly/pupconf13
Register now and take advantage of the Early Bird discount - save 25%!

Reply all
Reply to author
Forward
0 new messages