puppetlabs/puppet · error · ArgumentError
Invalid terminus name %{terminus_class}
Error message
Invalid terminus name %{terminus_class} What it means
Indirection#terminus_class= (also used by cache=) validates before storing the setting: a nil or blank terminus name is rejected with ArgumentError 'Invalid terminus name'. Settings such as catalog_terminus = <value> in puppet.conf funnel into this setter, so an empty configuration value explodes here at first use of the indirection.
Source
Thrown at lib/puppet/indirector/indirection.rb:184
end
end
@terminus_class.value
end
def reset_terminus_class
@terminus_class.value = nil
end
# Specify the terminus class to use.
def terminus_class=(klass)
validate_terminus_class(klass)
@terminus_class.value = klass
end
# This is used by terminus_class= and cache=.
def validate_terminus_class(terminus_class)
unless terminus_class and terminus_class.to_s != ""
raise ArgumentError, _("Invalid terminus name %{terminus_class}") % { terminus_class: terminus_class.inspect }
end
unless Puppet::Indirector::Terminus.terminus_class(name, terminus_class)
raise ArgumentError, _("Could not find terminus %{terminus_class} for indirection %{name}") %
{ terminus_class: terminus_class, name: name }
end
end
# Expire a cached object, if one is cached. Note that we don't actually
# remove it, we expire it and write it back out to disk. This way people
# can still use the expired object if they want.
def expire(key, options = {})
request = request(:expire, key, nil, options)
return nil unless cache? && !request.ignore_cache_save?
instance = cache.find(request(:find, key, nil, options))
return nil unless instanceView on GitHub (pinned to e227c27540)
Solutions
- Delete the empty <name>_terminus setting so Puppet falls back to the documented default for the run mode.
- Set a real terminus name explicitly, e.g. catalog_terminus = compiler on a server, rest on an agent.
- When setting programmatically, guard for blank values before assignment.
- Verify the effective value afterwards with puppet config print <name>_terminus.
Example fix
# puppet.conf - before [agent] catalog_terminus = # after [agent] # removed entirely to use the default, or set explicitly: catalog_terminus = rest
Defensive patterns
Strategy: validation
Validate before calling
def set_terminus!(indirection, name) raise ArgumentError, 'terminus name required' if name.to_s.strip.empty? indirection.terminus_class = name end
Prevention
- Lint managed puppet.conf for empty *_terminus keys.
- Use presence checks when templating settings; omit rather than blank.
- Verify effective settings with puppet config print after template changes.
When it happens
Trigger: 'catalog_terminus =' or 'node_terminus =' with an empty value in puppet.conf; templated configuration rendering an empty string; Ruby code assigning indirection.terminus_class = nil or ''.
Common situations: ERB/EPP templates leaving terminus settings blank 'to use defaults'; Ansible/Puppet-managed puppet.conf with an empty variable interpolated; YAML null coerced to an empty string.
Related errors
- Could not find terminus %{terminus_class} for indirection %{
- Could not find terminus %{terminus_class} for indirection %{
- Listing remote file buckets is not allowed
- Could not find %{request} to destroy
- Could not read MessagePack data for %{indirection} %{key}: %
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/22172898e640099c.
Report an issue: GitHub.