使用 ms-dhcp/dns 智能代理进行配置时,Foreman 出现错误

使用 ms-dhcp/dns 智能代理进行配置时,Foreman 出现错误

我正在运行 foreman,并在运行 ad/dhcp/dns 的 win2k12 r2 机器上使用智能代理。

当我尝试配置智能代理时将其转储到日志中:

Changed the current scope context to 192.168.20.0 scope.

The specified option does not exist.

E, [2014-09-11T19:31:03.050843 #6068] ERROR -- : Unknown error while processing ''
E, [2014-09-11T19:34:20.342416 #6068] ERROR -- : Netsh failed:


Changed the current scope context to 192.168.20.0 scope.

The specified option does not exist.

E, [2014-09-11T19:34:20.342416 #6068] ERROR -- : Unknown error while processing ''

foreman 网页界面显示

Create DHCP Settings for testbox2.devita.co task failed with the following error: ERF12-6899     [ProxyAPI::ProxyException]: Unable to set DHCP entry ([RestClient::BadRequest]: 400 Bad Request) for proxy https://win1.devita.co:8443/dhcp

智能代理标准输出如下所示:

92.168.20.105 - - [11/Sep/2014 19:30:44] "GET /dhcp/192.168.20.0/unused_ip?from
192.168.20.100&to=192.168.20.200 HTTP/1.1" 200 23 1.4821
oreman.devita.co - - [11/Sep/2014:19:30:42 US Mountain Standard Time] "GET /dhc
/192.168.20.0/unused_ip?from=192.168.20.100&to=192.168.20.200 HTTP/1.1" 200 23
 -> /dhcp/192.168.20.0/unused_ip?from=192.168.20.100&to=192.168.20.200
92.168.20.105 - - [11/Sep/2014 19:31:03] "POST /dhcp/192.168.20.0 HTTP/1.1" 400
33 1.0671
oreman.devita.co - - [11/Sep/2014:19:31:01 US Mountain Standard Time] "POST /dh
p/192.168.20.0 HTTP/1.1" 400 33
 -> /dhcp/192.168.20.0
he system cannot find the path specified.
92.168.20.105 - - [11/Sep/2014 19:32:33] "GET /dhcp/192.168.20.0/unused_ip?from
192.168.20.100&to=192.168.20.200 HTTP/1.1" 200 23 1.4941
oreman.devita.co - - [11/Sep/2014:19:32:32 US Mountain Standard Time] "GET /dhc
/192.168.20.0/unused_ip?from=192.168.20.100&to=192.168.20.200 HTTP/1.1" 200 23
 -> /dhcp/192.168.20.0/unused_ip?from=192.168.20.100&to=192.168.20.200
he system cannot find the path specified.
92.168.20.105 - - [11/Sep/2014 19:34:00] "GET /dhcp/192.168.20.0/unused_ip?from
192.168.20.100&to=192.168.20.200 HTTP/1.1" 200 23 1.5431
oreman.devita.co - - [11/Sep/2014:19:33:59 US Mountain Standard Time] "GET /dhc
/192.168.20.0/unused_ip?from=192.168.20.100&to=192.168.20.200 HTTP/1.1" 200 23
 -> /dhcp/192.168.20.0/unused_ip?from=192.168.20.100&to=192.168.20.200
92.168.20.105 - - [11/Sep/2014 19:34:20] "POST /dhcp/192.168.20.0 HTTP/1.1" 400
33 0.9841

答案1

这看起来像错误 #5995,这似乎是我们添加了一个 DHCP 选项,但部分/所有 (?) Active Directory 服务器似乎都拒绝了。在我们恢复它之前,我很想了解更多相关信息,欢迎提出任何想法。

要修复此问题,您需要编辑智能代理代码并恢复改变这就引发了问题。

在 Foreman 1.4 或 1.5 上,编辑/usr/share/foreman-proxy/lib/proxy/dhcp.rb并注释掉代码 => 60 行:

# :PXEClient             => {:code => 60, :kind => "String"    }, # Needs to be empty for foreman to function

如果您使用的是 Foreman 1.6,则现在会出现相同的行/usr/share/foreman-proxy/modules/dhcp/dhcp.rb

相关内容