Error: Could not request certificate: Find /devops/certificate/ca?fail_on_404=true

3,822 views
Skip to first unread message

Daniel Obi

unread,
Oct 30, 2014, 10:21:48 AM10/30/14
to puppet...@googlegroups.com
Greetings,

we just installed puppetmaster 3.7.1 and trying to join a new agent 3.7.1 with the following error:



puppet agent -t --trace --debug

Error: Could not request certificate: Find /devops/certificate/ca?fail_on_404=true resulted in 404 with the message: Not Found: Could not find environment 'devops'


if i try to join with production environment all is fine


puppet.conf on server:

### File managed with puppet ###
## Module:           'puppet'

[main]
    # The Puppet log directory.
    # The default value is '$vardir/log'.
    logdir = /var/log/puppet

    # Where Puppet PID files are kept.
    # The default value is '$vardir/run'.
    rundir = /var/run/puppet

    # Where SSL certificates are kept.
    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl

    # Allow services in the 'puppet' group to access key (Foreman + proxy)
    privatekeydir = $ssldir/private_keys { group = service }
    hostprivkey = $privatekeydir/$certname.pem { mode = 640 }

    # Puppet 3.0.x requires this in both [main] and [master] - harmless on agents
    autosign       = $confdir/autosign.conf { mode = 664 }

    show_diff     = false

    # Use specified CA server
    ca_server = xxxx
    hiera_config = $confdir/hiera.yaml

### Next part of the file is managed by a different template ###
## Module:           'puppet'

[master]
    autosign       = $confdir/autosign.conf { mode = 664 }
    reports        = foreman
    external_nodes = /etc/puppet/node.rb
    node_terminus  = exec
    ca             = false
    ssldir         = /var/lib/puppet/ssl
    certname       = xxx
    environmentpath  = /etc/puppet/environments
    basemodulepath   = /etc/puppet/environments/common:/etc/puppet/modules:/usr/share/puppet/modules



/etc/puppet lokks like:

.
├── auth.conf
├── auth.conf.rpmnew
├── environments
│   ├── development
│   │   ├── manifests
│   │   │   └── site.pp
│   │   └── modules
│   ├── devops
│   │   ├── environment.conf
│   │   ├── manifests
│   │   │   └── site.pp
│   │   └── modules
│   ├── example_env
│   │   ├── manifests
│   │   ├── modules
│   │   └── README.environment
│   ├── production
│   │   ├── manifests
│   │   │   └── site.pp
│   │   └── modules
│   ├── quality
│   │   ├── manifests
│   │   │   └── site.pp
│   │   └── modules
│   └── testing
│       ├── manifests
│       │   └── site.pp
│       └── modules
├── fileserver.conf
├── foreman.yaml
├── manifests
│   └── site.pp
├── modules
├── node.rb
├── puppet.conf
├── puppet.conf.install
└── rack
    ├── config.ru
    ├── public
    └── tmp
        └── restart.txt





Daniel Obi

unread,
Oct 30, 2014, 10:35:11 AM10/30/14
to puppet...@googlegroups.com
Even if the puppetmaster webserver is shutdown, i still get the same error

Felix Frank

unread,
Nov 9, 2014, 7:13:17 PM11/9/14
to puppet...@googlegroups.com
On 10/30/2014 03:21 PM, Daniel Obi wrote:
Greetings,

we just installed puppetmaster 3.7.1 and trying to join a new agent 3.7.1 with the following error:



puppet agent -t --trace --debug

Error: Could not request certificate: Find /devops/certificate/ca?fail_on_404=true resulted in 404 with the message: Not Found: Could not find environment 'devops'


if i try to join with production environment all is fine


So with --env production, the certificate can be requested?

Sounds like a bug. Would you open a ticket for this?

Thanks,
Felix

Chianing Wang

unread,
Jan 28, 2015, 2:59:00 PM1/28/15
to puppet...@googlegroups.com
did you check your puppet.conf at your agent ?

maybe you [agent]
environment = devops

try 

environment = production

i saw the error message on my text box when i mess around the testing, i fixed if i change it to production, hope it helps.
Reply all
Reply to author
Forward
0 new messages