Foreman Proxy 401 Error

Hi,

Using Foreman 1.23
Trying to set-up proxy…

Just running foreman-installer --enable-foreman-proxy

Get the following error:

/Stage[main]/foreman_proxy::Register/Foreman_smartproxy[for01.playpen.local]: Could not evaluate: proxy for01.playpen.local cannot be retrieved: unknown error 9response 401)

Just after some likely causes of this please…

Many thanks…

I have this same issue, but not with foreman-installer. I have puppet run my install for me. However, when I run
puppet agent -t
I get
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[fqdn]: Could not evaluate: Proxy fqdn cannot be retrieved: unknown error (response 401)

Can any expert point us to the right direction please?

Thank you

Hello cjashu,

Welcome to the Foreman community !

Cjashu and tipper can you confirm system has fqdn set and its reflected in ‘hostname -f’ command ? if not then set it, and try again.

This is the registration that fails. The authentication for that is based on oauth for which you need to provide the key and secret. Foreman :: Manual describes how to get the values for --foreman-proxy-oauth-consumer-key and -foreman-proxy-oauth-consumer-secret.

1 Like

This is correct. We made the keys available via puppet using foreman and the issue was fixed.

Thank you