Hi guys, I'm trying to deploy my first host with foreman, but I'm getting 
this error:

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

I think I've tried everything (I've googled the same issue) and clearly I'm 
missing something. Any help will be appreciated.




*OS: CentOS Linux release 7.3.1611 (Core)PACKAGES:*
foreman.noarch                       1.15.3-1.el7            
@foreman           
foreman-cli.noarch                   1.15.3-1.el7            
@foreman           
foreman-debug.noarch                 1.15.3-1.el7            
@foreman           
foreman-installer.noarch             1:1.15.3-1.el7          
@foreman           
foreman-postgresql.noarch            1.15.3-1.el7            
@foreman           
foreman-proxy.noarch                 1.15.3-1.el7            
@foreman           
foreman-release.noarch               1.15.3-1.el7            
@foreman           
foreman-release-scl.noarch           3-1.el7                 
@foreman           
foreman-selinux.noarch               1.15.3-1.el7            
@foreman           









*PROXY-LOG (IP adresses and hostnames were changed)*

D, [2017-08-11T09:31:41.986957 ] DEBUG -- : accept: 192.168.10.77:47446
D, [2017-08-11T09:31:41.988884 ] DEBUG -- : Rack::Handler::WEBrick is 
invoked.
D, [2017-08-11T09:31:41.989857 ] DEBUG -- : verifying remote client 
192.168.10.77 against trusted_hosts ["foreman.test.com"]
I, [2017-08-11T09:31:41.990393 ]  INFO -- : 192.168.10.77 - - 
[11/Aug/2017:09:31:41 +0200] "GET /tftp/serverName HTTP/1.1" 200 17 0.0008

D, [2017-08-11T09:31:42.031099 ] DEBUG -- : close: 192.168.10.77:47446
D, [2017-08-11T09:31:42.080941 ] DEBUG -- : accept: 192.168.10.77:47448
D, [2017-08-11T09:31:42.082416 ] DEBUG -- : Rack::Handler::WEBrick is 
invoked.
D, [2017-08-11T09:31:42.083040 ] DEBUG -- : verifying remote client 
192.168.10.77 against trusted_hosts ["foreman.test.com"]
E, [2017-08-11T09:31:42.083463 ] ERROR -- : No DHCP record for MAC 
192.168.0.0/00:50:56:ba:c7:7f found
D, [2017-08-11T09:31:42.083501 ] DEBUG -- : No DHCP record for MAC 
192.168.0.0/00:50:56:ba:c7:7f found
I, [2017-08-11T09:31:42.083741 ]  INFO -- : 10.129.49.85 - - 
[11/Aug/2017:09:31:42 +0200] "GET /dhcp/192.168.0.0/mac/00:50:56:ba:c7:7f 
HTTP/1.1" 404 57 0.0008

D, [2017-08-11T09:31:42.125161 ] DEBUG -- : close: 10.129.49.85:47448
D, [2017-08-11T09:31:42.153213 ] DEBUG -- : accept: 10.129.49.85:47450
D, [2017-08-11T09:31:42.155696 ] DEBUG -- : Rack::Handler::WEBrick is 
invoked.
D, [2017-08-11T09:31:42.156719 ] DEBUG -- : verifying remote client 
192.168.10.77 against trusted_hosts ["foreman.test.com"]
E, [2017-08-11T09:31:42.157367 ] ERROR -- : No DHCP records for IP 
192.168.0.0/192.168.0.235 found
D, [2017-08-11T09:31:42.157458 ] DEBUG -- : No DHCP records for IP 
192.168.0.0/192.168.0.235 found
I, [2017-08-11T09:31:42.157826 ]  INFO -- : 192.168.10.77 - - 
[11/Aug/2017:09:31:42 +0200] "GET /dhcp/192.168.0.0/ip/192.168.0.235 
HTTP/1.1" 404 52 0.0012

D, [2017-08-11T09:31:42.199129 ] DEBUG -- : close: 192.168.10.77:47450
D, [2017-08-11T09:31:43.591566 ] DEBUG -- : accept: 192.168.10.77:47456
D, [2017-08-11T09:31:43.593712 ] DEBUG -- : Rack::Handler::WEBrick is 
invoked.
D, [2017-08-11T09:31:43.594789 ] DEBUG -- : verifying remote client 
192.168.10.77 against trusted_hosts ["foreman.test.com"]
I, [2017-08-11T09:31:43.595470 ]  INFO -- : 192.168.10.77 - - 
[11/Aug/2017:09:31:43 +0200] "GET /tftp/serverName HTTP/1.1" 200 17 0.0009

D, [2017-08-11T09:31:43.636936 ] DEBUG -- : close: 192.168.10.77:47456
D, [2017-08-11T09:31:43.680521 ] DEBUG -- : accept: 192.168.10.77:47458
D, [2017-08-11T09:31:43.682684 ] DEBUG -- : Rack::Handler::WEBrick is 
invoked.
D, [2017-08-11T09:31:43.684217 ] DEBUG -- : verifying remote client 
192.168.10.77 against trusted_hosts ["foreman.test.com"]
D, [2017-08-11T09:31:43.689003 ] DEBUG -- : omshell: executed - set name = 
"test.host.com"
D, [2017-08-11T09:31:43.689106 ] DEBUG -- : nil
D, [2017-08-11T09:31:43.689160 ] DEBUG -- : omshell: executed - set 
ip-address = 192.168.0.235
D, [2017-08-11T09:31:43.689194 ] DEBUG -- : nil
D, [2017-08-11T09:31:43.689238 ] DEBUG -- : omshell: executed - set 
hardware-address = 00:50:56:ba:84:83
D, [2017-08-11T09:31:43.689269 ] DEBUG -- : nil
D, [2017-08-11T09:31:43.689303 ] DEBUG -- : omshell: executed - set 
hardware-type = 1
D, [2017-08-11T09:31:43.689330 ] DEBUG -- : nil
D, [2017-08-11T09:31:43.689506 ] DEBUG -- : omshell: executed - set 
statements = "filename = \"pxelinux.0\"; next-server = 5b:d8:a8:4d; option 
host-name = \"test.host.com\";"
D, [2017-08-11T09:31:43.689553 ] DEBUG -- : nil
D, [2017-08-11T09:31:43.689592 ] DEBUG -- : omshell: executed - create
D, [2017-08-11T09:31:43.689621 ] DEBUG -- : nil
E, [2017-08-11T09:31:43.732670 ] ERROR -- : Omshell failed:
> > > obj: <null>
, > obj: host
, > obj: host
, name = "test.host.com"
, > obj: host
, name = "test.host.com"
, ip-address = 0a:c4:00:eb
, > obj: host
, name = "test.host.com"
, ip-address = 0a:c4:00:eb
, hardware-address = 00:50:56:ba:84:83
, > obj: host
, name = "test.host.com"
, ip-address = 0a:c4:00:eb
, hardware-address = 00:50:56:ba:84:83
, hardware-type = 1
, > obj: host
, name = "test.host.com"
, ip-address = 0a:c4:00:eb
, hardware-address = 00:50:56:ba:84:83
, hardware-type = 1
, statements = "filename = "pxelinux.0"; next-server = 5b:d8:a8:4d; option 
host-name = "test.host.com";"
, > can't open object: no key specified
, obj: host
, name = "test.host.com"
, ip-address = 0a:c4:00:eb
, hardware-address = 00:50:56:ba:84:83
, hardware-type = 1
, statements = "filename = "pxelinux.0"; next-server = 5b:d8:a8:4d; option 
host-name = "test.host.com";"
, > 
E, [2017-08-11T09:31:43.733422 ] ERROR -- : Failed to add DHCP reservation 
for testing.host.com (192.168.0.235 / 00:50:56:ba:84:83)
D, [2017-08-11T09:31:43.733472 ] DEBUG -- : Failed to add DHCP reservation 
for testing.host.com (192.168.0.235 / 00:50:56:ba:84:83) 
(Proxy::DHCP::Error)
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:97:in 
`report'
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:80:in 
`om_disconnect'
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:54:in 
`om_add_record'
/usr/share/foreman-proxy/modules/dhcp_common/isc/omapi_provider.rb:30:in 
`add_record'
/usr/share/foreman-proxy/modules/dhcp/dhcp_api.rb:96:in `block in 
<class:DhcpApi>'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1611:in `block in 
compile!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `[]'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (3 
levels) in route!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:994:in `route_eval'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:975:in `block (2 
levels) in route!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1015:in `block in 
process_route'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in `catch'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1013:in 
`process_route'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:973:in `block in 
route!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `each'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:972:in `route!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1085:in `block in 
dispatch!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in 
invoke'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1082:in `dispatch!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `block in 
call!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `block in 
invoke'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `catch'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1067:in `invoke'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:907:in `call!'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:895:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:219:in `call'
/usr/share/foreman-proxy/lib/proxy/log.rb:109:in `call'
/usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:9:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in
 
`call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in
 
`call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in
 
`call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in 
`call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in 
`call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in
 
`call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/show_exceptions.rb:25:in 
`call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:182:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:2013:in `call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `block in 
call'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1787:in `synchronize'
/usr/share/gems/gems/sinatra-1.4.8/lib/sinatra/base.rb:1487:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
/usr/share/ruby/webrick/httpserver.rb:138:in `service'
/usr/share/ruby/webrick/httpserver.rb:94:in `run'
/usr/share/ruby/webrick/server.rb:295:in `block in start_thread'
I, [2017-08-11T09:31:43.733941 ]  INFO -- : 192.168.10.77 - - 
[11/Aug/2017:09:31:43 +0200] "POST /dhcp/192.168.0.0 HTTP/1.1" 400 89 0.0502

D, [2017-08-11T09:31:43.775232 ] DEBUG -- : close: 192.168.10.77:47458




*DHCPD CONFIG:*

omapi-port 7911;
key omapi_key {
  algorithm HMAC-MD5;
  secret "secret";
};
omapi-key omapi_key;




ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.201 192.168.0.254;
    filename "/pxelinux.0";
    next-server 192.168.0.200;
}



log-facility local7;






*PROXY SETTINGS:*:settings_directory: /etc/foreman-proxy/settings.d
:ssl_ca_file: /etc/puppetlabs/puppet/ssl/certs/ca.pem
:ssl_certificate: /etc/puppetlabs/puppet/ssl/certs/foreman.test.com.pem
:ssl_private_key: 
/etc/puppetlabs/puppet/ssl/private_keys/foreman.test.com.pem
:trusted_hosts:
- foreman.test.com
:foreman_url: https://foreman.test.com
:api_url: http://foreman.test.com:9191
:daemon: true
:bind_host: '*'
:https_port: 8443
:log_file: /var/log/foreman-proxy/proxy.log
:log_level: DEBUG
:log_buffer: 2000
:log_buffer_errors: 1000






*PROXY DHCP SETTING:**dhcp.yml*

:enabled: https
:use_provider: dhcp_isc
:server: 127.0.0.1
:subnets:
 - 192.168.0.201/255.255.255.0
 - 192.168.0.254/255.255.255.0




*dhcp_isc.yml*:config: /etc/dhcp/dhcpd.conf
:leases: /var/lib/dhcpd/dhcpd.leases
:key_name: omapi_key
:key_value: secret

:omapi_port: 7911



-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to