Could not evaluate: Error 400 on SERVER: Not authorized to call find on /file_metadata

When I do a puppet agent run on my systems for a specific module I keep
getting an Error 400 on Server. I have three different puppet environments
on my puppet master (production, development, lab). The puppet module in
question is failing to pull four xml files from the modules and putting
them on the agent node.

Here is the error that pops when the agent runs on the node and the

(/Stage[main]/jboss::modules::logger/File[/opt/jboss/default/modules/system/layers/base/sun/jdk/main/module.xml])
Could not evaluate: Error 400 on SERVER: Not authorized to call find on
/file_metadata/jboss/modules/sun/jdk/main/module.xml with
{:links=>"manage"} Could not retrieve file metadata for
puppet:///jboss/modules/sun/jdk/main/module.xml: Error 400 on SERVER: Not
authorized to call find on
/file_metadata/jboss/modules/sun/jdk/main/module.xml with {:links=>"manage"}

Most of the message boards point to a problem with the fileserver.conf and
the auth.conf (see attached files) and I have tried those fixes but am
still getting errors.

Here is is a snippet from the section of the puppet pp file doing the file
command

file { "${modules_dir}/system/layers/base/sun/jdk/main/module.xml" :
source => "puppet:///${module_name}/modules/sun/jdk/main/module.xml",
require => Package[$pkgs],
}

Here is the path to that file on the puppet master / foreman server

/etc/puppet/environments/production/modules/jboss/files/modules/sun/jdk/main

Any ideas on why this is happening and how it can be fixed?

Foreman / PuppetMaster version
Puppet - 3.6.0
Foreman - 1.5.0
Ruby 1.8

Patrick

auth.conf (3.07 KB)

fileserver.conf (1.67 KB)

I realize this seems more like a problem with puppet but in some of the
posts I have read it said this error occurs when using an ENC like Foreman.

··· On Tuesday, July 29, 2014 2:31:55 PM UTC-4, Patrick Devine wrote: > > When I do a puppet agent run on my systems for a specific module I keep > getting an Error 400 on Server. I have three different puppet environments > on my puppet master (production, development, lab). The puppet module in > question is failing to pull four xml files from the modules and putting > them on the agent node. > > Here is the error that pops when the agent runs on the node and the > > (/Stage[main]/jboss::modules::logger/File[/opt/jboss/default/modules/system/layers/base/sun/jdk/main/module.xml]) > Could not evaluate: Error 400 on SERVER: Not authorized to call find on > /file_metadata/jboss/modules/sun/jdk/main/module.xml with > {:links=>"manage"} Could not retrieve file metadata for > puppet:///jboss/modules/sun/jdk/main/module.xml: Error 400 on SERVER: Not > authorized to call find on > /file_metadata/jboss/modules/sun/jdk/main/module.xml with {:links=>"manage"} > > Most of the message boards point to a problem with the fileserver.conf and > the auth.conf (see attached files) and I have tried those fixes but am > still getting errors. > > Here is is a snippet from the section of the puppet pp file doing the file > command > > file { "${modules_dir}/system/layers/base/sun/jdk/main/module.xml" : > source => "puppet:///${module_name}/modules/sun/jdk/main/module.xml", > require => Package[$pkgs], > } > > Here is the path to that file on the puppet master / foreman server > > > /etc/puppet/environments/production/modules/jboss/files/modules/sun/jdk/main > > Any ideas on why this is happening and how it can be fixed? > > > Foreman / PuppetMaster version > Puppet - 3.6.0 > Foreman - 1.5.0 > Ruby 1.8 > > Patrick > > > > >

I had a similar error when setting up a new puppet master. The problem
wound up being selinux.

··· On Tuesday, July 29, 2014 11:31:55 AM UTC-7, Patrick Devine wrote: > > When I do a puppet agent run on my systems for a specific module I keep > getting an Error 400 on Server. I have three different puppet environments > on my puppet master (production, development, lab). The puppet module in > question is failing to pull four xml files from the modules and putting > them on the agent node. > > Here is the error that pops when the agent runs on the node and the > > (/Stage[main]/jboss::modules::logger/File[/opt/jboss/default/modules/system/layers/base/sun/jdk/main/module.xml]) > Could not evaluate: Error 400 on SERVER: Not authorized to call find on > /file_metadata/jboss/modules/sun/jdk/main/module.xml with > {:links=>"manage"} Could not retrieve file metadata for > puppet:///jboss/modules/sun/jdk/main/module.xml: Error 400 on SERVER: Not > authorized to call find on > /file_metadata/jboss/modules/sun/jdk/main/module.xml with {:links=>"manage"} > > Most of the message boards point to a problem with the fileserver.conf and > the auth.conf (see attached files) and I have tried those fixes but am > still getting errors. > > Here is is a snippet from the section of the puppet pp file doing the file > command > > file { "${modules_dir}/system/layers/base/sun/jdk/main/module.xml" : > source => "puppet:///${module_name}/modules/sun/jdk/main/module.xml", > require => Package[$pkgs], > } > > Here is the path to that file on the puppet master / foreman server > > > /etc/puppet/environments/production/modules/jboss/files/modules/sun/jdk/main > > Any ideas on why this is happening and how it can be fixed? > > > Foreman / PuppetMaster version > Puppet - 3.6.0 > Foreman - 1.5.0 > Ruby 1.8 > > Patrick > > > > >

The "source" URL is incorrect, it should be:
puppet:///modules/${module_name}/modules/sun/jdk/main/module.xml

The error you're seeing is because the URL you're hitting isn't set up
to serve files. modules/ is the only URL usable by default as it's set
up to serve files from modules.

··· On 29/07/14 19:31, Patrick Devine wrote: > (/Stage[main]/jboss::modules::logger/File[/opt/jboss/default/modules/system/layers/base/sun/jdk/main/module.xml]) > Could not evaluate: Error 400 on SERVER: Not authorized to call find on > /file_metadata/jboss/modules/sun/jdk/main/module.xml with > {:links=>"manage"} Could not retrieve file metadata for > puppet:///jboss/modules/sun/jdk/main/module.xml: Error 400 on SERVER: > Not authorized to call find on > /file_metadata/jboss/modules/sun/jdk/main/module.xml with {:links=>"manage"} > > Most of the message boards point to a problem with the fileserver.conf > and the auth.conf (see attached files) and I have tried those fixes but > am still getting errors. > > Here is is a snippet from the section of the puppet pp file doing the > file command > > file { "${modules_dir}/system/layers/base/sun/jdk/main/module.xml" : > source => "puppet:///${module_name}/modules/sun/jdk/main/module.xml", > require => Package[$pkgs], > } > > Here is the path to that file on the puppet master / foreman server > > /etc/puppet/environments/production/modules/jboss/files/modules/sun/jdk/main


Dominic Cleal
Red Hat Engineering