Bug #20251
closedUnable to register smart-proxy
Description
Katello 3.3.2 / Foreman 1.14.2
I'm attempting to create a new smart-proxy and register it on the katello server.
Followed the guide on https://theforeman.org/plugins/katello/3.3/installation/smart_proxy.html.
When I execute the foreman-installer command with all the parameters (on to-be the smart-proxy server) I reach approx 93% and get an error:
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[us-proxy.stibo.corp]/ensure: change from absent to present failed: Proxy us-proxy.stibo.corp cannot be registered: Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([Errno::EHOSTUNREACH]: No route to host - connect(2) for "us-proxy.stibo.corp" port 9090) for proxy https://us-proxy.stibo.corp:9090/features Please check the proxy is configured and running on the host.
I can confirm the ports 80,443,9090 are all open between the katello and smart-proxy server (tested with telnet both ways). I can resolve all names on both servers. I don't know how I can confirm the proxy is running or if this is the only problem?
Updated by Anonymous over 7 years ago
- Tracker changed from Bug to Support
Check Foremans' production.log when the proxy should get registered. The installer is connecting to Foreman's API. Foreman in turn connects to the new Proxy to query its features.
Updated by Kent Knudsen over 7 years ago
Michael Moll wrote:
Check Foremans' production.log when the proxy should get registered. The installer is connecting to Foreman's API. Foreman in turn connects to the new Proxy to query its features.
The production.log says the same. But how do I start or confirm the proxy is started. Seems to be the problem for foreman (no smart proxy server found on us-proxy...):
2017-07-10 11:00:20 0f1464cb [app] [I] Started POST "/smart_proxies" for 10.0.12.46 at 2017-07-10 11:00:20 +0200 2017-07-10 11:00:20 0f1464cb [app] [I] Processing by SmartProxiesController#create as */* 2017-07-10 11:00:20 0f1464cb [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"ooV4pYUlwFHnUaegheQ3WpxDpqq/mgTIX6ZPJfNqWDG4MiI09DzX6z1CRGSw36d/pm/y3rD1izZafzlW3EO8Ag==", "smart_proxy"=>{"name"=>"us-proxproxy.stibo.corp:9090", "location_ids"=>["", "4"], "organization_ids"=>["", "3"]}, "_ie_support"=>""} 2017-07-10 11:00:20 0f1464cb [app] [I] Failed to save: Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([Errno::EHOSTUNREACH]: No route to host - connect(2) f" port 9090) for proxy https://us-proxy.stibo.corp:9090/features, Please check the proxy is configured and running on the host. 2017-07-10 11:00:20 0f1464cb [app] [I] Rendered taxonomies/_loc_org_tabs.html.erb (8.7ms) 2017-07-10 11:00:20 0f1464cb [app] [I] Rendered smart_proxies/_form.html.erb (14.2ms) 2017-07-10 11:00:20 0f1464cb [app] [I] Rendered smart_proxies/new.html.erb (15.1ms) 2017-07-10 11:00:20 0f1464cb [app] [I] Completed 200 OK in 176ms (Views: 14.9ms | ActiveRecord: 5.7ms) 2017-07-10 11:00:20 0f1464cb [app] [I] Started GET "/smart_proxies/1-katello-stibo-corp/ping" for 10.0.12.46 at 2017-07-10 11:00:20 +0200 2017-07-10 11:00:20 0f1464cb [app] [I] Processing by SmartProxiesController#ping as */* 2017-07-10 11:00:20 0f1464cb [app] [I] Parameters: {"id"=>"1-katello-stibo-corp"} 2017-07-10 11:00:20 0f1464cb [app] [I] Completed 200 OK in 23ms (Views: 0.3ms | ActiveRecord: 3.9ms) 2017-07-10 11:04:33 206fc156 [app] [I] Started POST "/api/hosts/facts" for 10.64.143.14 at 2017-07-10 11:04:33 +0200 2017-07-10 11:04:33 206fc156 [app] [I] Processing by Api::V2::HostsController#facts as JSON 2017-07-10 11:04:33 206fc156 [app] [I] Parameters: {"facts"=>"[FILTERED]", "name"=>"us-proxy.stibo.corp", "certname"=>"us-proxy.stibo.corp", "apiv"=>"v2", :host=>{"certname"=>"us-proxy.stibo.corp", "name"=>"us-proxy.stibo.corp"}} 2017-07-10 11:04:33 206fc156 [app] [W] No smart proxy server found on ["us-proxy.stibo.corp"] and is not in trusted_puppetmaster_hosts 2017-07-10 11:04:33 206fc156 [app] [I] Rendered api/v2/errors/access_denied.json.rabl within api/v2/layouts/error_layout (1.3ms) 2017-07-10 11:04:33 206fc156 [app] [I] Filter chain halted as #<Proc:0x00000005c30de8@/usr/share/foreman/app/controllers/concerns/foreman/controller/smart_proxy_auth.rb:14> rendered or redirected 2017-07-10 11:04:33 206fc156 [app] [I] Completed 403 Forbidden in 26ms (Views: 7.0ms | ActiveRecord: 1.9ms)
Updated by Anonymous over 7 years ago
On us-proxy.stibo.corp, make sure, the foreman-proxy service is running (also check the logs in /var/log/foreman-proxy/), but "No route to host" sounds still like the the Foremsn server can't connect. On the Foreman server, try "curl -k https://us-proxproxy.stibo.corp:9090/features". Is there some HTTP-proxy configured, that's making it work on the command line, but missing for the Foreman web server environment?
Updated by Kent Knudsen over 7 years ago
Michael Moll wrote:
On us-proxy.stibo.corp, make sure, the foreman-proxy service is running (also check the logs in /var/log/foreman-proxy/), but "No route to host" sounds still like the the Foremsn server can't connect. On the Foreman server, try "curl -k https://us-proxproxy.stibo.corp:9090/features". Is there some HTTP-proxy configured, that's making it work on the command line, but missing for the Foreman web server environment?
Hm, had to stop the firewall on the proxy - now "curl -k https://us-proxproxy.stibo.corp:9090/features" gives:
["logs","pulpnode","puppet","puppetca","templates","tftp"]
And now I could execute and finish the foreman-installer command with success.
Then confirmed the foreman-proxy was running and added the smart-proxy through the foreman web GUI with success.
So the conclusion must be that the proxy installer do not setup the local firewall for the smart-proxy to work properly.
Is there a quick way to have the pulp storage start to sync? Seems I'm stuck at 2.5 GB out of 380+ GB repositories even if I push the sync button. The sync stops after 3 secs with success.
Updated by Anonymous over 7 years ago
- Status changed from New to Resolved
So the conclusion must be that the proxy installer do not setup the local firewall for the smart-proxy to work properly.
That's correct, the installer doesn't touch firewall stuff.
Is there a quick way to have the pulp storage start to sync? Seems I'm stuck at 2.5 GB out of 380+ GB repositories even if I push the sync button. The sync stops after 3 secs with success.
No idea, sorry. Best to ask on irc or the foreman-users list.
Updated by Kent Knudsen over 7 years ago
OK, great many thanks, I solved the initial problem.
Please close issue.
/Kent
Updated by Justin Sherrill over 7 years ago
- Tracker changed from Support to Bug
- Category set to Foreman Proxy Content
- Translation missing: en.field_release set to 166