0

我正在尝试在新安装的 Ubuntu 14.04 上获得工头主设置。我遇到的安装问题没有产生任何可搜索的结果(或者我不知道正确的词)。

在运行工头安装程序之前,我确保 'ping $(hostname -f)' 得到的是我的 IP 地址,而不是 127.0.1.1。

安装程序完成后,我留下了这个错误(机器名称已编辑):

Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[abc.xyz.com]/ensure: change from absent to present failed: Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[abc.xyz.com]: Failed to call refresh: missing param 'id' in parameters
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[abc.xyz.com]: missing param 'id' in parameters

从 /var/log/foreman-installer/foreman-installer.log (机器名称已编辑):

[DEBUG 2014-12-09 16:01:31 main]  Puppet::Type::Foreman_smartproxy::ProviderRest: feature foreman_api is missing
[ INFO 2014-12-09 16:01:59 main] E, [2014-12-09T16:01:59.627479 #3981] ERROR -- : 422 Unprocessable Entity
[ INFO 2014-12-09 16:01:59 main] {
[ INFO 2014-12-09 16:01:59 main]     "error"[0;37m => [0m{
[ INFO 2014-12-09 16:01:59 main]                    "id"[0;37m => [0m[1;31mnil[0m,
[ INFO 2014-12-09 16:01:59 main]                "errors"[0;37m => [0m{
[ INFO 2014-12-09 16:01:59 main]             "base"[0;37m => [0m[
[ INFO 2014-12-09 16:01:59 main]                 [1;37m[0] [0m[0;33m"Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::RequestTimeout]: Request Timeout) for proxy https://abc.xyz.com:8443/features"[0m,
[ INFO 2014-12-09 16:01:59 main]                 [1;37m[1] [0m[0;33m"Please check the proxy is configured and running on the host."[0m
[ INFO 2014-12-09 16:01:59 main]             ]
[ INFO 2014-12-09 16:01:59 main]         },
[ INFO 2014-12-09 16:01:59 main]         "full_messages"[0;37m => [0m[
[ INFO 2014-12-09 16:01:59 main]             [1;37m[0] [0m[0;33m"Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::RequestTimeout]: Request Timeout) for proxy https://abc.xyz.com:8443/features"[0m,
[ INFO 2014-12-09 16:01:59 main]             [1;37m[1] [0m[0;33m"Please check the proxy is configured and running on the host."[0m
[ INFO 2014-12-09 16:01:59 main]         ]
[ INFO 2014-12-09 16:01:59 main]     }
[ INFO 2014-12-09 16:01:59 main] }
[ERROR 2014-12-09 16:01:59 main]  Could not set 'present' on ensure: 422 Unprocessable Entity at 12:/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp

鉴于错误的性质,我尝试使用 Web UI 重新创建智能代理。在那里,我遇到了这个错误(机器名称已编辑):

Unable to communicate with the proxy: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::RequestTimeout]: Request Timeout) for proxy https://abc.xyz.com:8443/features
Please check the proxy is configured and running on the host.

最后,我再次检查了代理是否正在运行:

service foreman-proxy status
 * foreman-proxy is running

防火墙已关闭,并且 apt-get upgrade 已运行。除此之外,它应该是一个非常标准的 Ubuntu 14.04 安装。

有没有人遇到过这个错误?还有其他故障排除技巧可以尝试吗?

谢谢!

4

2 回答 2

2

我有相同的设置和相同的结果。刚刚重新安装了 Foreman 1.6 没有这个问题。Foreman_smartproxy register.pp 在 1.6 和 1.7 之间没有变化,但显然有些变化。

感谢 irc 频道#theforman 上的 Dominic,解决方案似乎是更改设置:

Adminster > Settings > General 并检查 proxy_request_timeout 设置为 60

重新运行安装程序

PS我也将idle_timeout更改为60

于 2014-12-10T10:49:50.597 回答
0

我可以确认。Foreman 1.7 默认带有奇怪的设置。我更改了 Adminster > Settings > General 并检查 proxy_request_timeout 设置为 60,即使没有重新运行安装程序,我也能够添加新代理。

非常感谢!

于 2014-12-10T16:21:50.317 回答