Foreman-proxy Puppet faialure

Problem:

Running foreman-installer --puppet-server true --foreman-proxy-puppet true --puppet-server-ca true --foreman-proxy-puppetca true results in the following failure:

2023-01-31 08:28:38 [ERROR ] [configure] Proxy foreman.jonathandavidhall.com has failed to load one or more features (Puppet), check /var/log/foreman-proxy/proxy.log for configuration errors

2023-01-31 08:28:38 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman.jonathandavidhall.com]/features: change from [“DHCP”, “Dynflow”, “Logs”, “Pulpcore”, “Puppet CA”, “Script”, “TFTP”] to [“DHCP”, “Dynflow”, “Logs”, “Pulpcore”, “Puppet”, “Puppet CA”, “Script”, “TFTP”] failed: Proxy foreman.jonathandavidhall.com has failed to load one or more features (Puppet), check /var/log/foreman-proxy/proxy.log for configuration errors

Expected outcome:

Foreman and Proxy versions:

Foreman and Proxy plugin versions:
3.5.1-1

Distribution and version:

Rocky Linux 8.7 (using el8 packages)

Other relevant data:

No errors indicating in log even when running in full debug mode.

Unfortunately, I don’t know enough about puppet and how all of this is intertwined.

Foreman was installed with the katello scenario and puppet was added in later. However, I noticed the proxy was not running puppet so I re-ran the foreman-installer command with the above and the end result is the error failing to load puppet. Puppet CA is running, however.

I’m guessing Puppet must have worked at some point, as I see facts for the foreman node reported and indicating they were reported by Puppet…

Further information:

# rpm -qa | grep -i puppet
**puppet**7-release-7.0.0-11.el8.noarch
**puppet**-agent-7.21.0-1.el8.x86_64
**puppet**-agent-oauth-0.5.10-1.el8.noarch

To enable the puppet integration it’s best to follow the docs: Configuring Hosts Using Puppet

You really have to post the logs at the time it failed. Installer logs are in /var/log/foreman-installer/ and as the error tells: proxy logs to start with are in /var/log/foreman-proxy/proxy.log.

Appreciate the response. Indeed, I botched up during the setup and didn’t follow the guide correctly. But even after following it I still kept hitting issues with puppet getting a 500 back when trying to submit reports in. I finally tracked it down to this:

./puppetlabs/puppet/foreman.yaml::url: "https://foreman.example.com"

You neither post logs nor the exact command, thus it’s impossible to say anything. It’s also unclear what you mean by this:

Is there actually example.com mentioned or did you change it to hide the real domain name?

If there is actually https://foreman.example.com is it possible you copy&paste the smart proxy integration from the docs?

I thought you were on your main foreman server. You have to follow the instructions for the foreman server not for the smart proxy. The latter is only in case you want to run the puppet server and/or puppet ca on a separate server from the main foreman server…

Thank you for your help. I botched up and misunderstood when reading through the instructions. Given I’m running the foreman proxy on the foreman server, I assumed I had to follow the second step - but I also botched up and didn’t copy/paste the modified command with the fqdn change.

Now that I’ve followed the second set, do I need to unset the foreman url or does it matter? I have set it to the correct url and it’s now updating foreman.yaml with the correct url at this point, but this is the main foreman server.

foreman-installer always remembers any configuration passed on the command line in its answer file. To change something you have to pass it explicitly on the command line.

Use the first command from the docs for the foreman server and add the correct url argument to set it right or use --reset-puppet-server-foreman-url to reset it to the default, which should be the fqdn of the server.