Failed to start Foreman after ubgrade dist-

Nah, I would only really have needed the output for further debugging, not for the “why it wasn’t ran”.

If you could share /var/log/dpkg.log from this machine (per mail to evgeni at redhat dot com), that would help to understand what (not) happened [I do have a hunch, but would like to check with your dpkg logs] :slight_smile:

of course I can send it to you.

one last question @evgeni, I found two files in sources.list.d:

-rw-r–r-- 1 root root 146 Mar 30 10:48 foreman.list
-rw-r–r-- 1 root root 85 Mar 29 15:08 foreman.list.distUpgrade

the content:

cat foreman.list
deb http://deb.theforeman.org/ focal 2.5 # disabled on upgrade to focal
deb http://deb.theforeman.org/ plugins 2.5 # disabled on upgrade to focal
cat foreman.list.distUpgrade
deb http://deb.theforeman.org/ bionic 2.5
deb http://deb.theforeman.org/ plugins 2.5

is that normal? by the way in forman.list they was commented out.

the later one can be deleted.

both have same time stemp, I edit one to uncomment the lines.
But it was focal Ill check that why after upgrade are two files and one is changes.

Okay, so based on the dpkg.log that you provided, I think what happened was:

  • The foreman packages were upgraded to their latest version (either from our bionic repo, or our focal repo, doesn’t really matter) before the rest of the system was running Focal (this is possible as we don’t enforce too strict dependencies on the rest of the system). Especially all gem actions were executed with the old, Bionic, Ruby/Bundler (see the Bundler 1.16.1 reference in the errors).
  • Once the rest of the system was upgraded, this didn’t match anymore, and produced problems.

In never Foreman releases, we have slightly stricter dependencies on Ruby/Bundler, so this might already be better there, but no guarantee.

1 Like

thank you so much for the analysis and explanation @evgeni .
I’ll do that again in next days and test all together.

the distUpgrade files in sources.list.d can be deleted they are related to old distro (bionic).

Hello,

I had exactly the same problem:

I was running Foreman 2.3.5 on Ubuntu Bionic :

Foreman 2.4.1 with Ubuntu Bionic update => OK
Update Ubuntu Bionic 18.04 to Ubuntu Focal 20.04 => OK
Update Foreman 2.5 Ubuntu Focal => NOK

I had to update the gem bundle to be able to install version 2.5 under Ubuntu Focal :

Setting up foreman (2.5.4-2) ...
Traceback (most recent call last):
        2: from /usr/bin/bundle:23:in `<main>'
        1: from /usr/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
/usr/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.16.1) required by your /usr/share/foreman/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.16.1`
dpkg: error processing package foreman (--configure):
 installed foreman package post-installation script subprocess returned error exit status 1
Setting up ruby-augeas (1:0.5.0-3build7) ...
Setting up ruby-oj:amd64 (3.10.1-1build1) ...
Setting up ruby-unf-ext (0.0.7.6-1build1) ...
Setting up ruby-unicode (0.4.4-2build9) ...
Setting up ruby-sqlite3 (1.4.2-2build1) ...
Setting up ruby-ffi (1.12.2+dfsg-2build2) ...
Setting up ruby-libvirt (0.7.1-1build1) ...
dpkg: dependency problems prevent configuration of foreman-postgresql:
 foreman-postgresql depends on foreman (= 2.5.4-2); however:
  Package foreman is not configured yet.
dpkg: error processing package foreman-postgresql (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of foreman-service:
 foreman-service depends on foreman (= 2.5.4-2); however:
  Package foreman is not configured yet.

dpkg: error processing package foreman-service (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          dpkg: dependency problems prevent configuration of foreman-dynflow-sidekiq:
 foreman-dynflow-sidekiq depends on foreman (= 2.5.4-2); however:
  Package foreman is not configured yet.
dpkg: error processing package foreman-dynflow-sidekiq (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
cd /usr/share/foreman
bundle update --bundler
apt upgrade

and continue to follow the documentation process : Foreman :: Manual

Ubuntu Focal 20.04 LTS
Foreman 2.4
Puppet 6.27

Regards

1 Like

thanks for your post, for me it works after I install: bundler:1.16.
gem install bundler:1.16.1

after that I start the foreman successfully.

1 Like