Foreman on Debian – Install issues

A few weeks ago I noticed that as a result of an upgrade, puppet-dashboard had removed itself from the system it ran on. No big deal, I wasn’t really using it and it put a number of more important packages on the removal list if I made the required changes to keep it. Since then I’ve had an error in my log every time a system polls puppet – a lot of errors when it’s multiple machines twice an hour.

Quick research suggests that Puppet Dashboard is no longer under development, and it should be replaced. Work is looking to install Foreman as a frontend for our Puppet install, so I figured what better tool to replace Puppet Dashboard with than Foreman, and give myself a jump start on the training. It also installs on Debian from their own repos.

The install itself was actually a little painful, and was surprisingly easy to fix once I got to the bottom of it. The problem was this, when I ran “apt-get install foreman”:

dpkg: error processing package foreman (--configure):
subprocess installed post-installation script returned error exit status 7

The process was failing during the postinst script while dpkg was configuring the package. This script is found in /var/lib/dpkg/info/<packagename>.postinst – in this case the package name was “foreman.” I set the package to debug mode and ran a dpkg –configure foreman. The last commands before error and terminate were thus:

+ cd /usr/share/foreman
+ [ -f Gemfile.lock ]
+ CMD=bundle install --path ./vendor/ --local --no-prune
+ [ ! -z ]
+ bundle install --path ./vendor/ --local --no-prune

So let’s run them manually:

root@kiwi:/usr/share/foreman# bundle install --path ./vendor/ --local --no-prune
Resolving dependencies...
Some gems seem to be missing from your vendor/cache directory.
Could not find gem 'safemode (~> 1.2) ruby' in the gems available on this machine.

Well then. Apparently we need to install the safemode gem!

gem install safemode
bundle update

A quick apt-get -f install, and foreman configured itself correctly. Now I’ll spend a few days trying to make it work on my install, and we’ll likely bring an update or two as time goes on with what I learn and so on.


    • AA on June 2, 2014 at 6:31 am
    • Reply

    Thanks for the tip.
    Helped me get Foreman working on Ubuntu 14.04


    • phossner on October 21, 2015 at 5:25 am
    • Reply

    Thank you very much.
    This also helped me to get foreman running on Ubuntu 14.04.
    When using the foreman installer, I got an “Could not load data from ” error. Installing this gem fixed it.

Leave a Reply

Your email address will not be published.