External Foreman proxy with dhcpd not working

Problem:
Trying to get dhcp working on an external foreman-proxy.

Create DHCP Settings for test.domain.com task failed with the following error: ERF12-6899 [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://proxy.domain.com:8443/dhcp

Expected outcome:
Same behaviour and setup as for DHCP on Foreman, which I have working (different sites, not looking for HA)

Foreman and Proxy versions:
Foreman & proxy: v3.15

Foreman and Proxy plugin versions:
proxy dhcp and tftp plugins: v3.15

Distribution and version:
Foreman server w Katello: CentOS stream 9
External Foreman proxy: Ubuntu 20.04

Other relevant data:
Is an omapi key needed if dhcpd runs on the foreman-proxy machine? The following makes me think it is, but why is it different from running dhcpd on Foreman itself?:

2025-07-25T12:35:16 eaa90284 [I] Started POST /dhcp/10.2.5.0
2025-07-25T12:35:17 eaa90284 [E] Omshell failed: omshell= > > > dhcpctl_connect: no more
omshell= > not connected.
omshell= > no open object.
omshell= > no open object.
omshell= > no open object.
omshell= > no open object.
omshell= > no open object.
omshell= > not connected.
omshell= >
2025-07-25T12:35:17 eaa90284 [E] Failed to add DHCP reservation for test.domain.com (10.255.25.243 / bc:24:11:bc:15:83): No response from DHCP server
2025-07-25T12:35:17 eaa90284 [W] Error details for Failed to add DHCP reservation for test.domain.com (10.2.5.243 / bc:24:11:bc:15:83): No response from DHCP server: <Proxy::DHCP::Error>: Failed to add DHCP reservation for test.domain.com (10.2.5.243 / bc:24:11:bc:15:83): No response from DHCP server

How did you install the external Foreman proxy?

In a nutshell:

  • Deployed Ubuntu manually
  • Add host to Foreman: Install the subscription manager (Atix), then register the host to Foreman.
  • Deploy certificates
  • Install Puppet (v8)
  • Install Foreman installer
  • Then install Foreman-proxy:
sudo foreman-installer --no-enable-foreman --no-enable-foreman-cli \
  --no-enable-puppet --no-enable-foreman-cli-puppet \
  --no-enable-foreman-plugin-puppet --foreman-proxy-puppet=false --foreman-proxy-puppetca=false \
  --enable-foreman-proxy \
  --foreman-proxy-ssl-ca                        "/etc/foreman-proxy/ssl_ca.pem" \
  --foreman-proxy-ssl-cert                      "/etc/foreman-proxy/$(hostname).pem" \
  --foreman-proxy-ssl-key                       "/etc/foreman-proxy/$(hostname).key" \
  --foreman-proxy-foreman-ssl-ca                "/etc/ipa/ca.crt" \
  --foreman-proxy-foreman-ssl-cert              "/etc/foreman-proxy/foreman_client.crt" \
  --foreman-proxy-foreman-ssl-key               "/etc/foreman-proxy/foreman_client.key" \
  --foreman-proxy-tftp=false \
  --foreman-proxy-dhcp=false \
  --foreman-proxy-register-in-foreman=true \
  --foreman-proxy-foreman-base-url              "https://foreman.domain.com" \
  --foreman-proxy-trusted-hosts                 "foreman.domain.com" \
  --foreman-proxy-trusted-hosts                 "$(hostname)" \
  --foreman-proxy-oauth-consumer-key            "********" \
  --foreman-proxy-oauth-consumer-secret         "********"
  • Disable puppet-agent sudo systemctl disable --now puppet. Foreman has Puppet installed only for the deployment of Foreman.
  • Enable TFTP
  • Enable DHCP
  • Installed lighttpd for local hosting of Ubuntu ISO files
  • Configured Foreman for installation media residing on the new Foreman-proxy

It turns out omshell on Debian (11), Ubuntu 20.04 and 22.04 is broken.

I added the omapi key to ISC and Foreman-proxy, just in case. This resolved the omshell errors reported, but things still didn’t work. Then I found these links about omshell:

Replacing the Ubuntu default version of omshell (v4.4.1) with v4.4.3 fixed the issue for me. I used the instructions from the last link (post 18 of the Launchpad bug report).

1 Like