Foreman proxy not starting in upgrade from Katello 3.4.5 to 3.5

Problem:
Running “foreman-installer --scenario katello --upgrade” and it fails with:

[ERROR 2018-09-24 20:04:06 verbose] Systemd start for foreman-proxy failed!
[ERROR 2018-09-24 20:04:06 verbose] journalctl log for foreman-proxy:
[ERROR 2018-09-24 20:04:06 verbose] – Logs begin at Mon 2018-09-24 19:34:58 HST, end at Mon 2018-09-24 20:04:06 HST. –
[ERROR 2018-09-24 20:04:06 verbose] Sep 24 20:04:06 ppt80.pvt.hawaii.edu systemd[1]: Starting Foreman Proxy…
[ERROR 2018-09-24 20:04:06 verbose] Sep 24 20:04:06 ppt80.pvt.hawaii.edu smart-proxy[13814]: Errors detected on startup, see log for details. Exiting: Dependency ‘leases_observer’ is undefined
[ERROR 2018-09-24 20:04:06 verbose] Sep 24 20:04:06 ppt80.pvt.hawaii.edu systemd[1]: foreman-proxy.service: main process exited, code=exited, status=1/FAILURE

I saw something on the web that suggested that it was related to permissions on /etc/dhcp so I followed the advice to chown … didn’t help.

Just curious: Is there a way to do a clean install without losing my content?
Expected outcome:
upgrade to Katello 3.5

Foreman and Proxy versions:
Foreman 1.15.6

Foreman and Proxy plugin versions:

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]

Is SELinux enabled ?

Seems similar to: Bug #18409: foreman-proxy does not start in 1.14 with SELinux activated - SELinux - Foreman

Yes, I am running with SELinux enabled. I originally tried it with setenforce 0 and thought it failed with the same error. But I re-ran it today and realized that I’m getting a different error now.

[ERROR 2018-09-26 11:41:13 verbose] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ppt80.pvt.hawaii.edu]: Could not evaluate: Proxy ppt80.pvt.hawaii.edu cannot be retrieved: unknown error (response 500)

Sorry, I misspoke. It seems it’s the same error. I even tried disabling SELinux:

getenforce

Disabled

The error messages that I originally saw from the installer are now only showing up in proxy.log:

# cat /var/log/foreman-proxy/proxy.log
E, [2018-09-07T13:27:20.258995 ] ERROR -- : Couldn't enable 'dhcp_isc': 
E, [2018-09-07T13:27:20.259600 ] ERROR -- : Error during startup, terminating. Dependency 'leases_observer' is undefined
1 Like

i encountered the same error and did not found a google solution:

2019-05-06T10:19:10  [D] Providers ['dhcp_isc'] are going to be configured for 'dhcp'                                                                                                                                                         
2019-05-06T10:19:10  [D] 'dhcp_isc' settings: 'blacklist_duration_minutes': 1800 (default), 'config': /etc/dhcp/dhcpd.conf (default), 'dhcp_config': /etc/dhcp/dhcpd.conf, 'dhcp_key_name': dhcp-lbsrv-omapi, 'dhcp_key_secret': BbPY9YZO1nCzD
T3iTzks84n/fpupew5WCjVaaKVC4jTji6Gc6DvqAnjXDMSIECAImo43BpZV+h20YHH+BQe2rA==, 'dhcp_leases': /var/lib/dhcp/dhcpd.leases, 'dhcp_vendor': isc, 'leases': /var/lib/dhcp/dhcpd.leases, 'leases_file_observer': inotify_leases_file_observer, 'omapi
_port': 7911 (default), 'server': 127.0.0.1, 'subnets': [], 'use_provider': dhcp_isc                                                                                                                                                          
2019-05-06T10:19:10  [I] Successfully initialized 'foreman_proxy'                                                                                                                                                                             
2019-05-06T10:19:10  [E] Couldn't enable 'dhcp_isc': cannot load such file -- rb-inotify                                                                                                                                                      
2019-05-06T10:19:10  [D] <Array> ["/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'", "/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'", "/usr/share/foreman-proxy/modules/dhcp_isc/inotify_lea
ses_file_observer.rb:1:in `<top (required)>'", "/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'", "/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'", "/usr/share/foreman-proxy/modules/dhcp_is
c/configuration_loader.rb:31:in `load_dependency_injection_wirings'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:231:in `block in wire_up_dependencies'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:230:in `eac
h'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:230:in `wire_up_dependencies'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:220:in `configure_plugin'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb
:92:in `block in configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:92:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:92:in `configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb
:170:in `block in initialize_plugins'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:170:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:170:in `initialize_plugins'", "/usr/share/foreman-proxy/lib/launcher.rb:168:in `launch'", "/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'"]
2019-05-06T10:19:10  [E] Error during startup, terminating. Dependency 'leases_observer' is undefined
2019-05-06T10:19:10  [D] <Array> ["/usr/share/foreman-proxy/lib/proxy/dependency_injection.rb:58:in `get_dependency'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:113:in `block (2 levels) in stop_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:113:in `map'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:113:in `block in stop_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:112:in `each'", "/usr/share/for
eman-proxy/lib/proxy/plugin_initializer.rb:112:in `stop_services'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:95:in `rescue in configure'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:90:in `configure'", "/us
r/share/foreman-proxy/lib/proxy/plugin_initializer.rb:170:in `block in initialize_plugins'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:170:in `each'", "/usr/share/foreman-proxy/lib/proxy/plugin_initializer.rb:170:in `initi
alize_plugins'", "/usr/share/foreman-proxy/lib/launcher.rb:168:in `launch'", "/usr/share/foreman-proxy/bin/smart-proxy:6:in `<main>'"]

i was able to fix it with installing this package:

apt install ruby-rb-inotify