Cannot install foreman-proxy

Problem: cannot install foreman-proxy

**Expected outcome: install foreman-proxy to serve as foreman proxy for remote puppet Client that doesnt have direct access (Tcp-8140) to register to main foreman

**Foreman and Proxy versions:foreman-proxy-3.1.1

Foreman and Proxy plugin versions:

**Distribution and version:Redhat 7.9

Other relevant data:

Hello and welcome @yanivf

The information here is too sparse for anyone to understand what might have gone wrong.
Can you provide us with information about what you have done.

Is this your first time installing Foreman?
Did you follow a guide?
Where did you get stuck?
What errors did you experience?

Do you have Foreman installed? Have you recently upgraded from an earlier version or is it a fresh install?

The more information we have, the more chance we have to help.

All the best,

Melanie

HI , i have successfully installed Foreman+foreman-proxy on 1 machines without any issues
using the follwing guide Foreman :: Manual (CentOS Linux release 7.9.2009)

since i am not permitted to allow all my puppet clients communicate directly to my puppetmaster that have foreman-proxy-install ,
i need to install a dedicated foreman-proxy for each customer , all clients (Linux 100%) will register to foreman-proxy that will be installed on each customer env , and customer foreman-proxy will ā€œreportā€ to main puppetmaster .
i was trying to install foreman-proxy using the foreman-installler flags .
using this guide Installing an External Smart Proxy Server 3.1

[root@foreman-proxylab1 ~]# rpm -qa |grep foreman
foreman-debug-3.1.1-1.el7.noarch
foreman-3.1.1-1.el7.noarch
foreman-release-3.1.1-1.el7.noarch
foreman-installer-3.1.1-1.el7.noarch
tfm-rubygem-foreman_puppet-2.0.0-1.fm3_1.el7.noarch

but when i run

foreman-installer
ā€“no-enable-foreman
ā€“no-enable-foreman-cli
ā€“enable-puppet
ā€“puppet-server-ca=false
ā€“puppet-server-foreman-url=https://my-puppetmaster.domain.com
ā€“enable-foreman-proxy
ā€“foreman-proxy-puppetca=false
ā€“foreman-proxy-tftp=false
ā€“foreman-proxy-foreman-base-url=https://my-puppetmaster.domain.com
ā€“foreman-proxy-trusted-hosts=my-puppetmaster.domain.com
ā€“foreman-proxy-oauth-consumer-key=my-key
ā€“foreman-proxy-oauth-consumer-secret=my-secret

i get

2022-02-01 14:12:45 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-02-01 14:12:48 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-02-01 14:12:48 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2022-02-01 14:12:50 [NOTICE] [configure] Starting system configuration.
2022-02-01 14:12:54 [ERROR ] [configure] Evaluation Error: Error while evaluating a Resource Statement, Foreman::Plugin[puppet]:
2022-02-01 14:12:54 [ERROR ] [configure] parameter ā€˜versionā€™ expects a String value, got Undef
2022-02-01 14:12:54 [ERROR ] [configure] parameter ā€˜config_file_groupā€™ expects a String value, got Undef (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin/puppet.pp, line: 6) on node foreman-proxylab1.harmanota.com
2022-02-01 14:12:54 [NOTICE] [configure] System configuration has finished.

There were errors detected during install.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/foreman.log

@yanivf in your command you have ā€“enable-foreman-proxy that command does not exist, the command you need to run is: --enable-foreman-plugin-puppet I found this bug yesterday and should have update the Documentation and opened a bug about it. Please test and verify.

1 Like

get the same error even after replacing the commands
-enable-foreman-plugin-puppet instead of --enable-foreman-proxy

2022-02-01 14:31:24 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-02-01 14:31:28 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-02-01 14:31:28 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2022-02-01 14:31:30 [NOTICE] [configure] Starting system configuration.
2022-02-01 14:31:34 [ERROR ] [configure] Evaluation Error: Error while evaluating a Resource Statement, Foreman::Plugin[puppet]:
2022-02-01 14:31:34 [ERROR ] [configure] parameter ā€˜versionā€™ expects a String value, got Undef
2022-02-01 14:31:34 [ERROR ] [configure] parameter ā€˜config_file_groupā€™ expects a String value, got Undef (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin/puppet.pp

i have tried this on Centos7 / RedHat 7.9 and Redhat 8.2

Latest update :->>>>>

[root@foreman-proxylab1 ~]# foreman-installer --no-enable-foreman --no-enable-foreman-plugin-puppet --no-enable-foreman-cli --no-enable-foreman-cli-puppet --enable-puppet --puppet-server-ca=false --puppet-server-foreman-url=https://puppetmaster.qqqq.com --enable-foreman-proxy --foreman-proxy-puppetca=false --foreman-proxy-foreman-base-url=https://puppetmaster.qqqq.com --foreman-proxy-trusted-hosts=puppetmaster.qqqq.com --foreman-proxy-oauth-consumer-key=Ujs4tXDdasdsaXbhUKuG2f --foreman-proxy-oauth-consumer-secret=oZanPrYo3YLcasdascafgqdfLBrzsf9pL5L7d
2022-02-01 16:21:08 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-02-01 16:21:12 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-02-01 16:21:12 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2022-02-01 16:21:14 [NOTICE] [configure] Starting system configuration.
2022-02-01 16:21:20 [NOTICE] [configure] 250 configuration steps out of 660 steps complete.
2022-02-01 16:21:20 [NOTICE] [configure] 500 configuration steps out of 660 steps complete.
2022-02-01 16:22:21 [ERROR ] [configure] Error making POST request to Foreman at https://puppetmaster.harmanota.com/api/v2/smart_proxies: Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://foreman-proxylab1.qqqq.com:8443/v2/features Please check the proxy is configured and running on the host.
2022-02-01 16:22:21 [ERROR ] [configure] /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foreman-proxylab1.qqqq.com]/ensure: change from ā€˜absentā€™ to ā€˜presentā€™ failed: Error making POST request to Foreman at https://puppetmaster.qqqq.com/api/v2/smart_proxies: Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::Exceptions::OpenTimeout]: Timed out connecting to server) for proxy https://foreman-proxylab1.qqqqq:8443/v2/features Please check the proxy is configured and running on the host.
2022-02-01 16:22:22 [NOTICE] [configure] System configuration has finished.

There were errors detected during install.
Please address the errors and re-run the installer to ensure the system is properly configured.
Failing to do so is likely to result in broken functionality.

The full log is at /var/log/foreman-installer/foreman.log

Did you enable the foreman-proxy firewall rules on your proxy?
firewall-cmd --add-service RH-Satellite-6-capsule

1 Like

can someone please point me to the right documentation for installing foreman-proxy to serve as
registrar of linux puppet client in the same cusatomer env were the proxy will be installed ,
the foreman-proxy will report to main foreman server , and i am stuck with my first external foreman-proxy install for the last 5 days ā€¦

thank you

i use this guide Foreman :: Manual

I used this document the other day and it worked for me
https://theforeman.org/manuals/3.1/index.html#3.2.3InstallationScenarios

need to flags used for installing foreman-proxy only

the 1000000% Question

These are the flags I used to setup a foreman-proxy as a puppet master:

foreman-installer \
  --no-enable-foreman \
  --no-enable-foreman-plugin-puppet \
  --no-enable-foreman-cli \
  --no-enable-foreman-cli-puppet \
  --enable-puppet \
  --puppet-server-ca=false \
  --puppet-server-foreman-url=https://foreman.example.com \
  --enable-foreman-proxy \
  --foreman-proxy-puppetca=false \
  --foreman-proxy-foreman-base-url=https://foreman.example.com \
  --foreman-proxy-trusted-hosts=foreman.example.com \
  --foreman-proxy-oauth-consumer-key=<key here> \
  --foreman-proxy-oauth-consumer-secret=<secret here>