I see a lot of this error messages in the journal for foreman on katello 4.1:
Jul 7 14:07:44 foreman foreman: /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.0/app/lib/katello/http_resource.rb:75: warning: URI.escape is obsolete
# rpm -qf /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.0/app/lib/katello/http_resource.rb
tfm-rubygem-katello-4.1.0-1.el7.noarch