theforeman/foreman · error · Foreman::Renderer::Errors::UndefinedSetting
Undefined setting '%{setting}'
Error message
Undefined setting '%{setting}' What it means
Error "Undefined setting '%{setting}'" thrown in theforeman/foreman.
Source
Thrown at app/services/foreman/renderer/scope/macros/base.rb:380
def gem_version_compare(first, second)
Gem::Version.new(first.to_s) <=> Gem::Version.new(second.to_s)
end
apipie :method, "Returns the TLS certificate(s) needed to verify a connection to Foreman" do
desc 'Currently it relies on "SSL CA file" and "Server CA file" authentication settings, which normally points to the file containing the
CA certificate for Smart Proxies. However in the default deployment, this certificate happens to be the same.'
example "SSL_CA_CERT=$(mktemp)
cat > $SSL_CA_CERT <<CA_CONTENT
<%= foreman_server_ca_cert %>
CA_CONTENT
curl --cacert $SSL_CA_CERT https://foreman.example.com"
end
def foreman_server_ca_cert(server_ca_file_enabled: true, ssl_ca_file_enabled: true)
setting_values = []
setting_values << Setting[:server_ca_file] if server_ca_file_enabled
setting_values << Setting[:ssl_ca_file] if ssl_ca_file_enabled
raise UndefinedSetting.new(setting: '"Server CA file" or "SSL CA file"') if setting_values.reject(&:empty?).empty?
files_content = setting_values.uniq.compact.map do |setting_value|
File.read(setting_value)
rescue StandardError => e
Foreman::Logging.logger('templates').warn("Failed to read CA file: #{e}")
nil
end
result = files_content.compact.join("\n")
msg = N_("SSL CA file not found, check the 'Server CA file' and 'SSL CA file' in Settings > Authentication")
raise Foreman::Exception.new(msg) unless result.present?
result
end
apipie_method :rand, 'Returns random floating point numbers between 0 and 1' doView on GitHub (pinned to 6b05625475)
When it happens
Trigger: Thrown at app/services/foreman/renderer/scope/macros/base.rb:380 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23).
Data as JSON: /api/errors/21f1187a7364de14.
Report an issue: GitHub.