puppetlabs/puppet · error
Couldn't fetch certificate from CA server; you might still…
Error message
Couldn't fetch certificate from CA server; you might still need to sign this agent's certificate (%{name}). Exiting now because the maxwaitforcert timeout has been exceeded. What it means
Logged by the Wait SSL state when the maxwaitforcert deadline is exceeded and the agent's certificate still could not be fetched from the CA — most often because the certificate request has not been signed. The agent gives up waiting and exits after this error; the cert name is included to help sign it.
Solutions
- Sign the agent certificate on the CA: puppet cert sign <name>
- Check the CA server is reachable and autosign is configured if desired
- Increase maxwaitforcert to give more time, then rerun the agent
- Investigate why certificate requests are rejected on the CA (autosign.conf, CA allow-list)
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at lib/puppet/ssl/state_machine.rb:412 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- SSL/TLS and certificate errors — how TLS handshakes and certificate validation fail.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/d012320f5314f906.
Report an issue: GitHub.
Appendix: source
Thrown at lib/puppet/ssl/state_machine.rb:412
Puppet.warning(_("Unable to automatically renew certificate: %{message}") % { message: e.message })
Done.new(@machine, @ssl_context)
end
end
# We cannot make progress, so wait if allowed to do so, or exit.
#
class Wait < SSLState
def initialize(machine)
super(machine, nil)
end
def next_state
time = @machine.waitforcert
if time < 1
log_error(_("Exiting now because the waitforcert setting is set to 0."))
exit(1)
elsif Time.now.to_i > @machine.wait_deadline
log_error(_("Couldn't fetch certificate from CA server; you might still need to sign this agent's certificate (%{name}). Exiting now because the maxwaitforcert timeout has been exceeded.") % { name: Puppet[:certname] })
exit(1)
else
Puppet.info(_("Will try again in %{time} seconds.") % { time: time })
# close http/tls and session state before sleeping
Puppet.runtime[:http].close
@machine.session = Puppet.runtime[:http].create_session
@machine.unlock
Kernel.sleep(time)
NeedLock.new(@machine)
end
end
end
# Acquire the ssl lock or return LockFailure causing us to exit.
#
class NeedLock < SSLStateView on GitHub (pinned to e227c27540)