Fresh installation fails

Problem:
When running the foreman installation it fails.
Expected outcome:
Installation to be succesful
Foreman and Proxy versions:
3.8
Foreman and Proxy plugin versions:

Distribution and version:
RHEL7
Other relevant data:

I uninstalled a previous katello installation, a clean OS would be better but it’s not possible to reinstall now.
I get the following error when running foreman-installer --scenario katello
Executing: foreman-rake upgrade:run
rake aborted!
DB migration has not run
/usr/share/foreman/lib/tasks/upgrade.rake:15:in block (2 levels) in <top (required)>' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in <top (required)>’
Tasks: TOP => upgrade:run
(See full trace by running task with --trace)

[root@no1-psoapp-1 lib]# foreman-rake upgrade:run --trace
** Invoke upgrade:run (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute upgrade:run
rake aborted!
DB migration has not run
/usr/share/foreman/lib/tasks/upgrade.rake:15:in block (2 levels) in <top (required)>' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/task.rb:273:in block in execute’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/task.rb:273:in each' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/task.rb:273:in execute’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/task.rb:214:in block in invoke_with_call_chain' /opt/rh/rh-ruby25/root/usr/share/ruby/monitor.rb:235:in mon_synchronize’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/task.rb:194:in invoke_with_call_chain' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/task.rb:183:in invoke’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:160:in invoke_task' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:116:in block (2 levels) in top_level’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:116:in each' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:116:in block in top_level’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:125:in run_with_threads' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:110:in top_level’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:83:in block in run' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:186:in standard_exception_handling’
/opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/lib/rake/application.rb:80:in run' /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.3/exe/rake:27:in <top (required)>’
/opt/rh/rh-ruby25/root/usr/bin/rake:23:in load' /opt/rh/rh-ruby25/root/usr/bin/rake:23:in

3.8 does not sound as a Foreman or recent Katello version, try rpm -q foreman and the same for tfm-rubygem-katello. I don’t recognize the error.

rpm -q foreman

foreman-2.3.5-1.el7.noarch

rpm -q tfm-rubygem-katello

tfm-rubygem-katello-3.18.4-1.el7.noarch

Sorry, I forgot it was 3.18

One thing that is weird, it fails in upgrade task while this is supposed to be the fresh installation. I don’t have any pointers, hopefully someone will have some after the weekend.

I removed all the katello related packages and reinstalled katello. Where can there be references to the previous installation? Probably the best option is to reinstall the OS.

It seems there are some leftovers in your DB from the previous installation conflicting with the new install. It would be best indeed to install on a fresh OS instead of one that may have any leftovers, however if that is not possible you would need to manually clear all databases and configuration files that may remain.
Additionally, why are you installing Katello 3.18? The currently supported versions are 4.0 and 4.1.

Seems to be so, How do I clear the databases? I’ll try to find all the configuration files that can cause issues. I’m installing 3.18 since I wasn’t sure 4.0 and up are supported. The documentation could be more clear regarding what are the latest supported versions. I’ll try to create a request to reinstall the OS if this doesn’t work.