If you are not using the docker smart proxy component, then you can remove it. Was a little bit more difficult than just running foreman-installer --foreman-proxy-content-enable-docker false. I had to actually edit the /etc/foreman-installer/scenarios.d/foreman-proxy-content-answers.yaml` and set enable_docker to false, then use dnf to remove the rubygems associated with the docker proxy and run the above foreman-installer command.
That got me past that error, but now I am stuck on a different error. Seems maybe 4.18 wasn’t quite ready for prime time. I can’t create any new Content views versions. Both Deb and RPM based repos end in an error The repository's publication is missing. Please run a 'complete' sync on {repository name}.
I was trying to sync my proxy today and I am facing sync issue as well. I am on 3.16.0 with latest katello, I suspect something to do with this new code released since this was not the case on the previous 3.15.0 released.
Below is the error I am observig on sync:
Danger alert:Error
Last sync failed: ERF12-0457 [ProxyAPI::ProxyException]: Unable to update hosts ([RestClient::InternalServerError]: 500 Internal Server Error) for proxy
Bumping this thread. Looks like when I hit complete sync, it still works and syncs in the packages/repos. I verified this by checking the directories of the proxies via url (https://<“proxy”>/pulp/content/<“organization”>/.
But some sort of API call is failing against the proxies when retrieving the status/info.
I was able to solve the issue by doing the following:
Delete the Content View in the WebUI (you’ll need to attach any hosts to a different CV, I suggest creating a CV with no repositories)
You can either delete the repositories here, or for a simpler solution visit each repository from the Content View and set to OnDemand (skip this if already OnDemand repo). Reclaim Space for the Repository and then set back to Immediate. Perform an advanced complete sync.
Recreate the content view and publish.
Go to your activation keys section, and reassign the activation key previously attached to the now deleted content view, to the new content view. The normal sync process will correct the associated content hosts to the new content view, no user action required.
Wash/Rinse/Repeat for other Content Views you are having issues with.
Unfortunately, this will cause you to lose any historical data/Content View releases. But it did fix all my issues around publishing new Content Views.
Sorry I don’t have a better solution, but at least it saves you from deleting/recreating all of your repositories.
I disabled the container proxy since we weren’t using it currently. Also, we only do patching once (1) after patch tuesday. So I wouldn’t be able to install any updated packages until next Tues.
We upgraded yesterday to Foreman 3.16 and Katello 4.18 and we are also having smart proxy sync issues. Our error is:
ERF12-0457 [ProxyAPI::ProxyException]: Unable to update hosts ([RestClient::InternalServerError]: 500 Internal Server Error) for proxy https://smartproxy.example.com:9090/container_gateway/update_hosts
While the smart proxy log shows:
Error processing request '7b7d7eba-9cac-4d08-8138-d031626e5cb5: <Sequel::NotNullConstraintViolation>: PG::NotNullViolation: ERROR: null value in column "uuid" of relation "hosts" violates not-null constraint
DETAIL: Failing row contains (121, null).
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:171:in `exec'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:171:in `block in execute_query'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/logging.rb:38:in `log_connection_yield'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:171:in `execute_query'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:159:in `block in execute'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:136:in `check_disconnect_errors'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:159:in `execute'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:532:in `_execute'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:348:in `block (2 levels) in execute'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:555:in `check_database_errors'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:348:in `block in execute'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/connection_pool/threaded.rb:88:in `hold'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/connecting.rb:283:in `synchronize'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/postgres.rb:348:in `execute'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/query.rb:50:in `execute_dui'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/dataset/actions.rb:1208:in `execute_dui'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/dataset/actions.rb:1080:in `block (2 levels) in _import'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/dataset/actions.rb:1080:in `each'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/dataset/actions.rb:1080:in `block in _import'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/transactions.rb:199:in `block in transaction'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/connection_pool/threaded.rb:88:in `hold'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/connecting.rb:283:in `synchronize'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/transactions.rb:197:in `transaction'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/dataset/actions.rb:1128:in `_import_transaction'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/dataset/actions.rb:1080:in `_import'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/adapters/shared/postgres.rb:2538:in `_import'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/dataset/actions.rb:386:in `import'
/usr/share/gems/gems/smart_proxy_container_gateway-3.4.1/lib/smart_proxy_container_gateway/container_gateway_api.rb:265:in `block (2 levels) in <class:Api>'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/transactions.rb:264:in `_transaction'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/transactions.rb:239:in `block in transaction'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/connection_pool/threaded.rb:92:in `hold'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/connecting.rb:283:in `synchronize'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/transactions.rb:197:in `transaction'
/usr/share/gems/gems/sequel-5.95.1/lib/sequel/database/transactions.rb:187:in `transaction'
/usr/share/gems/gems/smart_proxy_container_gateway-3.4.1/lib/smart_proxy_container_gateway/container_gateway_api.rb:262:in `block in <class:Api>'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1697:in `call'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1697:in `block in compile!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1030:in `block (3 levels) in route!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1049:in `route_eval'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1030:in `block (2 levels) in route!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1078:in `block in process_route'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1076:in `catch'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1076:in `process_route'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1028:in `block in route!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1025:in `each'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1025:in `route!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1147:in `block in dispatch!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `block in invoke'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `catch'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `invoke'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1142:in `dispatch!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:956:in `block in call!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `block in invoke'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `catch'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1119:in `invoke'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:956:in `call!'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:945:in `call'
/usr/share/foreman-proxy/lib/proxy/hsts_middleware.rb:12:in `call'
/usr/share/foreman-proxy/lib/proxy/log.rb:102:in `call'
/usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:11:in `call'
/usr/share/gems/gems/rack-protection-2.2.4/lib/rack/protection/xss_header.rb:18:in `call'
/usr/share/gems/gems/rack-protection-2.2.4/lib/rack/protection/path_traversal.rb:16:in `call'
/usr/share/gems/gems/rack-protection-2.2.4/lib/rack/protection/json_csrf.rb:26:in `call'
/usr/share/gems/gems/rack-protection-2.2.4/lib/rack/protection/base.rb:50:in `call'
/usr/share/gems/gems/rack-protection-2.2.4/lib/rack/protection/base.rb:50:in `call'
/usr/share/gems/gems/rack-protection-2.2.4/lib/rack/protection/frame_options.rb:31:in `call'
/usr/share/gems/gems/rack-2.2.4/lib/rack/null_logger.rb:11:in `call'
/usr/share/gems/gems/rack-2.2.4/lib/rack/head.rb:12:in `call'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/show_exceptions.rb:22:in `call'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:218:in `call'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:2004:in `call'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1564:in `block in call'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1780:in `synchronize'
/usr/share/gems/gems/sinatra-2.2.4/lib/sinatra/base.rb:1564:in `call'
/usr/share/gems/gems/rack-2.2.4/lib/rack/urlmap.rb:74:in `block in call'
/usr/share/gems/gems/rack-2.2.4/lib/rack/urlmap.rb:58:in `each'
/usr/share/gems/gems/rack-2.2.4/lib/rack/urlmap.rb:58:in `call'
/usr/share/gems/gems/rack-2.2.4/lib/rack/builder.rb:244:in `call'
/usr/share/gems/gems/rack-2.2.4/lib/rack/handler/webrick.rb:95:in `service'
/usr/share/gems/gems/webrick-1.9.1/lib/webrick/httpserver.rb:140:in `service'
/usr/share/gems/gems/webrick-1.9.1/lib/webrick/httpserver.rb:96:in `run'
/usr/share/gems/gems/webrick-1.9.1/lib/webrick/server.rb:310:in `block in start_thread'
/usr/share/gems/gems/logging-2.4.0/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
Yet the above referenced version of the rubygem-smart_proxy_container_gateway was installed.
Any recommendations in resolving this specific error?
Looking at the trace, this is a different error than what was fixed with the last release and the PR above…I’m going to add an issue for this to be fixed.
That implies there are host(s) registered to smart proxy with no uuid..It’s an edge case which means that a host either didn’t unregister properly or the data got lost during some other operation.
The data inconsistency of the host with missing UUID will require further investigation. In the meantime, a workaround would be to identify the host registered via smart proxy with no UUID and possibly un-registering it properly or to re-register the host.
I’ve just started experiencing this as well. Well, two of my three smart proxies’ last successful syncs were on Dec 15. I saw that the gateway package has been tagged with 3.4.2 and a build exists in the nightly directory on the mirror, but I also assume this is reliant on the Katello 4.18.2 release which has not been tagged. Is this correct?
Stupidly just gave it a shot on my production infra of applying the patches in the linked Redmine.
Of my three smart proxies, one is in the home region of the Foreman Server and never had a sync issue. I applied the Katello patch to the Foreman server, then the container gateway patch to one of the outer-region proxies. I was able to successfully sync the two non-functioning proxies after, even without applying the container gateway patch to one of the nodes. The original functioning node is still working fine when syncing.