Problem:
Curl error timeout when provisioning
Foreman and Proxy versions:
Foreman 3.1.2
Distribution and version:
RHEL 8.5
Other relevant data:
Greetings yet again,
I’m at the moment working into provisioning Debian 11 into remote hosts. Long story short, curl is not using the http_proxy, failing the with timeout, which makes sense. Down below is the relevant proxy.log:
2022-03-09T11:33:25 85812bbc [I] Started POST /tftp/PXELinux/00:0c:29:b2:e5:4c
2022-03-09T11:33:25 85812bbc [I] Finished POST /tftp/PXELinux/00:0c:29:b2:e5:4c with 200 (3.82 ms)
2022-03-09T11:33:25 85812bbc [I] Started POST /tftp/PXEGrub2/00:0c:29:b2:e5:4c
2022-03-09T11:33:25 85812bbc [I] Finished POST /tftp/PXEGrub2/00:0c:29:b2:e5:4c with 200 (2.81 ms)
2022-03-09T11:33:25 85812bbc [I] Started POST /tftp/iPXE/00:0c:29:b2:e5:4c
2022-03-09T11:33:25 85812bbc [I] Finished POST /tftp/iPXE/00:0c:29:b2:e5:4c with 200 (2.05 ms)
2022-03-09T11:33:25 85812bbc [I] Started POST /tftp/fetch_boot_file
2022-03-09T11:33:25 85812bbc [I] Finished POST /tftp/fetch_boot_file with 200 (4.4 ms)
2022-03-09T11:33:25 85812bbc [I] [181847] Started task /usr/bin/curl\ --silent\ --show-error\ --connect-timeout\ 10\ --retry\ 3\ --retry-delay\ 10\ --max-time\ 3600\ --remote-time\ --time-cond\ /var/lib/tftpboot/boot/debian-mirror-2SWNytzhr9B6-linux\ --write-out\ Task\ done,\ result:\ \%\{http_code\},\ size\ downloaded:\ \%\{size_download\}b,\ speed:\ \%\{speed_download\}b/s,\ time:\ \%\{time_total\}ms\ --output\ /var/lib/tftpboot/boot/debian-mirror-2SWNytzhr9B6-linux\ --location\ http://ftp.debian.org/debian/dists/bullseye/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux
2022-03-09T11:33:25 85812bbc [I] Started POST /tftp/fetch_boot_file
2022-03-09T11:33:25 85812bbc [I] Finished POST /tftp/fetch_boot_file with 200 (1.9 ms)
2022-03-09T11:33:25 85812bbc [I] [181851] Started task /usr/bin/curl\ --silent\ --show-error\ --connect-timeout\ 10\ --retry\ 3\ --retry-delay\ 10\ --max-time\ 3600\ --remote-time\ --time-cond\ /var/lib/tftpboot/boot/debian-mirror-2SWNytzhr9B6-initrd.gz\ --write-out\ Task\ done,\ result:\ \%\{http_code\},\ size\ downloaded:\ \%\{size_download\}b,\ speed:\ \%\{speed_download\}b/s,\ time:\ \%\{time_total\}ms\ --output\ /var/lib/tftpboot/boot/debian-mirror-2SWNytzhr9B6-initrd.gz\ --location\ http://ftp.debian.org/debian/dists/bullseye/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz
(...)
2022-03-09T11:34:35 85812bbc [W] [181847] curl: (28) Connection timed out after 10000 milliseconds
2022-03-09T11:34:35 85812bbc [W] [181851] curl: (28) Connection timed out after 10000 milliseconds
Now, yes it needs to be defined, and I did so in Administer > Settings > General > HTTP(S) proxy and also in Content > Default HTTP proxy(of course I had created the HTTP Proxy entry in Infrastructure > HTTP Proxies).
It’s mentioned throughout in the user interface itself that “System-wide proxies must be configured at the operating system level”, however, when I set it on /etc/environment, it doesn’t seem to pick up(but it does work on user terminal). While looking up here in the forum, I’ve found this answer that says to add the variable on /etc/sysconfig/dynflowd, but such file doesn’t exist in my Foreman instance, and even so I’d question whether would be the correct file. I’m afraid I also had no luck looking in the documentation either, but I could have overlooked precisely what I needed.
So finally, after telling you my dilemma and life story, I’d just like to know where the variable http_proxy should added in order to have this to work.