"Unprocessable entity" during install

I'm trying to follow the "Setting up Foreman with external Puppet masters"
steps in section 3.2.3 of the manual. When I run the foreman-installer on
the "Standalone Puppet master" it fails with this error.

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[newpuppetmaster.example.com]/ensure:
> change from absent to present failed: Could not set 'present on ensure: 422
> Unprocessable Entity at
> /usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp:12

I found this
<https://groups.google.com/forum/#!topic/foreman-users/rDny__fZKeE>thread
which gives some hints but wasn't able to get past the issue. The first
reply suggests that there is already a smart-proxy registered registered.
But when I look in the Foreman dashboard (Infrastructure > Smart Proxies) I
only see the Foreman server itself. The last reply has a link to a
troubleshooting guide
<Troubleshooting - Foreman>,
but specifying the name to register doesn't help (same error). I'd prefer
to figure out why the Foreman server thinks the name is already registered
rather than disabling the registration.

Just found this in the /var/lib/foreman/production log, I believe it is
from the first time I ran the foreman-installer on the standalone
puppetmaster.

Started POST "/api/smart_proxies" for 34.35.76.196 at 2014-07-02 16:10:03

··· >> -0500 > > Processing by Api::V2::SmartProxiesController#create as JSON > > Parameters: {"smart_proxy"=>{"name"=>"newpuppetmaster.example..com", >> "url"=>"https://newpuppetmaster.example.com:8443"}, "apiv"=>"v2"} > > Authorized user admin(Admin User) > > Unprocessable entity SmartProxy (id: new): > > Unable to communicate with the proxy: ERF12-2530 >> [ProxyAPI::ProxyException]: Unable to detect features >> ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read >> server session ticket A: tlsv1 alert un...) for proxy >> https://newpuppetmaster.example..com:8443/features > > Please check the proxy is configured and running on the host. > > >> Rendered api/v2/errors/unprocessable_entity.json.rabl within >> api/v2/layouts/error_layout (1.9ms) > > Completed 422 Unprocessable Entity in 149ms (Views: 44.7ms | ActiveRecord: >> 1.5ms) > > >

On Thursday, July 3, 2014 11:12:53 AM UTC-5, Justin Georgeson wrote:

I’m trying to follow the "Setting up Foreman with external Puppet masters"
steps in section 3.2.3 of the manual. When I run the foreman-installer on
the “Standalone Puppet master” it fails with this error.

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[

newpuppetmaster.example.com]/ensure: change from absent to present
failed: Could not set 'present on ensure: 422 Unprocessable Entity at
/usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp:12

I found this
https://groups.google.com/forum/#!topic/foreman-users/rDny__fZKeEthread
which gives some hints but wasn’t able to get past the issue. The first
reply suggests that there is already a smart-proxy registered registered.
But when I look in the Foreman dashboard (Infrastructure > Smart Proxies) I
only see the Foreman server itself. The last reply has a link to a
troubleshooting guide
http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#Unprocessable-Entity-error-during-installation,
but specifying the name to register doesn’t help (same error). I’d prefer
to figure out why the Foreman server thinks the name is already registered
rather than disabling the registration.

Running 'curl -k https://newpuppetmaster.example.com:8443/features' on the
server returns a page titled "DHCP Web interface" and lists "puppet" as a
supported feature so I know that foreman-proxy is listening.

··· On Thursday, July 3, 2014 11:35:06 AM UTC-5, Justin Georgeson wrote: > > Just found this in the /var/lib/foreman/production log, I believe it is > from the first time I ran the foreman-installer on the standalone > puppetmaster. > > Started POST "/api/smart_proxies" for 34.35.76.196 at 2014-07-02 16:10:03 >>> -0500 >> >> Processing by Api::V2::SmartProxiesController#create as JSON >> >> Parameters: {"smart_proxy"=>{"name"=>"newpuppetmaster.example..com", >>> "url"=>"https://newpuppetmaster.example.com:8443"}, "apiv"=>"v2"} >> >> Authorized user admin(Admin User) >> >> Unprocessable entity SmartProxy (id: new): >> >> Unable to communicate with the proxy: ERF12-2530 >>> [ProxyAPI::ProxyException]: Unable to detect features >>> ([OpenSSL::SSL::SSLError]: SSL_connect returned=1 errno=0 state=SSLv3 read >>> server session ticket A: tlsv1 alert un...) for proxy >>> https://newpuppetmaster.example..com:8443/features >> >> Please check the proxy is configured and running on the host. >> >> >>> Rendered api/v2/errors/unprocessable_entity.json.rabl within >>> api/v2/layouts/error_layout (1.9ms) >> >> Completed 422 Unprocessable Entity in 149ms (Views: 44.7ms | >>> ActiveRecord: 1.5ms) >> >> >> > > On Thursday, July 3, 2014 11:12:53 AM UTC-5, Justin Georgeson wrote: >> >> I'm trying to follow the "Setting up Foreman with external Puppet >> masters" steps in section 3.2.3 of the manual. When I run the >> foreman-installer on the "Standalone Puppet master" it fails with this >> error. >> >> /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ >>> newpuppetmaster.example.com]/ensure: change from absent to present >>> failed: Could not set 'present on ensure: 422 Unprocessable Entity at >>> /usr/share/foreman-installer/modules/foreman_proxy/manifests/register.pp:12 >> >> >> >> I found this >> thread >> which gives some hints but wasn't able to get past the issue. The first >> reply suggests that there is already a smart-proxy registered registered. >> But when I look in the Foreman dashboard (Infrastructure > Smart Proxies) I >> only see the Foreman server itself. The last reply has a link to a >> troubleshooting guide >> , >> but specifying the name to register doesn't help (same error). I'd prefer >> to figure out why the Foreman server thinks the name is already registered >> rather than disabling the registration. >> >> >>

Hi Justin,

Unless you've typo'ed that in changing the domain for posting, you
have an invalid fqdn in your error output:

… or proxy https://newpuppetmaster.example…com:8443/features …

note the 2 dots before "com"

I did indeed typo it while sanitizing. :frowning:

I've since run the install with the registration disabled, having found
where to add proxies in the web UI. But that is failing with the same
message. I currently believe it's saying the CA is unknown to the
standalone puppetmaster, even though I copied
/var/lib/puppet/ssl/certs/ca.pem from the foreman server to newpuppetmaster.

··· On Friday, July 4, 2014 7:09:29 AM UTC-5, Greg Sutcliffe wrote: > > Hi Justin, > > Unless you've typo'ed that in changing the domain for posting, you > have an invalid fqdn in your error output: > > ... or proxy https://newpuppetmaster.example..com:8443/features ... > > note the 2 dots before "com" >

Did you ever find a solution, I'm running into a similar issue.

STEVE

··· On Monday, July 7, 2014 at 11:21:27 AM UTC-4, Justin Georgeson wrote: > > I did indeed typo it while sanitizing. :( > > I've since run the install with the registration disabled, having found > where to add proxies in the web UI. But that is failing with the same > message. I currently believe it's saying the CA is unknown to the > standalone puppetmaster, even though I copied > /var/lib/puppet/ssl/certs/ca.pem from the foreman server to newpuppetmaster. > > On Friday, July 4, 2014 7:09:29 AM UTC-5, Greg Sutcliffe wrote: >> >> Hi Justin, >> >> Unless you've typo'ed that in changing the domain for posting, you >> have an invalid fqdn in your error output: >> >> ... or proxy https://newpuppetmaster.example..com:8443/features ... >> >> note the 2 dots before "com" >> >