Hi!
Konstantin, is your problem that you are unable to safe a remote new
smart-proxy from Puppet/Foreman server? Because my local one (on Puppet)
works fine.
Claude, I don't think Puppet server has clients private keys. I can find
only requests and signed certificates on my Puppet server. I think private
keys are generated and saved only on clients. Please correct me if I'm
wrong.
So my question for Konstantin: what directory you copy cert/private key
from client? Do you point to this directory in Foreman proxy settings file?
Claude, did you install you foreman-proxy with foreman installer? I used a
rpm package. foreman-proxy-1.7.1-1.el6.noarch
I tried to restart foreman proxy many times on my DNS server, it didn't
help. The problem is definitely related with my installation on DNS server,
because I cannot successfully test it with curl even from localhost (my DNS
server).
I don't have any errors in my proxy.log file on both machines.
My DNS server:
W, [2015-01-15T08:51:01.885364 #4180] WARN – : Couldn't find settings
file /etc/foreman-proxy/settings.d/foreman_proxy.yml. Using default
settings.
I, [2015-01-15T08:51:01.886431 #4180] INFO – : 'foreman_proxy' settings
were initialized with default values: :enabled: true
I, [2015-01-15T08:51:01.894369 #4180] INFO – : 'facts' module is
disabled.
I, [2015-01-15T08:51:01.902487 #4180] INFO – : 'templates' module is
disabled.
I, [2015-01-15T08:51:01.903152 #4180] INFO – : 'tftp' module is
disabled.
I, [2015-01-15T08:51:01.903619 #4180] INFO – : 'dhcp' module is
disabled.
I, [2015-01-15T08:51:01.904281 #4180] INFO – : 'puppetca' module is
disabled.
I, [2015-01-15T08:51:01.905342 #4180] INFO – : 'puppet' module is
disabled.
I, [2015-01-15T08:51:01.905923 #4180] INFO – : 'bmc' module is disabled.
I, [2015-01-15T08:51:01.906660 #4180] INFO – : 'realm' module is
disabled.
My Puppet server:
I, [2015-01-15T08:43:21.601876 #11151] INFO – : 'foreman_proxy' settings
were initialized with default values: :enabled: true
I, [2015-01-15T08:43:21.685245 #11151] INFO – : 'facts' module is
disabled.
I, [2015-01-15T08:43:21.705146 #11151] INFO – : 'templates' module is
disabled.
I, [2015-01-15T08:43:21.752811 #11151] INFO – : 'dhcp' settings were
initialized with default values: :dhcp_provider: isc
I, [2015-01-15T08:43:24.446693 #11151] INFO – : 'puppet' settings were
initialized with default values: :puppetdir: /etc/puppet
I, [2015-01-15T08:43:24.652776 #11151] INFO – : 'realm' module is
disabled.
Only errors which I can see:
on my DNS server when I start foreman-proxy in foreground mode and try to
safe proxy on my Puppet server:
[2015-01-15 08:51:42] ERROR OpenSSL::SSL::SSLError:
SSL_CTX_use_PrivateKey:: key values mismatch
/usr/lib/ruby/1.8/openssl/ssl-internal.rb:172:in `initialize'
on my Puppet server in foreman/production.log file:
Unable to communicate with the proxy: ERF12-2530
[ProxyAPI::ProxyException]: Unable to detect features
([OpenSSL::SSL::SSLError]: SSL_connect SYSCALL returned=5 errno=0
state=SSLv2/v3 read server hello A) for proxy
https://ns1.domain.name:8443/features
Please check the proxy is configured and running on the host.
I'm using it without SSL for now but it is not what I want 
···
On Thursday, January 15, 2015 at 2:32:29 AM UTC-8, claude juif wrote:
>
> Hi Konstantin,
>
> I actually have 2 smart proxies linked to my foreman instance and it's
> working really well.
>
> What is the exact error you had ? What do you mean by exchange the SSL
> between all proxies ?
>
> Basically on the puppetCA(foreman) server, you have to generate a
> certificate for all of your proxies. Copied them over to each proxy.
> (ca.pem, hostname-key.pem, hostname-cert.pem).
>
> On each proxy you also need to add the trusted host parameters pointing to
> your foreman instance.
>
> By the way, how didi you install foreman proxy ? With the
> foreman-installer ? or with packages ?
>
> Regards,
>
> 2015-01-15 2:25 GMT+01:00 'Konstantin Orekhov' via Foreman users <
> forema...@googlegroups.com >:
>
>> We have the same problem. First we noticed that back when we ran Foreman
>> 1.4.x (do not have data for earlier versions as we didn't have multiple
>> proxies at that time), but all subsequent versions (running 1.7.1 now) have
>> the same problem.
>>
>> It appears that adding a new proxy somehow invalidates the certs of
>> previously configured proxies from Foreman perspective as if it expects
>> *all* proxies to have a cert of that lastly-added one. Basically, none of
>> the previous proxies work now - one can click
>> It is very strange and it does not seem to be really cert-related, but
>> more like a logic somewhere in Foreman code that deals with proxies, IMHO.
>> Using the proposed curl verification method, I can talk over SSL to any of
>> the proxies, but Foreman would complain that cert is missing:
>>
>> [root@ppm01 ~]# curl --cacert /var/lib/puppet/ssl/certs/ca.pem --cert
>> /var/lib/puppet/ssl/certs/`hostname -f`.pem --key
>> /var/lib/puppet/ssl/private_keys/`hostname -f`.pem -H "Content-Type:
>> application/json" -H "Accept:application/json"
>> https://ppm01.mydomain:8443/features
>> ["abrt","bmc","puppet"]
>>
>> [root@ppm01 ~]# curl --cacert /var/lib/puppet/ssl/certs/ca.pem --cert
>> /var/lib/puppet/ssl/certs/`hostname -f`.pem --key
>> /var/lib/puppet/ssl/private_keys/`hostname -f`.pem -H "Content-Type:
>> application/json" -H "Accept:application/json"
>> https://ppm02.mydomain:8443/features
>> ["abrt","bmc","puppet"]
>>
>> [root@ppm01 ~]# curl --cacert /var/lib/puppet/ssl/certs/ca.pem --cert
>> /var/lib/puppet/ssl/certs/`hostname -f`.pem --key
>> /var/lib/puppet/ssl/private_keys/`hostname -f`.pem -H "Content-Type:
>> application/json" -H "Accept:application/json"
>> https://ppm03.mydomain:8443/features
>> ["abrt","bmc","puppet"]
>>
>> The only way to workaround this issue I found so far is to exchange the
>> SSL (both public and private) keys and certs between all proxies, which is
>> obviously not a proper thing to do.
>>
>> Please let me if I misunderstand or missing something here.
>> Thanks!
>>
>> --
>> 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 foreman-user...@googlegroups.com .
>> To post to this group, send email to forema...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/foreman-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>