Foreman installer failure on Debian 9.8

Problem:

installer error message

Expected outcome:

success

Foreman and Proxy versions:

Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]
(for logs, surround with three back-ticks to get proper formatting, e.g.)

logs

====
root@foreman-server01:/tmp# foreman-installer
Error executing SQL; psql returned pid 26687 exit 1: ‘ERROR: invalid locale name: “en_US.utf8”

/usr/share/foreman-installer/modules/postgresql/lib/puppet/type/postgresql_psql.rb:24:in sync' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:238:insync’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in sync_if_needed' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:88:inblock in perform_changes’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:in each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:87:inperform_changes’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:259:inapply’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:279:in eval_resource' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:183:incall’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:183:in block (2 levels) in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:519:inblock in thinmark’
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in realtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:518:inthinmark’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:183:in block in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:121:intraverse’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:173:in evaluate' /usr/lib/ruby/vendor_ruby/kafo/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:inevaluate_with_trigger’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:239:in block (2 levels) in apply' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:519:inblock in thinmark’
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in realtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:518:inthinmark’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:238:in block in apply' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:156:inwith_destination’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:146:in as_logging_destination' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:237:inapply’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:186:in block (2 levels) in apply_catalog' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:519:inblock in thinmark’
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in realtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:518:inthinmark’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:185:in block in apply_catalog' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:232:inblock in benchmark’
/opt/puppetlabs/puppet/lib/ruby/2.4.0/benchmark.rb:308:in realtime' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:231:inbenchmark’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:184:in apply_catalog' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:369:inrun_internal’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:237:in block in run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:inoverride’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:211:inrun’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:355:in apply_catalog' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:inblock (2 levels) in main’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:inoverride’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:280:in block in main' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:inoverride’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:260:in override' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:233:inmain’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:174:in run_command' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:inblock in run’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:667:in exit_on_fail' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:inrun’
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:135:in run' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:73:inexecute’
/opt/puppetlabs/puppet/bin/puppet:5:in `’
/Stage[main]/Foreman::Database::Postgresql/Postgresql::Server::Db[foreman]/Postgresql::Server::Database[foreman]/Postgresql_psql[CREATE DATABASE “foreman”]/command: change from ‘notrun’ to 'CREATE DATABASE “foreman” WITH TEMPLATE = “template0” ENCODING = ‘utf8’ LC_COLLATE = ‘en_US.utf8’ LC_CTYPE = ‘en_US.utf8’ ’ failed: Error executing SQL; psql returned pid 26687 exit 1: 'ERROR: invalid locale name: “en_US.utf8”

Installing Done [100%] […]
Something went wrong! Check the log for ERROR-level output

Hi,

i think this a known error.
Try following: sudo dpkg-reconfigure locales and add the en_US.utf8 locale.

Regards,
Bastian

No foreman isnt running…

hi,

yes, because the setup hasn’t finished yet.
Try to reconfigure the locales and then run foreman-installer again.
The installer should finish the installation and after that foreman should be running.

Regards,
Bastian