Moved foreman-proxy to new host, no longer able to create DNS record updates

I've migrated my DHCP server from CentOS 6.5 to RHEL 6.5. This host serves
as smarthost for DHCP and DNS.

Since the migration when I attempt to create a new host, the UI gives me an
error:

Create DNS record for test123.domainname.corp task failed with the
following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set DNS
entry ([RestClient::BadRequest]: 400 Bad Request) for proxy
https://dhcp02.domainname.corp:8443/dns

My DNS is provided by AD. I have tested manually if the keytab file and
kerberos configuration are correct by running nsupdate -g sucessfully.

Wondering if maybe one of the gem packages from EPEL didn't install
properly or might have a bug.

proxy.log: (see bold)

D, [2014-09-08T04:34:51.187694 #2168] DEBUG – : Added
test123.domainname.corp (10.0.9.
106 / 00:00:00:00:00:14) to 10.0.9.0/255.255.255.0
D, [2014-09-08T04:34:51.196262 #2168] DEBUG – : omshell: executed - set
name = "test1
23.domainname.corp"
D, [2014-09-08T04:34:51.196441 #2168] DEBUG – : true
D, [2014-09-08T04:34:51.196540 #2168] DEBUG – : omshell: executed - set
ip-address =
10.0.9.106
D, [2014-09-08T04:34:51.196599 #2168] DEBUG – : true
D, [2014-09-08T04:34:51.196702 #2168] DEBUG – : omshell: executed - set
hardware-addr
ess = 00:00:00:00:00:14
D, [2014-09-08T04:34:51.196764 #2168] DEBUG – : true
D, [2014-09-08T04:34:51.196846 #2168] DEBUG – : omshell: executed - set
hardware-type
= 1
D, [2014-09-08T04:34:51.196903 #2168] DEBUG – : true
D, [2014-09-08T04:34:51.197193 #2168] DEBUG – : omshell: executed - set
statements =
"filename = "pxelinux.0"; next-server = 0a:00:06:2a; option host-name =
"test123.mi
ovision.corp";"
D, [2014-09-08T04:34:51.197260 #2168] DEBUG – : true
D, [2014-09-08T04:34:51.197344 #2168] DEBUG – : omshell: executed - create
D, [2014-09-08T04:34:51.197400 #2168] DEBUG – : true
I, [2014-09-08T04:34:51.270450 #2168] INFO – : Added DHCP reservation for
test123.mi
ovision.corp (10.0.9.106 / 00:00:00:00:00:14)
E, [2014-09-08T04:34:51.373083 #2168] ERROR – : can't convert false into
String

D, [2014-09-08T04:34:51.373233 #2168] DEBUG – :
/usr/share/foreman-proxy/bin/…/lib/p
roxy/dns/nsupdate.rb:12:in exists?' /usr/share/foreman-proxy/bin/../lib/proxy/dns/nsupdate.rb:12:ininitialize'
/usr/share/foreman-proxy/bin/…/lib/proxy/dns/nsupdate_gss.rb:15:in
initialize' /usr/share/foreman-proxy/bin/../lib/dns_api.rb:19:innew'
/usr/share/foreman-proxy/bin/…/lib/dns_api.rb:19:in dns_setup' /usr/share/foreman-proxy/bin/../lib/dns_api.rb:42:inPOST /dns/'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:inroute'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in
instance_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:inroute_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:in route!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:incatch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in route!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:ineach'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in route!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:indispatch!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:in call!' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininstance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in invoke' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:incatch'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in invoke' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:411:incall!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:399:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/showexceptions.rb:24:in
call' /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/commonlogger.rb:33:incall'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:insynchronize'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:inservice'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:inrun'
/usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:instart'
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart'
/usr/lib/ruby/1.8/webrick/server.rb:92:in each' /usr/lib/ruby/1.8/webrick/server.rb:92:instart'
/usr/lib/ruby/1.8/webrick/server.rb:23:in start' /usr/lib/ruby/1.8/webrick/server.rb:82:instart'
/usr/lib/ruby/gems/1.8/gems/rack-1.5.2/lib/rack/handler/webrick.rb:14:in
run' /usr/share/foreman-proxy/bin/../lib/sinatra-patch.rb:42:inrun!'
/usr/share/foreman-proxy/bin/smart-proxy:44

Any help is appreciated.

> I've migrated my DHCP server from CentOS 6.5 to RHEL 6.5. This host
> serves as smarthost for DHCP and DNS.
>
> Since the migration when I attempt to create a new host, the UI gives me
> an error:
>
> Create DNS record for test123.domainname.corp task failed with the
> following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set
> DNS entry ([RestClient::BadRequest]: 400 Bad Request) for proxy
> https://dhcp02.domainname.corp:8443/dns
>
> My DNS is provided by AD. I have tested manually if the keytab file and
> kerberos configuration are correct by running nsupdate -g sucessfully.
>
> Wondering if maybe one of the gem packages from EPEL didn't install
> properly or might have a bug.
>
> proxy.log: (see bold)
>
[snip]
> E, [2014-09-08T04:34:51.373083 #2168] ERROR – : can't convert false
> into String

Try removing "dns_key" from /etc/foreman-proxy/settings.yml, then
"service foreman-proxy restart".

We recommended setting this as a workaround for a bug in 1.5.0, but I
didn't realise when fixing it properly that the workaround would then
cause an error - apologies.

··· On 08/09/14 09:42, steved0ca wrote:


Dominic Cleal
Red Hat Engineering

Yep, that was it.

Thanks for the quick response.

··· On Monday, 8 September 2014 01:48:33 UTC-7, Dominic Cleal wrote: > > On 08/09/14 09:42, steved0ca wrote: > > I've migrated my DHCP server from CentOS 6.5 to RHEL 6.5. This host > > serves as smarthost for DHCP and DNS. > > > > Since the migration when I attempt to create a new host, the UI gives me > > an error: > > > > Create DNS record for test123.domainname.corp task failed with the > > following error: ERF12-2357 [ProxyAPI::ProxyException]: Unable to set > > DNS entry ([RestClient::BadRequest]: 400 Bad Request) for proxy > > https://dhcp02.domainname.corp:8443/dns > > > > My DNS is provided by AD. I have tested manually if the keytab file and > > kerberos configuration are correct by running nsupdate -g sucessfully. > > > > Wondering if maybe one of the gem packages from EPEL didn't install > > properly or might have a bug. > > > > proxy.log: (see bold) > > > [snip] > > *E, [2014-09-08T04:34:51.373083 #2168] ERROR -- : can't convert false > > into String* > > Try removing "dns_key" from /etc/foreman-proxy/settings.yml, then > "service foreman-proxy restart". > > We recommended setting this as a workaround for a bug in 1.5.0, but I > didn't realise when fixing it properly that the workaround would then > cause an error - apologies. > > -- > Dominic Cleal > Red Hat Engineering >