Unable to create host via Foreman UI

Hi,

I am trying to create a host via the foreman UI. But i am getting the
following error:

Reverse DNS record for test2.domain.local task failed with the
following error 400 Bad request

  • /tmp/proxy.log shows

E, [2011-12-09T15:23:23.433289 #7477] ERROR – : Address family not
supported by protocol - connect(2)
D, [2011-12-09T15:23:23.433547 #7477] DEBUG – : /usr/lib/ruby/1.8/
resolv-replace.rb:32:in original_resolv_connect' /usr/lib/ruby/1.8/resolv-replace.rb:32:inconnect'
/usr/lib/ruby/1.8/resolv.rb:724:in initialize' /usr/lib/ruby/1.8/resolv.rb:508:innew'
/usr/lib/ruby/1.8/resolv.rb:508:in make_requester' /usr/lib/ruby/1.8/resolv.rb:478:ineach_resource'
/usr/lib/ruby/1.8/resolv.rb:431:in each_name' /usr/lib/ruby/1.8/resolv.rb:397:ingetname'
/usr/share/foreman-proxy/bin/…/lib/proxy/dns/bind.rb:92:in dns_find' /usr/share/foreman-proxy/bin/../lib/proxy/dns/bind.rb:30:increate'
/usr/share/foreman-proxy/bin/…/lib/dns_api.rb:14:in POST /dns/' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:incall'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in
route' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:ininstance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in
route_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:inroute!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in
catch' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:inroute!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in
each' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:inroute!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in
dispatch!' /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:566:in
instance_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininvoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in
catch' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininvoke'
/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:399:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:
24:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb: 24:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in
call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:incall'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in
synchronize' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:
13:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb: 48: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.1.0/lib/rack/handler/webrick.rb:
14:in run' /usr/share/foreman-proxy/bin/../lib/sinatra-patch.rb:32:inrun!'
/usr/share/foreman-proxy/bin/smart-proxy:102

  • production.log shows

Processing HostsController#create (for 192.168.122.1 at 2011-12-09
15:25:46) [POST]
Parameters: {"commit"=>"Submit", "action"=>"create",
"authenticity_token"=>"FlPQ1ceE17GU9q7GbTBMBFWoEcRx1tItLpPs5nqjE+k=",
"controller"=>"hosts", "host"=>{"comment"=>"", "architecture_id"=>"1",
"subnet_id"=>"1", "managed"=>"true", "puppetproxy_id"=>"",
"name"=>"test2", "sp_mac"=>"", "puppetmaster_name"=>"puppet",
"sp_name"=>"", "mac"=>"00:16:3e:3f:07:9d", "domain_id"=>"1",
"enabled"=>"1", "root_pass"=>"[FILTERED]", "build"=>"1",
"medium_id"=>"1", "hostgroup_id"=>"1", "ptable_id"=>"1",
"sp_subnet_id"=>"", "ip"=>"192.168.122.41", "environment_id"=>"1",
"model_id"=>"", "disk"=>"", "sp_ip"=>"", "puppetclass_ids"=>[""],
"operatingsystem_id"=>"1"}}
Add DNS PTR record for test2.domain.local/192.168.122.41
Reverse DNS record for test2.domain.local task failed with the
following error: 400 Bad Request
Rolling back due to a problem: Reverse DNS record for
test2.domain.local 3 failed test2.domain.localset_dns_ptr_record
Failed to save: Reverse DNS record for test2.domain.local task failed
with the following error: 400 Bad Request
Rendering template within layouts/application
Rendering hosts/new
Completed in 260ms (View: 57, DB: 80) | 200 OK [http://192.168.122.21/
hosts]

  • I can update hosts via nsupdate manually from the command line and
    it works fine.

> server foreman.domain.local
> key foreman "long key"
> zone domain.local
> update add test.domain.local. 600 IN A 192.168.122.40
> send
> zone 122.168.192.in-addr.arpa
> update add 40.122.168.192.in-addr.arpa 600 IN PTR domain.domain.local.
> send

Could someone let me know if anything is missing ?

Regards,
Kevin

Hi,

i rechecked the configuration for the above and still facing the same
issues. Has anyone encountered the above issue in foreman?

Regards,
Kevin

··· On Dec 9, 3:34 pm, linuxbsdfreak wrote: > Hi, > > I am trying to create a host via the foreman UI. But i am getting the > following error: > > Reverse DNS record for test2.domain.local task failed with the > following error 400 Bad request > > - /tmp/proxy.log shows > > E, [2011-12-09T15:23:23.433289 #7477] ERROR -- : Address family not > supported by protocol - connect(2) > D, [2011-12-09T15:23:23.433547 #7477] DEBUG -- : /usr/lib/ruby/1.8/ > resolv-replace.rb:32:in `original_resolv_connect' > /usr/lib/ruby/1.8/resolv-replace.rb:32:in `connect' > /usr/lib/ruby/1.8/resolv.rb:724:in `initialize' > /usr/lib/ruby/1.8/resolv.rb:508:in `new' > /usr/lib/ruby/1.8/resolv.rb:508:in `make_requester' > /usr/lib/ruby/1.8/resolv.rb:478:in `each_resource' > /usr/lib/ruby/1.8/resolv.rb:431:in `each_name' > /usr/lib/ruby/1.8/resolv.rb:397:in `getname' > /usr/share/foreman-proxy/bin/../lib/proxy/dns/bind.rb:92:in `dns_find' > /usr/share/foreman-proxy/bin/../lib/proxy/dns/bind.rb:30:in `create' > /usr/share/foreman-proxy/bin/../lib/dns_api.rb:14:in `POST /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:in > `route' > /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:in > `route_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:in > `catch' > /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:in > `each' > /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:in > `dispatch!' > /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:in > `instance_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:in > `catch' > /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:in > `call!' > /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.1.0/lib/rack/methodoverride.rb: > 24:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb: > 24:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in > `call' > /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:in > `synchronize' > /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.1.0/lib/rack/content_length.rb: > 13:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb: > 48:in `service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' > /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' > /usr/lib/ruby/1.8/webrick/server.rb:162:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' > /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:92:in `each' > /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' > /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' > /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb: > 14:in `run' > /usr/share/foreman-proxy/bin/../lib/sinatra-patch.rb:32:in `run!' > /usr/share/foreman-proxy/bin/smart-proxy:102 > > - production.log shows > > Processing HostsController#create (for 192.168.122.1 at 2011-12-09 > 15:25:46) [POST] > Parameters: {"commit"=>"Submit", "action"=>"create", > "authenticity_token"=>"FlPQ1ceE17GU9q7GbTBMBFWoEcRx1tItLpPs5nqjE+k=", > "controller"=>"hosts", "host"=>{"comment"=>"", "architecture_id"=>"1", > "subnet_id"=>"1", "managed"=>"true", "puppetproxy_id"=>"", > "name"=>"test2", "sp_mac"=>"", "puppetmaster_name"=>"puppet", > "sp_name"=>"", "mac"=>"00:16:3e:3f:07:9d", "domain_id"=>"1", > "enabled"=>"1", "root_pass"=>"[FILTERED]", "build"=>"1", > "medium_id"=>"1", "hostgroup_id"=>"1", "ptable_id"=>"1", > "sp_subnet_id"=>"", "ip"=>"192.168.122.41", "environment_id"=>"1", > "model_id"=>"", "disk"=>"", "sp_ip"=>"", "puppetclass_ids"=>[""], > "operatingsystem_id"=>"1"}} > Add DNS PTR record for test2.domain.local/192.168.122.41 > Reverse DNS record for test2.domain.local task failed with the > following error: 400 Bad Request > Rolling back due to a problem: Reverse DNS record for > test2.domain.local 3 failed test2.domain.localset_dns_ptr_record > Failed to save: Reverse DNS record for test2.domain.local task failed > with the following error: 400 Bad Request > Rendering template within layouts/application > Rendering hosts/new > Completed in 260ms (View: 57, DB: 80) | 200 OK [http://192.168.122.21/ > hosts] > > - I can update hosts via nsupdate manually from the command line and > it works fine. > > > server foreman.domain.local > > key foreman "long key" > > zone domain.local > > update add test.domain.local. 600 IN A 192.168.122.40 > > send > > zone 122.168.192.in-addr.arpa > > update add 40.122.168.192.in-addr.arpa 600 IN PTR domain.domain.local. > > send > > Could someone let me know if anything is missing ? > > Regards, > Kevin

I am facing the same issue, unfortunately I have not found a
solution for it. I can update DNS manually without issues, so not
sure. Using latest Foremand and Smart-Proxy running on Ruby Enterprise
Edition version 1.8.7-2011.03 under CentOS 6.1. Also, is there anyway
to easily trigger the DNS update of all servers managed by Foreman? I
have servers running under Foreman before I added the DNS server
management.

··· On Dec 15, 9:28 am, linuxbsdfreak wrote: > Hi, > > i rechecked the configuration for the above and still facing the same > issues. Has anyone encountered the above issue in foreman? >

Paul did apply a few patches that hopefully solve this problem (or at least
the generic 400 error).

Can you try to reproduce using Foreman 0.4.1 ?

Thanks,
Ohad

··· On Tue, Dec 27, 2011 at 11:27 PM, dmaraio wrote:

On Dec 15, 9:28 am, linuxbsdfreak linuxbsdfr...@gmail.com wrote:

Hi,

i rechecked the configuration for the above and still facing the same
issues. Has anyone encountered the above issue in foreman?

I am facing the same issue, unfortunately I have not found a
solution for it. I can update DNS manually without issues, so not
sure. Using latest Foremand and Smart-Proxy running on Ruby Enterprise
Edition version 1.8.7-2011.03 under CentOS 6.1. Also, is there anyway
to easily trigger the DNS update of all servers managed by Foreman? I
have servers running under Foreman before I added the DNS server
management.

I pulled latest sources from git for Foreman and Smart-Proxy but that
did not resolve the issue.

After some digging around I found this is caused by resolving
localhost (in settings.yml) to the IPV6 loopback and some sort of
protocol mismatch. I updated my smart-proxy settings to point to the
external interface of the server (ipv4) rather than localhost, and now
it is working correctly.

— SIGCHLD (Child exited) @ 0 (0) —
connect(6, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
connect(6, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
connect(6, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("8.8.8.8")}, 16) = 0
Process 2227 attached
[pid 16052] connect(18, {sa_family=AF_INET6, sin6_port=htons(53),
inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0,
sin6_scope_id=0}, 28) = -1 EAFNOSUPPORT (Address family not supported
by protocol)

> I pulled latest sources from git for Foreman and Smart-Proxy but that
> did not resolve the issue.
>
> After some digging around I found this is caused by resolving
> localhost (in settings.yml) to the IPV6 loopback and some sort of
> protocol mismatch. I updated my smart-proxy settings to point to the
> external interface of the server (ipv4) rather than localhost, and now
> it is working correctly.
>

Good catch, would you mind adding a ticket for that? I assume that trace is
for the proxy, if so, please open it under the proxy project.

Thanks!
Ohad

··· On Thu, Dec 29, 2011 at 5:41 PM, dmaraio wrote:

— SIGCHLD (Child exited) @ 0 (0) —
connect(6, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr(“8.8.8.8”)}, 16) = 0
connect(6, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr(“8.8.8.8”)}, 16) = 0
connect(6, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr(“8.8.8.8”)}, 16) = 0
Process 2227 attached
[pid 16052] connect(18, {sa_family=AF_INET6, sin6_port=htons(53),
inet_pton(AF_INET6, “::1”, &sin6_addr), sin6_flowinfo=0,
sin6_scope_id=0}, 28) = -1 EAFNOSUPPORT (Address family not supported
by protocol)


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To post to this group, send email to foreman-users@googlegroups.com.
To unsubscribe from this group, send email to
foreman-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/foreman-users?hl=en.

Hi,

I still get the error after commenting out #::1 localhost
localhost.localdomain localhost6 localhost6.localdomain6 in /etc/hosts

Reverse DNS record for test.domain.com task failed with the following
error: Connection refused - recvfrom(2).

What has to be changed in settings.yaml for foreman-proxy as per the
above post.

Following is the proxy.log

E, [2012-02-15T17:12:42.595685 #4828] ERROR – : Connection refused -
recvfrom(2)
D, [2012-02-15T17:12:42.595835 #4828] DEBUG – : /usr/lib/ruby/1.8/
resolv.rb:728:in recv' /usr/lib/ruby/1.8/resolv.rb:728:inrecv_reply'
/usr/lib/ruby/1.8/resolv.rb:624:in request' /usr/lib/ruby/1.8/resolv.rb:489:ineach_resource'
/usr/lib/ruby/1.8/resolv.rb:971:in resolv' /usr/lib/ruby/1.8/resolv.rb:969:ineach'
/usr/lib/ruby/1.8/resolv.rb:969:in resolv' /usr/lib/ruby/1.8/resolv.rb:968:ineach'
/usr/lib/ruby/1.8/resolv.rb:968:in resolv' /usr/lib/ruby/1.8/resolv.rb:966:ineach'
/usr/lib/ruby/1.8/resolv.rb:966:in resolv' /usr/lib/ruby/1.8/resolv.rb:481:ineach_resource'
/usr/lib/ruby/1.8/resolv.rb:431:in each_name' /usr/lib/ruby/1.8/resolv.rb:397:ingetname'
/usr/share/foreman-proxy/bin/…/lib/proxy/dns/bind.rb:89:in dns_find' /usr/share/foreman-proxy/bin/../lib/proxy/dns/bind.rb:30:increate'
/usr/share/foreman-proxy/bin/…/lib/dns_api.rb:14:in POST /dns/' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:incall'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:863:in
route' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:ininstance_eval'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:521:in
route_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:500:inroute!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:in
catch' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:497:inroute!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:in
each' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:476:inroute!'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:601:in
dispatch!' /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:566:in
instance_eval' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininvoke'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:in
catch' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:566:ininvoke'
/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:399:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/methodoverride.rb:
24:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb: 24:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in
call' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:incall'
/usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:1005:in
synchronize' /usr/lib/ruby/gems/1.8/gems/sinatra-1.0/lib/sinatra/base.rb:979:incall'
/usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/content_length.rb:
13:in call' /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb: 48:inservice'
/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'

Regards,
Kevin

··· On Dec 29 2011, 4:43 pm, Ohad Levy wrote: > On Thu, Dec 29, 2011 at 5:41 PM, dmaraio wrote: > > I pulled latest sources from git for Foreman and Smart-Proxy but that > > did not resolve the issue. > > > After some digging around I found this is caused by resolving > > localhost (in settings.yml) to the IPV6 loopback and some sort of > > protocol mismatch. I updated my smart-proxy settings to point to the > > external interface of the server (ipv4) rather than localhost, and now > > it is working correctly. > > Good catch, would you mind adding a ticket for that? I assume that trace is > for the proxy, if so, please open it under the proxy project. > > Thanks! > Ohad > > > > > > > > > > > --- SIGCHLD (Child exited) @ 0 (0) --- > > connect(6, {sa_family=AF_INET, sin_port=htons(53), > > sin_addr=inet_addr("8.8.8.8")}, 16) = 0 > > connect(6, {sa_family=AF_INET, sin_port=htons(53), > > sin_addr=inet_addr("8.8.8.8")}, 16) = 0 > > connect(6, {sa_family=AF_INET, sin_port=htons(53), > > sin_addr=inet_addr("8.8.8.8")}, 16) = 0 > > Process 2227 attached > > [pid 16052] connect(18, {sa_family=AF_INET6, sin6_port=htons(53), > > inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, > > sin6_scope_id=0}, 28) = -1 EAFNOSUPPORT (Address family not supported > > by protocol) > > > -- > > You received this message because you are subscribed to the Google Groups > > "Foreman users" group. > > To post to this group, send email to foreman-users@googlegroups.com. > > To unsubscribe from this group, send email to > > foreman-users+unsubscribe@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/foreman-users?hl=en.

Hi,

Please ignore it. I got it resolved.

Regards,
kevin

··· On Feb 15, 6:16 pm, linuxbsdfreak wrote: > Hi, > > I still get the error after commenting out #::1 localhost > localhost.localdomain localhost6 localhost6.localdomain6 in /etc/hosts > > Reverse DNS record for test.domain.com task failed with the following > error: Connection refused - recvfrom(2). > > What has to be changed in settings.yaml for foreman-proxy as per the > above post. > > Following is the proxy.log > > E, [2012-02-15T17:12:42.595685 #4828] ERROR -- : Connection refused - > recvfrom(2) > D, [2012-02-15T17:12:42.595835 #4828] DEBUG -- : /usr/lib/ruby/1.8/ > resolv.rb:728:in `recv' > /usr/lib/ruby/1.8/resolv.rb:728:in `recv_reply' > /usr/lib/ruby/1.8/resolv.rb:624:in `request' > /usr/lib/ruby/1.8/resolv.rb:489:in `each_resource' > /usr/lib/ruby/1.8/resolv.rb:971:in `resolv' > /usr/lib/ruby/1.8/resolv.rb:969:in `each' > /usr/lib/ruby/1.8/resolv.rb:969:in `resolv' > /usr/lib/ruby/1.8/resolv.rb:968:in `each' > /usr/lib/ruby/1.8/resolv.rb:968:in `resolv' > /usr/lib/ruby/1.8/resolv.rb:966:in `each' > /usr/lib/ruby/1.8/resolv.rb:966:in `resolv' > /usr/lib/ruby/1.8/resolv.rb:481:in `each_resource' > /usr/lib/ruby/1.8/resolv.rb:431:in `each_name' > /usr/lib/ruby/1.8/resolv.rb:397:in `getname' > /usr/share/foreman-proxy/bin/../lib/proxy/dns/bind.rb:89:in `dns_find' > /usr/share/foreman-proxy/bin/../lib/proxy/dns/bind.rb:30:in `create' > /usr/share/foreman-proxy/bin/../lib/dns_api.rb:14:in `POST /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:in > `route' > /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:in > `route_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:in > `catch' > /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:in > `each' > /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:in > `dispatch!' > /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:in > `instance_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:in > `catch' > /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:in > `call!' > /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.1.0/lib/rack/methodoverride.rb: > 24:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/showexceptions.rb: > 24:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/commonlogger.rb:18:in > `call' > /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:in > `synchronize' > /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.1.0/lib/rack/content_length.rb: > 13:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/handler/webrick.rb: > 48:in `service' > /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' > > Regards, > Kevin > > On Dec 29 2011, 4:43 pm, Ohad Levy wrote: > > > > > > > > > On Thu, Dec 29, 2011 at 5:41 PM, dmaraio wrote: > > > I pulled latest sources from git for Foreman and Smart-Proxy but that > > > did not resolve the issue. > > > > After some digging around I found this is caused by resolving > > > localhost (in settings.yml) to the IPV6 loopback and some sort of > > > protocol mismatch. I updated my smart-proxy settings to point to the > > > external interface of the server (ipv4) rather than localhost, and now > > > it is working correctly. > > > Good catch, would you mind adding a ticket for that? I assume that trace is > > for the proxy, if so, please open it under the proxy project. > > > Thanks! > > Ohad > > > > --- SIGCHLD (Child exited) @ 0 (0) --- > > > connect(6, {sa_family=AF_INET, sin_port=htons(53), > > > sin_addr=inet_addr("8.8.8.8")}, 16) = 0 > > > connect(6, {sa_family=AF_INET, sin_port=htons(53), > > > sin_addr=inet_addr("8.8.8.8")}, 16) = 0 > > > connect(6, {sa_family=AF_INET, sin_port=htons(53), > > > sin_addr=inet_addr("8.8.8.8")}, 16) = 0 > > > Process 2227 attached > > > [pid 16052] connect(18, {sa_family=AF_INET6, sin6_port=htons(53), > > > inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, > > > sin6_scope_id=0}, 28) = -1 EAFNOSUPPORT (Address family not supported > > > by protocol) > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Foreman users" group. > > > To post to this group, send email to foreman-users@googlegroups.com. > > > To unsubscribe from this group, send email to > > > foreman-users+unsubscribe@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/foreman-users?hl=en.