Ask Your Question
0

Error 400 on SERVER: Could not parse for environment

asked 2015-04-11 01:35:43 -0500

Marek Maksimczyk gravatar image
  • Ubuntu 12.04
  • Puppet 2.7.11
  • Master/Agent configuration

I try to use simple environment configuration:

# /etc/puppet/puppet.conf
[main]
    user = puppet
    group = puppet
    report = true
    reports = log,store
    logdir=/var/log/puppet
    vardir=/var/lib/puppet
    ssldir=/var/lib/puppet/ssl
    rundir=/var/run/puppet
    factpath=$vardir/lib/facter
    templatedir=$confdir/templates

[master]
    certname = puppet.site.pl
    # These are needed when the puppetmaster is run by passenger
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY
    environment_timeout = 0

[testing]
    modulepath = $confdir/environments/testing/modules
    manifest = $confdir/environments/testing/manifests

in manifests directory is only one file: site.pp

# /etc/puppet/environments/testing/manifests/site.pp
node 'backend.site.pl' {
}

modules directory is empty,

after runing puppet agent -t --noop --environment=testing I got

err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not parse for environment testing: Is a directory - /etc/puppet/environments/testing/manifests on node backend.site.pl

How can I debug this issue? In syslog I cannot find any usefull information.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-04-11 10:16:31 -0500

csharpsteen gravatar image

The ability to set the manifest setting to a directory instead of a single file was added in Puppet 3.5.0. Since you are using 2.7.11, the manifest setting for your testing environment will need to be set to a specific file, for example site.pp:

manifest = $confdir/environments/testing/manifests/site.pp

Additionally, the Puppet 2.x line is over a year past end of life and security fixes are no longer being shipped for those versions of Puppet. You may want to review the list of security issues for items that affect the 2.7.11 version and possibly consider upgrading to the 3.x series. Up-to-date packages of recent Puppet Versions for Ubuntu 12.04 can be retrieved from apt.puppetlabs.com. More details here:

http://docs.puppetlabs.com/guides/puppetlabspackagerepositories.html#for-debian-and-ubuntu

edit flag offensive delete link more

Comments

2.7.x is what ships with ubuntu 12.04 LTS. That's sub-optimal that you _have_ _to_ include an repository with a more recent version. *EDIT*: 14.04 has 3.4.x. But I don't dare upgrading servers.

Kai Burghardt gravatar imageKai Burghardt ( 2015-04-11 10:34:58 -0500 )edit

Thank you csharpsteen, this was it. About upgrade, this is legacy puppet configuration and before bigger changes to infrastructure I wanted to have testing configuration to check it on agent's systems (puppet agent -t --noop --environment=testing)

Marek Maksimczyk gravatar imageMarek Maksimczyk ( 2015-04-11 15:29:27 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-04-11 01:35:43 -0500

Seen: 1,468 times

Last updated: Apr 11 '15