Foreman n00b having startup issues

Hi folks!

I'm a relative new foreman user (from an administrative standpoint, at
least), and I've inherited a bit of an issue.

I've got an instance of foreman running on a rhel 6 ec2 instance, and,
after some upgrades were done to the instance (specifically, mysql was
upgraded from 5.6.37 to 5.6.38), my instance has stopped starting.

One of my co-workers spent a few days on this before handling it over to
me, and I've spent a few days beating on this as well, to no avail.

When I attempt to start it up, I get the following error:

Starting foreman:
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:30:in
strict_error': Gem loading error: cannot load such file -- foreman_memcache (RuntimeError) from /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:56:inrescue in block in system_require'
from
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:37:in
block in system_require' from /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:ineach'
from
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_ext/bundler_ext.rb:35:in
system_require&#39; from /usr/share/foreman/config/application.rb:16:in<top
(required)>'
from
/opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:in
require&#39; from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:54:inrequire'
from
/opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:78:in
block in server&#39; from /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:intap'
from
/opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:75:in
server&#39; from /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands/commands_tasks.rb:39:inrun_command!'
from
/opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/commands.rb:17:in
&lt;top (required)&gt;&#39; from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:128:inrequire'
from
/opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:128:in
rescue in require&#39; from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:39:inrequire'
from /usr/share/foreman/bin/rails:4:in `<main>'
[FAILED]

I've verified that foreman_memcache is installed and accessible, though I
fear that it may be showing as accessible to me, but not the foreman
application itself.

The specific instance details are as follows:

   OS: redhat

RELEASE: Red Hat Enterprise Linux Server release 6.9 (Santiago)
FOREMAN: 1.12.4
RUBY: ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
PUPPET: 3.8.7
DENIALS: 0

I'm painfully aware the the ruby, foreman, and puppet versions are horribly
out of date, but, due to circumstances beyond my control, I'm unable to
change them currently.

Anyone have any ideas what could be done to potentially fix this beast?
Wouldn't be as much of an issue if it weren't blocking deployment of a
newer version/instance of it as well…

Thanks in advance!

Hello,

I have no idea how the foreman was installed but chances are you are using rpm
based installation. In that case, if you install foreman_memcache, make sure
you install it into SCL.

scl enable tfm bash
gem list

if you don't see foreman_memcache there try following

gem install foreman_memcache
exit

also based on your Foreman version, the SCL might not be tfm, in that case
(Foreman 1.9 and older) try ruby193 so the first command would be
scl enable ruby193 bash

Hope that helps

··· -- Marek

On úterý 14. listopadu 2017 2:09:44 CET Spencer Da Monkey wrote:

Hi folks!

I’m a relative new foreman user (from an administrative standpoint, at
least), and I’ve inherited a bit of an issue.

I’ve got an instance of foreman running on a rhel 6 ec2 instance, and,
after some upgrades were done to the instance (specifically, mysql was
upgraded from 5.6.37 to 5.6.38), my instance has stopped starting.

One of my co-workers spent a few days on this before handling it over to
me, and I’ve spent a few days beating on this as well, to no avail.

When I attempt to start it up, I get the following error:

Starting foreman:
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e
xt/bundler_ext.rb:30:in strict_error': Gem loading error: cannot load such file -- foreman_memcache (RuntimeError) from /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e xt/bundler_ext.rb:56:inrescue in block in system_require’
from
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e
xt/bundler_ext.rb:37:in block in system_require' from /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e xt/bundler_ext.rb:35:ineach’
from
/opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e
xt/bundler_ext.rb:35:in system_require' from /usr/share/foreman/config/application.rb:16:in<top
(required)>'
from
/opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r
b:54:in require' from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r b:54:inrequire’
from
/opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma
nds/commands_tasks.rb:78:in block in server' from /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma nds/commands_tasks.rb:75:intap’
from
/opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma
nds/commands_tasks.rb:75:in server' from /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma nds/commands_tasks.rb:39:inrun_command!‘
from
/opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma
nds.rb:17:in <top (required)>' from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r b:128:inrequire’
from
/opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r
b:128:in rescue in require' from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r b:39:inrequire’
from /usr/share/foreman/bin/rails:4:in `’
[FAILED]

I’ve verified that foreman_memcache is installed and accessible, though I
fear that it may be showing as accessible to me, but not the foreman
application itself.

The specific instance details are as follows:

   OS: redhat

RELEASE: Red Hat Enterprise Linux Server release 6.9 (Santiago)
FOREMAN: 1.12.4
RUBY: ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
PUPPET: 3.8.7
DENIALS: 0

I’m painfully aware the the ruby, foreman, and puppet versions are horribly
out of date, but, due to circumstances beyond my control, I’m unable to
change them currently.

Anyone have any ideas what could be done to potentially fix this beast?
Wouldn’t be as much of an issue if it weren’t blocking deployment of a
newer version/instance of it as well…

Thanks in advance!

Hot diggity daffodil, that did it!

Thank you for your help!

··· On Tuesday, November 14, 2017 at 1:27:52 AM UTC-8, Marek Hulán wrote: > > Hello, > > I have no idea how the foreman was installed but chances are you are using > rpm > based installation. In that case, if you install foreman_memcache, make > sure > you install it into SCL. > > scl enable tfm bash > gem list > # if you don't see foreman_memcache there try following > gem install foreman_memcache > exit > > also based on your Foreman version, the SCL might not be tfm, in that case > (Foreman 1.9 and older) try ruby193 so the first command would be > scl enable ruby193 bash > > Hope that helps > > -- > Marek > > On úterý 14. listopadu 2017 2:09:44 CET Spencer Da Monkey wrote: > > Hi folks! > > > > I'm a relative new foreman user (from an administrative standpoint, at > > least), and I've inherited a bit of an issue. > > > > I've got an instance of foreman running on a rhel 6 ec2 instance, and, > > after some upgrades were done to the instance (specifically, mysql was > > upgraded from 5.6.37 to 5.6.38), my instance has stopped starting. > > > > One of my co-workers spent a few days on this before handling it over to > > me, and I've spent a few days beating on this as well, to no avail. > > > > When I attempt to start it up, I get the following error: > > > > Starting foreman: > > > /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e > > > xt/bundler_ext.rb:30:in `strict_error': Gem loading error: cannot load > such > > file -- > > foreman_memcache (RuntimeError) > > from > > > /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e > > > xt/bundler_ext.rb:56:in `rescue in block in system_require' > > from > > > /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e > > > xt/bundler_ext.rb:37:in `block in system_require' > > from > > > /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e > > > xt/bundler_ext.rb:35:in `each' > > from > > > /opt/theforeman/tfm/root/usr/share/gems/gems/bundler_ext-0.3.0/lib/bundler_e > > > xt/bundler_ext.rb:35:in `system_require' > > from /usr/share/foreman/config/application.rb:16:in ` > (required)>' > > from > > > /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r > > > b:54:in `require' > > from > > > /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r > > > b:54:in `require' > > from > > > /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma > > > nds/commands_tasks.rb:78:in `block in server' > > from > > > /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma > > > nds/commands_tasks.rb:75:in `tap' > > from > > > /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma > > > nds/commands_tasks.rb:75:in `server' > > from > > > /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma > > > nds/commands_tasks.rb:39:in `run_command!' > > from > > > /opt/rh/sclo-ror42/root/usr/share/gems/gems/railties-4.2.5.1/lib/rails/comma > > > nds.rb:17:in `' > > from > > > /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r > > > b:128:in `require' > > from > > > /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r > > > b:128:in `rescue in require' > > from > > > /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_require.r > > > b:39:in `require' > > from /usr/share/foreman/bin/rails:4:in `' > > [FAILED] > > > > > > I've verified that foreman_memcache is installed and accessible, though > I > > fear that it may be showing as accessible to me, but not the foreman > > application itself. > > > > The specific instance details are as follows: > > > > OS: redhat > > RELEASE: Red Hat Enterprise Linux Server release 6.9 (Santiago) > > FOREMAN: 1.12.4 > > RUBY: ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux] > > PUPPET: 3.8.7 > > DENIALS: 0 > > > > > > I'm painfully aware the the ruby, foreman, and puppet versions are > horribly > > out of date, but, due to circumstances beyond my control, I'm unable to > > change them currently. > > > > Anyone have any ideas what could be done to potentially fix this beast? > > Wouldn't be as much of an issue if it weren't blocking deployment of a > > newer version/instance of it as well... > > > > Thanks in advance! > > >

I see "/opt/theforeman/tfm" in the stacktrace, so I'm guessing that will
be the correct SCL. As marek says, you need to ensure the gem is
available in the packaged Ruby, rather than the system Ruby :slight_smile:

Greg

··· On 14/11/17 09:27, Marek Hulán wrote: > also based on your Foreman version, the SCL might not be tfm, in that case