<Array> ["Unsetting environment variable 'http_proxy' for the duration of the install."]

This internal server only can download via Proxy.
I set up the proxy. but it said 2024-10-21 15:54:34 [WARN ] [boot] [“Unsetting environment variable ‘http_proxy’ for the duration of the install.”]
and cannot download.

If I download it ‘dnf install foreman-service’ it works. I don’t know why…

[root@linuxrepo ~]# foreman-installer --scenario katello
2024-10-21 15:54:34 [WARN ] [boot] [“Unsetting environment variable ‘http_proxy’ for the duration of the install.”]
2024-10-21 15:54:34 [WARN ] [boot] [“Unsetting environment variable ‘https_proxy’ for the duration of the install.”]
2024-10-21 15:54:36 [NOTICE] [root] Loading installer configuration. This will take some time.
2024-10-21 15:54:41 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2024-10-21 15:54:41 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2024-10-21 15:54:46 [NOTICE] [configure] Starting system configuration.
2024-10-21 15:57:34 [ERROR ] [configure] Execution of ‘/bin/dnf -d 0 -e 1 -y install foreman-service’ returned 1: Error: Error downloading packages:
2024-10-21 15:57:34 [ERROR ] [configure] foreman-service-3.12.0-1.el8.noarch: Cannot download, all mirrors were already tried without success
2024-10-21 15:57:34 [ERROR ] [configure] /Stage[main]/Foreman::Install/Package[foreman-service]/ensure: change from ‘purged’ to ‘present’ failed: Execution of ‘/bin/dnf -d 0 -e 1 -y install foreman-service’ returned 1: Error: Error downloading packages:
2024-10-21 15:57:34 [ERROR ] [configure] foreman-service-3.12.0-1.el8.noarch: Cannot download, all mirrors were already tried without success

Unsetting proxy variables during installer runs was probably done to prevent other common errors people faced with those variables set.
Since you obviously need to use a proxy to access external repositories, I would recommend to either set the proxy globally in dnf.conf or set it on a per repository base in the repo files (depending on your setup and possible other, local repositories).

1 Like

Yepp, please set repository-proxy in dnf.conf

The problem with a “system wide” proxy (and why we unset it) is that this is then also used for when our installer tries to talk to the installed Foreman (and proxies) and that often fails via some “to the internet” proxy.