Deploying katello/foreman with foremanctl deploy fails at task "pulp configure Foreman proxy"

Hello everybody,

I’m evaluating Foreman/Katello as patch management software for my place of work.

For doing this I setup a VM with AlmaLinux 10 and followed the guide at Installing Foreman Server with Katello 5.0 plugin (containerized) on Enterprise Linux

I tried following command (I first just used foremanctl deploy but this didn’t worked either) but replaced our actual FQDN and used credentials with sample values for this forum:

foremanctl deploy \ 
   --initial-admin-username admin \ 
   --initial-admin-password admin \
   --initial-organization "ExampleOrga" \
   --initial-location "Arkham"  \ 
   --foreman-trusted-proxy "127.0.0.1/8" \
   --foreman-trusted-proxy "::1"  \
   --foreman-trusted-proxy "192.168.202.0/24" \ 
   --server-alias katello \
   --server-alias katello.example.com 

Problem:

The deploy command failed with this output:

TASK [pulp : Configure Foreman Proxy] ********************************************************************************************************************************************************
fatal: [localhost]: FAILED! => 
    changed: false
    msg: 'Failed to ensure entity state: ForemanApiException: Error while performing create
        on smart_proxies: 422 Client Error: Unprocessable Content for url: https://katello.example.com/api/smart_proxies
        - {''id'': None, ''errors'': {''base'': [''Unable to communicate with the proxy:
        ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([Errno::ECONNREFUSED]:
        Failed to open TCP connection to katello.example.com:443 (Connection
        refused - connect(2) for "katello.example.com" port 443)) for proxy https://katello.example.com/pulp/api/v3/smart_proxy/v2/features'',
        ''Please check the proxy is configured and running on the host.'']}, ''full_messages'':
        [''Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]:
        Unable to detect features ([Errno::ECONNREFUSED]: Failed to open TCP connection
        to katello.example.com:443 (Connection refused - connect(2) for "katello.example.com"
        port 443)) for proxy https://katello.example.com/pulp/api/v3/smart_proxy/v2/features'',
        ''Please check the proxy is configured and running on the host.'']}'

PLAY RECAP ***********************************************************************************************************************************************************************************
localhost                  : ok=195  changed=6    unreachable=0    failed=1    skipped=49   rescued=0    ignored=0   

Expected outcome:

The deploy command comples successfully

Foreman and Proxy versions:

sudo dnf info foremanctlLast metadata expiration check: 1:25:17 ago on Sat 10 Oct 2026 11:23:11 PM UTC.Installed PackagesName         : foremanctlVersion      : 3.3.1Release      : 1.el10Architecture : noarchSize         : 28 MSource       : foremanctl-3.3.1-1.el10.src.rpmRepository   : From repo    : foremanSummary      : Install Foreman using containersURL          : License      : GPL-2-onlyDescription  : Install Foreman using containers. They are deployed as podman quadlets.

Foreman and Proxy plugin versions:

sudo dnf info foremanctl
Last metadata expiration check: 1:25:17 ago on Sat 10 Oct 2026 11:23:11 PM UTC.
Installed Packages
Name         : foremanctl
Version      : 3.3.1
Release      : 1.el10
Architecture : noarch
Size         : 28 M
Source       : foremanctl-3.3.1-1.el10.src.rpm
Repository   : @System
From repo    : foreman
Summary      : Install Foreman using containers
URL          : https://github.com/theforeman/foremanctl
License      : GPL-2-only
Description  : Install Foreman using containers. They are deployed as podman quadlets.

Distribution and version:

sudo dnf info foremanctlLast metadata expiration check: 1:25:17 ago on Sat 10 Oct 2026 11:23:11 PM UTC.Installed PackagesName         : foremanctlVersion      : 3.3.1Release      : 1.el10Architecture : noarchSize         : 28 MSource       : foremanctl-3.3.1-1.el10.src.rpmRepository   : From repo    : foremanSummary      : Install Foreman using containersURL          : License      : GPL-2-onlyDescription  : Install Foreman using containers. They are deployed as podman quadlets.

Other relevant data:

For troubleshooting I looked in the ansible files at /usr/share/foremanctl. If I understood correctly the task should use the same ca- and cert files as the rest of the playbook used for the deployment. If this is the case why does it fail then? I tried to use curl with curl --cacert PATH_TO_FOREMAN_CA_CERT https://katello.example.com and it worked so I would expect the same with the formenctl deploy command.

I also wonder whether containerized deployments are even production ready or still in a kind of “tech preview” phase since most of the documentation isn’t completed yet and I couldn’t find any hint whether a containerized or forman-installer-based setup is the recommended way to go for new setups.

I would appreciate any hints how to proceed. If it’s worth it I could also try the nightly-build (since it’s still a proof of concept I’m doing) for the 5.1. release if I’m hit by a bug fixed in it.

Thanks and best regards, Johannes.

Hi @johannes_s ,

I can’t look into the technical details of your error right now, but I did want to address your question about the state of containerized Foreman. Containerized Foreman is not yet at a state of feature parity with classical monolithic Foreman, which is installed via foreman-installer. What you see documented is what is currently supported.

However, we’re committed to helping with what is supported. If no one else gets to it this weekend, we can get some eyes on your smart proxy problem during the work week.

Hi @ibballou,

thanks for your fast reply. Actually I didn’t expect any answers during the weekend, so this was a pleasant surprise.

Also thanks for the hint concerning feature parity. I’m not too worried about that at the moment since we are mostly interested in the patch-managment features of Katello and might look into other features later if we need something like that.

My reason I wanted to start with the containerized version is, that I hoped to reduce issues with packaging dependencies since I also need to use the nagios plugins for our monitoring which are from the non-supported EPEL repo. I already encountered an older thread on that particular problem ( Useful EPEL packages such as nagios/nrpe, munin-node etc. no longer available on CentOS 8 + Foreman 2.4 - #3 by evgeni ) and that one can reduce the blast radius by configuring the repository to only be used for nagios stuff. Nontheless I hope that by combining the containers and the “includepkgs=nagios*” statement in the repo configuration I can get rid of of most of the potential issues caused by combining packages from EPEL and foreman/katello on the same host.

Or is there any other approach for monitoring Katello hosts with a nagios-like software like Icinga (this is the one we use) or checkmk?

Regards, Johannes

What does katello.example.com resolve to in your environment? Could it be it’s something like 127.0.0.1?

host resolves to the local ip

katello ~]$ host katello
katello.example.com has address 192.168.202.212
host katello.example.com
katello.example.com has address 192.168.202.212

But in /etc/hosts it leads to 127.0.0.1:

cat /etc/hosts
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.redhat.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data
# 
# The following lines are desirable for IPv4 capable hosts
127.0.0.1 katello.example.com katello
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4

# The following lines are desirable for IPv6 capable hosts
::1 katello.example.com katello
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

host katello.example.com from my notebook also resolves to 192.168.202.212 (as expected).

Yeah, the /etc/hosts entry is what’s killing you (blame cloud-init).

Remove that. Stop all containers. Now it’ll work.

Thanks, this did indeed work :slight_smile:
I edited the cloud-init config to set manage_etc_hosts to true and replaced

127.0.0.1 katello.example.com katello

with

192.168.202.202 katello.example.com katello

Now it works but now I’m wondering how to deal with another issue: The VM get’s it’s IP configuration via DHCP for Ipv4 and SLAAC for IPv6. Although most of the time the IP should stay the same this isn’t guaranted per se. Should I remove the katello.example.com katello entries completly from the /etc/hosts or what’s the best course of action?

I also realize that by using the AlmaLinux cloud image (normally the best way to get a running system with minimum effort) I made my life harder. Not only with the /etc/hosts issue but also moving /var to a dedicated lvm volume and moving the files doesn’t seem to play nice with selinux. The latter part might be an skill issue on my part though.

So I think that I will reinstall the vm with the AlmaLinux iso installer but the DHCP question still remains: Should I fix the assigned IP at the DHCP-server with a reservation or what would be the recommended way to go? I might have missed something in the manual but I can’t remember that the IP should be static.

Thanks and best regards, Johannes.

There should be nothing inside the application that relies on the IP address being stable (contrary to the hostname, which is used for certificates etc). So either you have working DNS for katello.example.com (preferred) or something that keeps /etc/hosts updated (and restarts containers! if it does change) should do the trick.

Thanks for the explaination, this makes sense. Since my original solution is resolved now I would like to mark somethink as solution. Should I mark your answer with the hint to remove the wrong line from /etc/hosts or do a more detailed writeup which includes all details?

Thanks again and regards, Johannes.

Marked yours as the solution, as that actually had the “replace IP” step in it :slight_smile:

This is an copy-paste error, actually I set_manage_etc_hosts was changed to “false” to disable cloud-init for /etc/hosts