Katello 2.4 on RHEL 7.2 fails in "/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy"

Hi,
I tried installing Katello 2.4 on a RHEL 7.2 system. Getting these errors:
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt08.pvt.hawaii.edu]:
Could not evaluate: Proxy ppt08.pvt.hawaii.edu cannot be registered (Could
not load data from https://ppt08.pvt.hawaii.edu
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt08.pvt.hawaii.edu]:
Failed to call refresh: Proxy ppt08.pvt.hawaii.edu cannot be registered
(Could not load data from https://ppt08.pvt.hawaii.edu
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt08.pvt.hawaii.edu]:
Proxy ppt08.pvt.hawaii.edu cannot be registered (Could not load data from
https://ppt08.pvt.hawaii.edu

The installer log doesn't have much more information:
[ERROR 2016-04-28 14:07:49 main]
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt08.pvt.hawaii.edu]:
Could not evaluate: Proxy ppt08.pvt.hawaii.edu cannot be registered (Could
not load data from https://ppt08.pvt.hawaii.edu
[ INFO 2016-04-28 14:07:49 main] - is your server down?
[ INFO 2016-04-28 14:07:49 main] - was rake apipie:cache run when using
apipie cache? (typical production settings)): N/A
[ INFO 2016-04-28 14:07:49 main]
/usr/share/ruby/vendor_ruby/puppet/util/errors.rb:106:in fail' [ INFO 2016-04-28 14:07:49 main] /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:7:inraise_error'
[ INFO 2016-04-28 14:07:49 main]
/usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:39:in
rescue in proxy' [ INFO 2016-04-28 14:07:49 main] /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:33:inproxy'
[ INFO 2016-04-28 14:07:49 main]
/usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:43:in
id' [ INFO 2016-04-28 14:07:49 main] /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:47:inexists?'

When I try to open the web site, I get:
Web application could not be started

No such file or directory - /usr/share/foreman/tmp/cache/websockets_ssl_key20160428-9692-1mo3xr9.lock (Errno::ENOENT)
/opt/rh/ruby193/root/usr/share/ruby/tempfile.rb:346:in rmdir' /opt/rh/ruby193/root/usr/share/ruby/tempfile.rb:346:inrmdir'
/opt/rh/ruby193/root/usr/share/ruby/tempfile.rb:338:in ensure in locking' /opt/rh/ruby193/root/usr/share/ruby/tempfile.rb:338:inlocking'
/opt/rh/ruby193/root/usr/share/ruby/tempfile.rb:144:in block in initialize' /opt/rh/ruby193/root/usr/share/ruby/tmpdir.rb:133:increate'
/opt/rh/ruby193/root/usr/share/ruby/tempfile.rb:134:in initialize' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/file/atomic.rb:19:innew'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/file/atomic.rb:19:in atomic_write' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/file_store.rb:91:inwrite_entry'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:140:in write_entry' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache.rb:364:inblock in write'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache.rb:520:in instrument' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache.rb:362:inwrite'
/usr/share/foreman/app/models/setting.rb:64:in []' /usr/share/foreman/app/models/setting/auth.rb:43:invalidate_websockets_encrypt'
/usr/share/foreman/app/models/setting.rb:23:in validate' /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in_callback_before_101'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:616:in

So I checked:
[root@ppt08 ~]# tree /usr/share/foreman/tmp/cache
/usr/share/foreman/tmp/cache
├── 582
│ └── E00
├── 60B
│ └── 390
├── 69D
│ └── EC0
├── 75D
│ └── 6E0
├── 794
│ └── F40
│ └── websockets_ssl_key
├── 7F9
│ └── CE0
│ └── websockets_ssl_cert
└── BE4
└── 100

14 directories, 2 files
[root@ppt08 ~]#

And, yup, something looks wrong. Any idea what I did wrong? Any help would
be appreciated. Thanks.

–Stephen

You might be hitting Bug #14811: Passenger paths changed once again (RHEL7) - SELinux - Foreman if
SELinux is set to enforcing (default), where the version of Passenger in
EPEL7 doesn't have a working SELinux policy.

Either try setting SELinux to permissive or downgrade all Passenger
packages to 4.0.18 from the Foreman repos.

··· On 29/04/16 01:43, Stephen Odo wrote: > Hi, > I tried installing Katello 2.4 on a RHEL 7.2 system. Getting these errors: > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt08.pvt.hawaii.edu]: > Could not evaluate: Proxy ppt08.pvt.hawaii.edu cannot be registered > (Could not load data from https://ppt08.pvt.hawaii.edu > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt08.pvt.hawaii.edu]: > Failed to call refresh: Proxy ppt08.pvt.hawaii.edu cannot be registered > (Could not load data from https://ppt08.pvt.hawaii.edu > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt08.pvt.hawaii.edu]: > Proxy ppt08.pvt.hawaii.edu cannot be registered (Could not load data > from https://ppt08.pvt.hawaii.edu > > The installer log doesn't have much more information: > [ERROR 2016-04-28 14:07:49 main] > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt08.pvt.hawaii.edu]: > Could not evaluate: Proxy ppt08.pvt.hawaii.edu cannot be registered > (Could not load data from https://ppt08.pvt.hawaii.edu > [ INFO 2016-04-28 14:07:49 main] - is your server down? > [ INFO 2016-04-28 14:07:49 main] - was rake apipie:cache run when using > apipie cache? (typical production settings)): N/A > [ INFO 2016-04-28 14:07:49 main] > /usr/share/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail' > [ INFO 2016-04-28 14:07:49 main] > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:7:in > `raise_error' > [ INFO 2016-04-28 14:07:49 main] > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:39:in > `rescue in proxy' > [ INFO 2016-04-28 14:07:49 main] > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:33:in > `proxy' > [ INFO 2016-04-28 14:07:49 main] > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:43:in > `id' > [ INFO 2016-04-28 14:07:49 main] > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:47:in > `exists?' > > When I try to open the web site, I get: > > > Web application could not be started > > No such file or directory - /usr/share/foreman/tmp/cache/websockets_ssl_key20160428-9692-1mo3xr9.lock (Errno::ENOENT)


Dominic Cleal
dominic@cleal.org

Thank you Dominic. That was the problem. Set SELinux to "permissive" and
now all is well.

–Stephen

··· On Thursday, April 28, 2016 at 9:30:04 PM UTC-10, Dominic Cleal wrote: > > On 29/04/16 01:43, Stephen Odo wrote: > > Hi, > > I tried installing Katello 2.4 on a RHEL 7.2 system. Getting these > errors: > > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ > ppt08.pvt.hawaii.edu]: > > Could not evaluate: Proxy ppt08.pvt.hawaii.edu cannot be registered > > (Could not load data from https://ppt08.pvt.hawaii.edu > > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ > ppt08.pvt.hawaii.edu]: > > Failed to call refresh: Proxy ppt08.pvt.hawaii.edu cannot be registered > > (Could not load data from https://ppt08.pvt.hawaii.edu > > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ > ppt08.pvt.hawaii.edu]: > > Proxy ppt08.pvt.hawaii.edu cannot be registered (Could not load data > > from https://ppt08.pvt.hawaii.edu > > > > The installer log doesn't have much more information: > > [ERROR 2016-04-28 14:07:49 main] > > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ > ppt08.pvt.hawaii.edu]: > > Could not evaluate: Proxy ppt08.pvt.hawaii.edu cannot be registered > > (Could not load data from https://ppt08.pvt.hawaii.edu > > [ INFO 2016-04-28 14:07:49 main] - is your server down? > > [ INFO 2016-04-28 14:07:49 main] - was rake apipie:cache run when using > > apipie cache? (typical production settings)): N/A > > [ INFO 2016-04-28 14:07:49 main] > > /usr/share/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail' > > [ INFO 2016-04-28 14:07:49 main] > > > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:7:in > > > `raise_error' > > [ INFO 2016-04-28 14:07:49 main] > > > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:39:in > > > `rescue in proxy' > > [ INFO 2016-04-28 14:07:49 main] > > > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:33:in > > > `proxy' > > [ INFO 2016-04-28 14:07:49 main] > > > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:43:in > > > `id' > > [ INFO 2016-04-28 14:07:49 main] > > > /usr/share/katello-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v2.rb:47:in > > > `exists?' > > > > When I try to open the web site, I get: > > > > > > Web application could not be started > > > > No such file or directory - > /usr/share/foreman/tmp/cache/websockets_ssl_key20160428-9692-1mo3xr9.lock > (Errno::ENOENT) > > You might be hitting http://projects.theforeman.org/issues/14811 if > SELinux is set to enforcing (default), where the version of Passenger in > EPEL7 doesn't have a working SELinux policy. > > Either try setting SELinux to permissive or downgrade all Passenger > packages to 4.0.18 from the Foreman repos. > > -- > Dominic Cleal > dom...@cleal.org >