Foreman 1.9 Chef plugin 0.2 installation

Hi guys,

I've seen a couple of similar threads on stack overflow and this Google
group, however, my situation is slightly different and I wanted to avoid
dead horse beating.

I installed Foreman 1.9 on Ubunut 14.04 and setup the Chef plugin using
"foreman-installer -i" (log attached) [0]. Although the actual installation
seems to have been successful, there was an error at the end while
registration the smart proxy.
I can access the Foreman UI alright at
https://sj1-uvapp-10-5-188-13.corp.pepsi.com/dashboard and the Chef plugin
is added under 'settings but there's no smart proxy configured. At the end
of the foreman-installer, I receive the below output:

Notice: /Stage[main]/Foreman::Plugin::Docker/Forem: 450/451, 99%, 36.0/s,
elapsed: 00:06:53
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[sj1-uvapp-10-5-188-13.corp.pepsi.com]:
Could not evaluate: Proxy sj1-uvapp-10-5-188-13.corp.pepsi.com cannot be
registered (Could not load data from
https://sj1-uvapp-10-5-188-13.corp.pepsi.com
Error: /Stage[main]/Foreman_proxy::Register/Forema: 450/451, 99%, 36.0/s,
elapsed: 00:09:01
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[sj1-uvapp-10-5-188-13.corp.pepsi.com]:
Failed to call refresh: Proxy sj1-uvapp-10-5-188-13.corp.pepsi.com cannot
be registered (Could not load data from
https://sj1-uvapp-10-5-188-13.corp.pepsi.com
Error: /Stage[main]/Foreman_proxy::Register/Forema: 450/451, 99%, 5.8/s,
elapsed: 00:11:08
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[sj1-uvapp-10-5-188-13.corp.pepsi.com]:
Proxy sj1-uvapp-10-5-188-13.corp.pepsi.com cannot be registered (Could not
load data from https://sj1-uvapp-10-5-188-13.corp.pepsi.com
Done : 451/451, 100%, 1.6/s,
elapsed: 00:11:11
Done : 451/451, 100%, 1.6/s,
elapsed: 00:11:11
Something went wrong! Check the log for ERROR-level output

So although there was an error, the proxy seems to be running (confirmed
with service foreman-proxy status). And when I try to manually add the
proxy (with URL:https://sj1-uvapp-10-5-188-13.corp.pepsi.com:8443
<https://sj1-uvapp-10-5-188-13.corp.adobe.com:8443/features>), the UI
notifies me: "Unable to communicate with the proxy: ERF12-2530
[ProxyAPI::ProxyException]: Unable to detect features
([RestClient::RequestTimeout]: Request Timeout) for proxy
https://sj1-uvapp-10-5-188-13.corp.pepsi.com:8443/features
<https://sj1-uvapp-10-5-188-13.corp.adobe.com:8443/features> Please check
the proxy is configured and running on the host."

When I access /features, I can see chef added in the list but requesting
/chef prints "could not read client cert from environment" on the screen.
This would indicate a problem with the chef client certificate but I
configured knife on the Foreman host and I'm able to query nodes, users,
etc. with the key files, therefore it's not an issue of network/invalid
credentials.
I don't know where I'm making a mistake, as I definitively added the
options to install the required Chef components according to the
documentation [1]. Also, Ruby 1.9 is installed also, so this can't be the
issue as well. My guess would be that the path to the certificate is
missing from en environment variable; how to solve it is the question
though.

Any hints or guesses are much appreciated.

Best regards,
Nicolas

[0] http://theforeman.org/manuals/1.9/index.html#3.InstallingForeman
[1] http://theforeman.org/plugins/foreman_chef/0.2/#2.Installation
foreman apache logs:
root@sj1-uvapp-10-5-188-13:~# tail /var/log/apache2/foreman_access.log
127.0.0.1 - - [01/Nov/2015:06:46:51 +0000] "HEAD / HTTP/1.1" 301 - "-" "-"
127.0.0.1 - - [02/Nov/2015:17:08:51 +0000] "HEAD / HTTP/1.1" 301 - "-" "-"
127.0.0.1 - - [02/Nov/2015:17:08:51 +0000] "HEAD / HTTP/1.1" 301 - "-" "-"
10.132.4.199 - - [03/Nov/2015:09:15:41 +0000]
"\xff\xf4\xff\xfd\x06\xff\xf4\xff\xfd\x06" 500 531 "-" "-"
root@sj1-uvapp-10-5-188-13:~#
root@sj1-uvapp-10-5-188-13:~#
root@sj1-uvapp-10-5-188-13:~# tail /var/log/apache2/foreman_error.log
[Tue Nov 03 09:15:41.404226 2015] [core:error] [pid 21267:tid
140150678042368] [client 10.132.4.199:54552] End of script output before
headers:

foreman-installer.log (4.82 KB)

Does anyone have an idea or seen something similar?
I invested a lot of time in trial&error but unfortunately haven't been
successful. It'd be great if I can get this to work with your help.

Cheers,
Nicolas

··· On Tuesday, 3 November 2015 16:55:00 UTC+1, Nicolas Odermatt wrote: > > > Hi guys, > > I've seen a couple of similar threads on stack overflow and this Google > group, however, my situation is slightly different and I wanted to avoid > dead horse beating. > > I installed Foreman 1.9 on Ubunut 14.04 and setup the Chef plugin using > "foreman-installer -i" (log attached) [0]. Although the actual installation > seems to have been successful, there was an error at the end while > registration the smart proxy. > I can access the Foreman UI alright at > https://sj1-uvapp-10-5-188-13.corp.pepsi.com/dashboard and the Chef > plugin is added under 'settings but there's no smart proxy configured. At > the end of the foreman-installer, I receive the below output: > > Notice: /Stage[main]/Foreman::Plugin::Docker/Forem: 450/451, 99%, 36.0/s, > elapsed: 00:06:53 > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ > sj1-uvapp-10-5-188-13.corp.pepsi.com]: Could not evaluate: Proxy > sj1-uvapp-10-5-188-13.corp.pepsi.com cannot be registered (Could not load > data from https://sj1-uvapp-10-5-188-13.corp.pepsi.com > Error: /Stage[main]/Foreman_proxy::Register/Forema: 450/451, 99%, 36.0/s, > elapsed: 00:09:01 > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ > sj1-uvapp-10-5-188-13.corp.pepsi.com]: Failed to call refresh: Proxy > sj1-uvapp-10-5-188-13.corp.pepsi.com cannot be registered (Could not load > data from https://sj1-uvapp-10-5-188-13.corp.pepsi.com > Error: /Stage[main]/Foreman_proxy::Register/Forema: 450/451, 99%, 5.8/s, > elapsed: 00:11:08 > /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[ > sj1-uvapp-10-5-188-13.corp.pepsi.com]: Proxy > sj1-uvapp-10-5-188-13.corp.pepsi.com cannot be registered (Could not load > data from https://sj1-uvapp-10-5-188-13.corp.pepsi.com > Done : 451/451, 100%, 1.6/s, > elapsed: 00:11:11 > Done : 451/451, 100%, 1.6/s, > elapsed: 00:11:11 > Something went wrong! Check the log for ERROR-level output > * Foreman is running at https://sj1-uvapp-10-5-188-13.corp.pepsi.com > Initial credentials are admin / password > * Foreman Proxy is running at > https://sj1-uvapp-10-5-188-13.corp.pepsi.com:8443 > The full log is at /var/log/foreman-installer/foreman-installer.log > > So although there was an error, the proxy seems to be running (confirmed > with service foreman-proxy status). And when I try to manually add the > proxy (with URL:https://sj1-uvapp-10-5-188-13.corp.pepsi.com:8443 > ), the UI > notifies me: "Unable to communicate with the proxy: ERF12-2530 > [ProxyAPI::ProxyException]: Unable to detect features > ([RestClient::RequestTimeout]: Request Timeout) for proxy > https://sj1-uvapp-10-5-188-13.corp.pepsi.com:8443/features > Please check > the proxy is configured and running on the host." > > When I access /features, I can see chef added in the list but requesting > /chef prints "could not read client cert from environment" on the screen. > This would indicate a problem with the chef client certificate but I > configured knife on the Foreman host and I'm able to query nodes, users, > etc. with the key files, therefore it's not an issue of network/invalid > credentials. > I don't know where I'm making a mistake, as I definitively added the > options to install the required Chef components according to the > documentation [1]. Also, Ruby 1.9 is installed also, so this can't be the > issue as well. My guess would be that the path to the certificate is > missing from en environment variable; how to solve it is the question > though. > > Any hints or guesses are much appreciated. > > Best regards, > Nicolas > > [0] http://theforeman.org/manuals/1.9/index.html#3.InstallingForeman > [1] http://theforeman.org/plugins/foreman_chef/0.2/#2.Installation > foreman apache logs: > root@sj1-uvapp-10-5-188-13:~# tail /var/log/apache2/foreman_access.log > 127.0.0.1 - - [01/Nov/2015:06:46:51 +0000] "HEAD / HTTP/1.1" 301 - "-" "-" > 127.0.0.1 - - [02/Nov/2015:17:08:51 +0000] "HEAD / HTTP/1.1" 301 - "-" "-" > 127.0.0.1 - - [02/Nov/2015:17:08:51 +0000] "HEAD / HTTP/1.1" 301 - "-" "-" > 10.132.4.199 - - [03/Nov/2015:09:15:41 +0000] > "\xff\xf4\xff\xfd\x06\xff\xf4\xff\xfd\x06" 500 531 "-" "-" > root@sj1-uvapp-10-5-188-13:~# > root@sj1-uvapp-10-5-188-13:~# > root@sj1-uvapp-10-5-188-13:~# tail /var/log/apache2/foreman_error.log > [Tue Nov 03 09:15:41.404226 2015] [core:error] [pid 21267:tid > 140150678042368] [client 10.132.4.199:54552] End of script output before > headers: >

Hello

sorry for late answer. Could you please share the command that you used to run
foreman-installer? I suppose you disabled the puppet installation which also
disables generating of certificates that are used for smart proxy
authentication. If that's the case, it might need some tweaks in settings.

Feel free to ping me (mhulan) on #theforeman IRC channel on freenode, I'll try
to help.

··· -- Marek

On Monday 16 of November 2015 23:23:56 Nicolas Odermatt wrote:

Does anyone have an idea or seen something similar?
I invested a lot of time in trial&error but unfortunately haven’t been
successful. It’d be great if I can get this to work with your help.

Cheers,
Nicolas

On Tuesday, 3 November 2015 16:55:00 UTC+1, Nicolas Odermatt wrote:

Hi guys,

I’ve seen a couple of similar threads on stack overflow and this Google
group, however, my situation is slightly different and I wanted to avoid
dead horse beating.

I installed Foreman 1.9 on Ubunut 14.04 and setup the Chef plugin using
"foreman-installer -i" (log attached) [0]. Although the actual
installation
seems to have been successful, there was an error at the end while
registration the smart proxy.
I can access the Foreman UI alright at
https://sj1-uvapp-10-5-188-13.corp.pepsi.com/dashboard and the Chef
plugin is added under 'settings but there’s no smart proxy configured. At
the end of the foreman-installer, I receive the below output:

Notice: /Stage[main]/Foreman::Plugin::Docker/Forem: 450/451, 99%, 36.0/s,
elapsed: 00:06:53

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

sj1-uvapp-10-5-188-13.corp.pepsi.com]: Could not evaluate: Proxy
sj1-uvapp-10-5-188-13.corp.pepsi.com cannot be registered (Could not load
data from https://sj1-uvapp-10-5-188-13.corp.pepsi.com
Error: /Stage[main]/Foreman_proxy::Register/Forema: 450/451, 99%, 36.0/s,
elapsed: 00:09:01

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

sj1-uvapp-10-5-188-13.corp.pepsi.com]: Failed to call refresh: Proxy
sj1-uvapp-10-5-188-13.corp.pepsi.com cannot be registered (Could not load
data from https://sj1-uvapp-10-5-188-13.corp.pepsi.com
Error: /Stage[main]/Foreman_proxy::Register/Forema: 450/451, 99%, 5.8/s,
elapsed: 00:11:08

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

sj1-uvapp-10-5-188-13.corp.pepsi.com]: Proxy
sj1-uvapp-10-5-188-13.corp.pepsi.com cannot be registered (Could not load
data from https://sj1-uvapp-10-5-188-13.corp.pepsi.com
Done : 451/451, 100%, 1.6/s,
elapsed: 00:11:11
Done : 451/451, 100%, 1.6/s,
elapsed: 00:11:11

Something went wrong! Check the log for ERROR-level output

https://sj1-uvapp-10-5-188-13.corp.pepsi.com:8443

The full log is at /var/log/foreman-installer/foreman-installer.log

So although there was an error, the proxy seems to be running (confirmed
with service foreman-proxy status). And when I try to manually add the
proxy (with URL:https://sj1-uvapp-10-5-188-13.corp.pepsi.com:8443
https://sj1-uvapp-10-5-188-13.corp.adobe.com:8443/features), the UI
notifies me: “Unable to communicate with the proxy: ERF12-2530
[ProxyAPI::ProxyException]: Unable to detect features
([RestClient::RequestTimeout]: Request Timeout) for proxy
https://sj1-uvapp-10-5-188-13.corp.pepsi.com:8443/features
https://sj1-uvapp-10-5-188-13.corp.adobe.com:8443/features Please check
the proxy is configured and running on the host.”

When I access /features, I can see chef added in the list but requesting
/chef prints “could not read client cert from environment” on the screen.
This would indicate a problem with the chef client certificate but I
configured knife on the Foreman host and I’m able to query nodes, users,
etc. with the key files, therefore it’s not an issue of network/invalid
credentials.
I don’t know where I’m making a mistake, as I definitively added the
options to install the required Chef components according to the
documentation [1]. Also, Ruby 1.9 is installed also, so this can’t be the
issue as well. My guess would be that the path to the certificate is
missing from en environment variable; how to solve it is the question
though.

Any hints or guesses are much appreciated.

Best regards,
Nicolas

[0] Foreman :: Manual
[1] Foreman :: Plugin Manuals
foreman apache logs:
root@sj1-uvapp-10-5-188-13:~# tail /var/log/apache2/foreman_access.log
127.0.0.1 - - [01/Nov/2015:06:46:51 +0000] “HEAD / HTTP/1.1” 301 - “-” "-"
127.0.0.1 - - [02/Nov/2015:17:08:51 +0000] “HEAD / HTTP/1.1” 301 - “-” "-"
127.0.0.1 - - [02/Nov/2015:17:08:51 +0000] “HEAD / HTTP/1.1” 301 - “-” “-“
10.132.4.199 - - [03/Nov/2015:09:15:41 +0000]
”\xff\xf4\xff\xfd\x06\xff\xf4\xff\xfd\x06” 500 531 “-” "-"
root@sj1-uvapp-10-5-188-13:~#
root@sj1-uvapp-10-5-188-13:~#
root@sj1-uvapp-10-5-188-13:~# tail /var/log/apache2/foreman_error.log
[Tue Nov 03 09:15:41.404226 2015] [core:error] [pid 21267:tid
140150678042368] [client 10.132.4.199:54552] End of script output before
headers:


Marek