Not able to get an ip from ms_dhcp, proxy throughs some errors

hey there, using 1.9x and ms_dhcp and im getting the following error when
trying to use ip auto suggest.

D, [2015-12-14T19:41:43.072715 #3536] DEBUG – : verifying remote client
192.168.10.100 against trusted_hosts ["phxlv-cfg01.vm.slan.devita.co"]
D, [2015-12-14T19:41:43.072715 #3536] DEBUG – : Loading subnets for
127.0.0.1
D, [2015-12-14T19:41:43.072715 #3536] DEBUG – : executing:
C:\Windows\system32\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server
127.0.0.1 show scope
I, [2015-12-14T19:41:43.119588 #3536] INFO – : Enumerated the scopes on
127.0.0.1
D, [2015-12-14T19:41:43.119588 #3536] DEBUG – : Added
192.168.10.0/255.255.255.0 to 127.0.0.1
D, [2015-12-14T19:41:43.119588 #3536] DEBUG – : trying to find an ip
address, we got {:from=>"192.168.10.100", :to=>"192.168.10.150", :mac=>nil}
D, [2015-12-14T19:41:43.119588 #3536] DEBUG – : Loading subnet data for
192.168.10.0/255.255.255.0
D, [2015-12-14T19:41:43.119588 #3536] DEBUG – : executing:
C:\Windows\system32\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server
127.0.0.1 scope 192.168.10.0 show reservedip
I, [2015-12-14T19:41:43.150839 #3536] INFO – : Enumerated hosts on
192.168.10.0
D, [2015-12-14T19:41:43.150839 #3536] DEBUG – : executing:
C:\Windows\system32\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server
127.0.0.1 scope 192.168.10.0 Show ReservedOptionValue 192.168.10.106
I, [2015-12-14T19:41:43.197714 #3536] INFO – : Queried 192.168.10.106
options
D, [2015-12-14T19:41:43.197714 #3536] DEBUG – : found option nextServer
D, [2015-12-14T19:41:43.197714 #3536] DEBUG – : found option filename
D, [2015-12-14T19:41:43.197714 #3536] DEBUG – : found option install_path
D, [2015-12-14T19:41:43.197714 #3536] DEBUG – :
{:nextServer=>"192.168.10.100", :filename=>"pxelinux.0",
:install_path=>"testbox.vm.slan.devita.co"}
D, [2015-12-14T19:41:43.197714 #3536] DEBUG – :
{:subnet=>192.168.10.0/255.255.255.0, :ip=>"192.168.10.106",
:mac=>"00:50:56:9e:52:88", :nextServer=>"192.168.10.100",
:filename=>"pxelinux.0", :install_path=>"testbox.vm.slan.devita.co"}
D, [2015-12-14T19:41:43.197714 #3536] DEBUG – : Added 192.168.10.106 /
00:50:56:9e:52:88 to 192.168.10.0/255.255.255.0
D, [2015-12-14T19:41:43.197714 #3536] DEBUG – : Lazy loaded
192.168.10.0/255.255.255.0 records
D, [2015-12-14T19:42:13.198371 #3536] DEBUG – : execution expired
E, [2015-12-14T19:42:13.198371 #3536] ERROR – : undefined method reopen' for nil:NilClassD, [2015-12-14T19:42:13.198371 #3536] DEBUG -- : C:/smart-proxy-1.9.3/modules/dhcp/subnet.rb:137:inwrite_index_and_unlock'
C:/smart-proxy-1.9.3/modules/dhcp/subnet.rb:178:in unused_ip' C:/smart-proxy-1.9.3/modules/dhcp/dhcp_api.rb:75:inblock in
<class:DhcpApi>'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:inblock in compile!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in
[]&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:inblock (3 levels) in route!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:993:in
route_eval&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:inblock (2 levels) in route!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1014:in
block in process_route&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:incatch'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in
process_route&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:972:inblock in route!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:in
each&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:inroute!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1084:in
block in dispatch!&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:inblock in invoke'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in
catch&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:ininvoke'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1081:in
dispatch!&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:inblock in call!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in
block in invoke&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:incatch'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in
invoke&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:incall!'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:894:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/commonlogger.rb:33:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:218:incall'
C:/smart-proxy-1.9.3/lib/proxy/log.rb:35:in call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/nulllogger.rb:9:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/head.rb:11:in call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/show_exceptions.rb:21:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:181:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:2021:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in
block in call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1795:insynchronize'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/builder.rb:138:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:65:in
block in call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:50:ineach'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in
call&#39; C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/builder.rb:138:incall'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/handler/webrick.rb:60:in
service&#39; C:/Ruby193/lib/ruby/1.9.1/webrick/httpserver.rb:138:inservice'
C:/Ruby193/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run&#39; C:/Ruby193/lib/ruby/1.9.1/webrick/server.rb:191:inblock in start_thread'
192.168.10.100 - - [14/Dec/2015 19:42:13] "GET
/dhcp/192.168.10.0/unused_ip?from=192.168.10.100&to=192.168.10.150
HTTP/1.1" 400 42 30.1257

I would suggest testing this against 1.10 or HEAD, and filing a bug
report (here: Issues - Smart Proxy - Foreman)
if the issue persists.

Cheers,
-d

··· On Tue, Dec 15, 2015 at 3:45 AM, Mike DeVita wrote: > hey there, using 1.9x and ms_dhcp and im getting the following error when > trying to use ip auto suggest. > > D, [2015-12-14T19:41:43.072715 #3536] DEBUG -- : verifying remote client > 192.168.10.100 against trusted_hosts ["phxlv-cfg01.vm.slan.devita.co"] > D, [2015-12-14T19:41:43.072715 #3536] DEBUG -- : Loading subnets for > 127.0.0.1 > D, [2015-12-14T19:41:43.072715 #3536] DEBUG -- : executing: > C:\Windows\system32\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server > 127.0.0.1 show scope > I, [2015-12-14T19:41:43.119588 #3536] INFO -- : Enumerated the scopes on > 127.0.0.1 > D, [2015-12-14T19:41:43.119588 #3536] DEBUG -- : Added > 192.168.10.0/255.255.255.0 to 127.0.0.1 > D, [2015-12-14T19:41:43.119588 #3536] DEBUG -- : trying to find an ip > address, we got {:from=>"192.168.10.100", :to=>"192.168.10.150", :mac=>nil} > D, [2015-12-14T19:41:43.119588 #3536] DEBUG -- : Loading subnet data for > 192.168.10.0/255.255.255.0 > D, [2015-12-14T19:41:43.119588 #3536] DEBUG -- : executing: > C:\Windows\system32\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server > 127.0.0.1 scope 192.168.10.0 show reservedip > I, [2015-12-14T19:41:43.150839 #3536] INFO -- : Enumerated hosts on > 192.168.10.0 > D, [2015-12-14T19:41:43.150839 #3536] DEBUG -- : executing: > C:\Windows\system32\cmd.exe /c c:\Windows\System32\netsh.exe -c dhcp server > 127.0.0.1 scope 192.168.10.0 Show ReservedOptionValue 192.168.10.106 > I, [2015-12-14T19:41:43.197714 #3536] INFO -- : Queried 192.168.10.106 > options > D, [2015-12-14T19:41:43.197714 #3536] DEBUG -- : found option nextServer > D, [2015-12-14T19:41:43.197714 #3536] DEBUG -- : found option filename > D, [2015-12-14T19:41:43.197714 #3536] DEBUG -- : found option install_path > D, [2015-12-14T19:41:43.197714 #3536] DEBUG -- : > {:nextServer=>"192.168.10.100", :filename=>"pxelinux.0", > :install_path=>"testbox.vm.slan.devita.co"} > D, [2015-12-14T19:41:43.197714 #3536] DEBUG -- : > {:subnet=>192.168.10.0/255.255.255.0, :ip=>"192.168.10.106", > :mac=>"00:50:56:9e:52:88", :nextServer=>"192.168.10.100", > :filename=>"pxelinux.0", :install_path=>"testbox.vm.slan.devita.co"} > D, [2015-12-14T19:41:43.197714 #3536] DEBUG -- : Added 192.168.10.106 / > 00:50:56:9e:52:88 to 192.168.10.0/255.255.255.0 > D, [2015-12-14T19:41:43.197714 #3536] DEBUG -- : Lazy loaded > 192.168.10.0/255.255.255.0 records > D, [2015-12-14T19:42:13.198371 #3536] DEBUG -- : execution expired > E, [2015-12-14T19:42:13.198371 #3536] ERROR -- : undefined method `reopen' > for nil:NilClassD, [2015-12-14T19:42:13.198371 #3536] DEBUG -- : > C:/smart-proxy-1.9.3/modules/dhcp/subnet.rb:137:in `write_index_and_unlock' > C:/smart-proxy-1.9.3/modules/dhcp/subnet.rb:178:in `unused_ip' > C:/smart-proxy-1.9.3/modules/dhcp/dhcp_api.rb:75:in `block in > ' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1610:in > `block in compile!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in > `[]' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in > `block (3 levels) in route!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:993:in > `route_eval' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:974:in > `block (2 levels) in route!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1014:in > `block in process_route' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in > `catch' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1012:in > `process_route' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:972:in > `block in route!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:in > `each' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:971:in > `route!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1084:in > `block in dispatch!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in > `block in invoke' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in > `catch' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in > `invoke' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1081:in > `dispatch!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in > `block in call!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in > `block in invoke' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in > `catch' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1066:in > `invoke' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:906:in > `call!' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:894:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/commonlogger.rb:33:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:218:in > `call' > C:/smart-proxy-1.9.3/lib/proxy/log.rb:35:in `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/nulllogger.rb:9:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/head.rb:11:in `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/show_exceptions.rb:21:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:181:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:2021:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in > `block in call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1795:in > `synchronize' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1486:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/builder.rb:138:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:65:in > `block in call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in > `each' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/builder.rb:138:in > `call' > C:/Ruby193/lib/ruby/gems/1.9.1/gems/rack-1.5.5/lib/rack/handler/webrick.rb:60:in > `service' > C:/Ruby193/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service' > C:/Ruby193/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run' > C:/Ruby193/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread' > 192.168.10.100 - - [14/Dec/2015 19:42:13] "GET > /dhcp/192.168.10.0/unused_ip?from=192.168.10.100&to=192.168.10.150 HTTP/1.1" > 400 42 30.1257 > > -- > You received this message because you are subscribed to the Google Groups > "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-dev+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/d/optout.