Support #15331
closedSmart-Proxy
Description
I patched our rhel 7 puppet server that also runs foreman 1.7.5. The puppet version upgraded to version 3.8.7 and the smart-proxy in foreman broke.
This is the message I receive:
Warning!
ERF12-5356 [ProxyAPI::ProxyException]: Unable to get PuppetCA certificates ([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy https://$HOSTNAME$:8443/puppet/ca
Here is the full trace:
ProxyAPI::ProxyException
ERF12-5356 [ProxyAPI::ProxyException]: Unable to get PuppetCA certificates ([Errno::ECONNREFUSED]: Connection refused - connect(2)) for proxy https://$HOSTNAME$:8443/puppet/ca
lib/proxy_api/puppetca.rb:47:in `rescue in all'
lib/proxy_api/puppetca.rb:45:in `all'
app/services/smart_proxies/puppet_ca.rb:21:in `all'
app/services/smart_proxies/puppet_ca.rb:36:in `find_by_state'
app/controllers/puppetca_controller.rb:8:in `index'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
I replaced the actual host name with $HOSTNAME$
This is the /var/log/foreman-proxy/proxy.log:
W, [2016-06-07T03:18:02.972991 #4542] WARN -- : Couldn't find settings file /etc/foreman-proxy/settings.d/foreman_proxy.yml. Using default settings.
I, [2016-06-07T03:18:02.973181 #4542] INFO -- : 'foreman_proxy' settings were initialized with default values: :enabled: true
I, [2016-06-07T03:18:02.975062 #4542] INFO -- : 'facts' module is disabled.
I, [2016-06-07T03:18:02.975367 #4542] INFO -- : 'dns' module is disabled.
I, [2016-06-07T03:18:02.975562 #4542] INFO -- : 'templates' module is disabled.
I, [2016-06-07T03:18:02.975815 #4542] INFO -- : 'tftp' module is disabled.
I, [2016-06-07T03:18:02.976029 #4542] INFO -- : 'dhcp' module is disabled.
I, [2016-06-07T03:18:03.273431 #4542] INFO -- : 'puppet' settings were initialized with default values: :puppet_provider: puppetrun, :puppetdir: /etc/puppet
I, [2016-06-07T03:18:03.275411 #4542] INFO -- : 'bmc' module is disabled.
I, [2016-06-07T03:18:03.275716 #4542] INFO -- : 'realm' module is disabled.
Updated by Anonymous almost 8 years ago
Doesn't look like ssl is enabled on smart-proxy. It's not entirely clear what version you are running, here's the url for smart-proxy ssl configuration for version 1.7.x: https://theforeman.org/manuals/1.7/index.html#4.3.2SmartProxySettings.
Updated by John Webb almost 8 years ago
I rolled the patches back and started applying patches one at a time and the rubygem-rack 1.6.4-2.el7 patch from epel is the patch that broke the smart_proxy. I am not sure exactly what this patch did to break the smart_proxy.
Updated by Anonymous almost 8 years ago
I assume you are running under ruby 1.8.7? There's an issue with rack past version 1.6 under ruby 1.8.7, which has been fixed in releases 1.11 and above.
Updated by John Webb almost 8 years ago
It is Foreman 1.7.5. I upgraded that to version 1.8.4 and now when I login all I get is a Warning! undefined variable or method 'timezone' for #<User
I haven't had time to look for this solution but you can resolve this one if you would like or help me figure out what this warning is all about.
Either way thank you.
Updated by Dominic Cleal almost 8 years ago
now when I login all I get is a Warning! undefined variable or method 'timezone' for #<User
This suggests the database hasn't migrated (timezone was a new field), or Foreman hasn't been restarted after a successful migration (restart apache2/httpd).
Updated by John Webb almost 8 years ago
The database was the problem. I had to go into the foreman database and drop two columns from the nics table. Once I did that the database migrated with no errors.
It looks good so far.
Thank you for your help!
Updated by Dominic Cleal almost 8 years ago
- Status changed from Feedback to Resolved
Thanks for confirming!