Issue Adding Smart Proxy (foreman-proxy) to Foreman

Hello!

I am experiencing an issue when attempting to add my Puppet master (running
on the same machine as Foreman) to Foreman as a Smart Proxy.

I am entering its details as follows:
Name: Local Puppet Master
URL: https://pup-master-1.localdomain:8443

The screen then appears to refresh without any error output, and nothing is
added to the Smart Proxies list on the display. I have confirmed both that
'foreman-proxy' is running, and that the service is listening on TCP port
8443.

Here is the output from 'production.log':

Started POST "/smart_proxies" for 192.168.0.199 at 2014-09-12 15:43:05 -0400
Processing by SmartProxiesController#create as /
Parameters: {"utf8"=>"✓",
"authenticity_token"=>"hYz0GKFAk4h/tTahbKLK1sVO35AXNHbXBOAY1kF72/0=",
"smart_proxy"=>{"name"=>"Local Puppet Master",
"url"=>"https://pup-master-1.localdomain:8443"}}
Failed to save:
Rendered taxonomies/_loc_org_tabs.html.erb (0.1ms)
Rendered smart_proxies/_form.html.erb (16.5ms)
Rendered smart_proxies/new.html.erb (17.7ms)
Completed 200 OK in 168ms (Views: 20.4ms | ActiveRecord: 8.4ms)

Any assistance would be greatly appreciated.

Thanks!
– Adam

I'd suggest enabling debug logging [1] and seeing what it's complaining about.

Greg

[1] Troubleshooting - Foreman

>
> Hello!
>
> I am experiencing an issue when attempting to add my Puppet master
(running on the same machine as Foreman) to Foreman as a Smart Proxy.
>
> I am entering its details as follows:
> Name: Local Puppet Master
> URL: https://pup-master-1.localdomain:8443
>
> The screen then appears to refresh without any error output, and nothing
is added to the Smart Proxies list on the display. I have confirmed both
that 'foreman-proxy' is running, and that the service is listening on TCP
port 8443.
>
> Here is the output from 'production.log':
>
>> Started POST "/smart_proxies" for 192.168.0.199 at 2014-09-12 15:43:05
-0400
>> Processing by SmartProxiesController#create as /
>> Parameters: {"utf8"=>"✓",
"authenticity_token"=>"hYz0GKFAk4h/tTahbKLK1sVO35AXNHbXBOAY1kF72/0=",
"smart_proxy"=>{"name"=>"Local Puppet Master", "url"=>"
https://pup-master-1.localdomain:8443"}}
>> Failed to save:
>> Rendered taxonomies/_loc_org_tabs.html.erb (0.1ms)
>> Rendered smart_proxies/_form.html.erb (16.5ms)
>> Rendered smart_proxies/new.html.erb (17.7ms)
>> Completed 200 OK in 168ms (Views: 20.4ms | ActiveRecord: 8.4ms)
>
>
> Any assistance would be greatly appreciated.

My guess the proxy has only features that foreman does not support, if
that's the case, can you:

  1. Configure at least one more feature on the proxy.
  2. Open a bug :slight_smile:

Thanks
Ohad
>
> Thanks!
> – Adam
>
> –
> 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-users+unsubscribe@googlegroups.com.

··· On Sep 12, 2014 10:50 PM, "J. Adam Craig" wrote: > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.

Folks –

I have enabled DEBUG logging for Foreman, and received the following output
when attempting to add the local Puppet master as a Smart Proxy via the
Foreman web console.

Started POST "/smart_proxies" for ::1 at 2014-09-15 13:24:09 -0400
Processing by SmartProxiesController#create as /
Parameters: {"utf8"=>"✓",
"authenticity_token"=>"S/2HUyYTcRHgtmiaZpTJY9rD5LYU6QznYaYSJ0X61lk=",
"smart_proxy"=>{"name"=>"Local Puppet Master", "url"=>"
https://pup-master-1.localdomain:8443"}}
User Load (1.2ms) SELECT users.* FROM users WHERE users.id = 3
LIMIT 1
Setting current user thread-local variable to admin
AuthSource Load (0.5ms) SELECT auth_sources.* FROM auth_sources
WHERE auth_sources.id = 1 LIMIT 1
(0.2ms) BEGIN
SmartProxy Exists (0.4ms) SELECT 1 AS one FROM smart_proxies WHERE
smart_proxies.name = BINARY 'Local Puppet Master' LIMIT 1
SmartProxy Exists (0.3ms) SELECT 1 AS one FROM smart_proxies WHERE
smart_proxies.url = BINARY 'https://pup-master-1.localdomain:8443'
LIMIT 1
Setting Load (0.4ms) SELECT settings.* FROM settings WHERE
settings.name = 'ssl_certificate' ORDER BY name LIMIT 1
Setting Load (0.9ms) SELECT settings.* FROM settings WHERE
settings.name = 'ssl_ca_file' ORDER BY name LIMIT 1
Setting Load (0.5ms) SELECT settings.* FROM settings WHERE
settings.name = 'ssl_priv_key' ORDER BY name LIMIT 1
Feature Load (1.2ms) SELECT features.* FROM features
Feature Load (0.8ms) SELECT features.* FROM features WHERE
features.name IS NULL
(9.3ms) ROLLBACK
Failed to save:
Rendered taxonomies/_loc_org_tabs.html.erb (0.1ms)
Rendered smart_proxies/_form.html.erb (10.0ms)
Rendered smart_proxies/new.html.erb (11.0ms)
Completed 200 OK in 732ms (Views: 14.2ms | ActiveRecord: 17.6ms)

Does this necessitate a bug report, or is this operator error on my part?
I didn't have an "ah-ha!" moment while looking over the output.

Thanks!
– Adam

··· ______________________ *J. Adam Craig* UNIX & Windows Operating Systems Engineer VCU Computer Center 804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

On Sat, Sep 13, 2014 at 12:53 AM, Ohad Levy ohadlevy@gmail.com wrote:

On Sep 12, 2014 10:50 PM, “J. Adam Craig” jacraig@vcu.edu wrote:

Hello!

I am experiencing an issue when attempting to add my Puppet master
(running on the same machine as Foreman) to Foreman as a Smart Proxy.

I am entering its details as follows:
Name: Local Puppet Master
URL: https://pup-master-1.localdomain:8443

The screen then appears to refresh without any error output, and nothing
is added to the Smart Proxies list on the display. I have confirmed both
that ‘foreman-proxy’ is running, and that the service is listening on TCP
port 8443.

Here is the output from ‘production.log’:

Started POST “/smart_proxies” for 192.168.0.199 at 2014-09-12 15:43:05
-0400

Processing by SmartProxiesController#create as /
Parameters: {“utf8”=>“✓”,
“authenticity_token”=>“hYz0GKFAk4h/tTahbKLK1sVO35AXNHbXBOAY1kF72/0=”,
“smart_proxy”=>{“name”=>“Local Puppet Master”, “url”=>“
https://pup-master-1.localdomain:8443”}}

Failed to save:
Rendered taxonomies/_loc_org_tabs.html.erb (0.1ms)
Rendered smart_proxies/_form.html.erb (16.5ms)
Rendered smart_proxies/new.html.erb (17.7ms)
Completed 200 OK in 168ms (Views: 20.4ms | ActiveRecord: 8.4ms)

Any assistance would be greatly appreciated.

My guess the proxy has only features that foreman does not support, if
that’s the case, can you:

  1. Configure at least one more feature on the proxy.
  2. Open a bug :slight_smile:

Thanks
Ohad

Thanks!
– Adam


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-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/BcP3XdN-Nbo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Folks –

I see now that I have to enable the features for 'foreman-proxy' when
installing to EL from RPM packages (as opposed to using the
'foreman-installer', as I've done previously) within the
'/etc/foreman-proxy/settings.d' directory. I am enabling a few features
now, and will post back with my result.

Thanks,
– Adam

··· ______________________ *J. Adam Craig* UNIX & Windows Operating Systems Engineer VCU Computer Center 804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

On Mon, Sep 15, 2014 at 1:30 PM, J. Adam Craig jacraig@vcu.edu wrote:

Folks –

I have enabled DEBUG logging for Foreman, and received the following
output when attempting to add the local Puppet master as a Smart Proxy via
the Foreman web console.

Started POST “/smart_proxies” for ::1 at 2014-09-15 13:24:09 -0400
Processing by SmartProxiesController#create as /
Parameters: {“utf8”=>“✓”,
“authenticity_token”=>“S/2HUyYTcRHgtmiaZpTJY9rD5LYU6QznYaYSJ0X61lk=”,
“smart_proxy”=>{“name”=>“Local Puppet Master”, “url”=>“
https://pup-master-1.localdomain:8443”}}
User Load (1.2ms) SELECT users.* FROM users WHERE users.id = 3
LIMIT 1
Setting current user thread-local variable to admin
AuthSource Load (0.5ms) SELECT auth_sources.* FROM auth_sources
WHERE auth_sources.id = 1 LIMIT 1
(0.2ms) BEGIN
SmartProxy Exists (0.4ms) SELECT 1 AS one FROM smart_proxies WHERE
smart_proxies.name = BINARY ‘Local Puppet Master’ LIMIT 1
SmartProxy Exists (0.3ms) SELECT 1 AS one FROM smart_proxies WHERE
smart_proxies.url = BINARY 'https://pup-master-1.localdomain:8443
LIMIT 1
Setting Load (0.4ms) SELECT settings.* FROM settings WHERE
settings.name = ‘ssl_certificate’ ORDER BY name LIMIT 1
Setting Load (0.9ms) SELECT settings.* FROM settings WHERE
settings.name = ‘ssl_ca_file’ ORDER BY name LIMIT 1
Setting Load (0.5ms) SELECT settings.* FROM settings WHERE
settings.name = ‘ssl_priv_key’ ORDER BY name LIMIT 1
Feature Load (1.2ms) SELECT features.* FROM features
Feature Load (0.8ms) SELECT features.* FROM features WHERE
features.name IS NULL
(9.3ms) ROLLBACK
Failed to save:
Rendered taxonomies/_loc_org_tabs.html.erb (0.1ms)
Rendered smart_proxies/_form.html.erb (10.0ms)
Rendered smart_proxies/new.html.erb (11.0ms)
Completed 200 OK in 732ms (Views: 14.2ms | ActiveRecord: 17.6ms)

Does this necessitate a bug report, or is this operator error on my part?
I didn’t have an “ah-ha!” moment while looking over the output.

Thanks!
– Adam


J. Adam Craig
UNIX & Windows Operating Systems Engineer
VCU Computer Center
804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

On Sat, Sep 13, 2014 at 12:53 AM, Ohad Levy ohadlevy@gmail.com wrote:

On Sep 12, 2014 10:50 PM, “J. Adam Craig” jacraig@vcu.edu wrote:

Hello!

I am experiencing an issue when attempting to add my Puppet master
(running on the same machine as Foreman) to Foreman as a Smart Proxy.

I am entering its details as follows:
Name: Local Puppet Master
URL: https://pup-master-1.localdomain:8443

The screen then appears to refresh without any error output, and
nothing is added to the Smart Proxies list on the display. I have
confirmed both that ‘foreman-proxy’ is running, and that the service is
listening on TCP port 8443.

Here is the output from ‘production.log’:

Started POST “/smart_proxies” for 192.168.0.199 at 2014-09-12 15:43:05
-0400

Processing by SmartProxiesController#create as /
Parameters: {“utf8”=>“✓”,
“authenticity_token”=>“hYz0GKFAk4h/tTahbKLK1sVO35AXNHbXBOAY1kF72/0=”,
“smart_proxy”=>{“name”=>“Local Puppet Master”, “url”=>“
https://pup-master-1.localdomain:8443”}}

Failed to save:
Rendered taxonomies/_loc_org_tabs.html.erb (0.1ms)
Rendered smart_proxies/_form.html.erb (16.5ms)
Rendered smart_proxies/new.html.erb (17.7ms)
Completed 200 OK in 168ms (Views: 20.4ms | ActiveRecord: 8.4ms)

Any assistance would be greatly appreciated.

My guess the proxy has only features that foreman does not support, if
that’s the case, can you:

  1. Configure at least one more feature on the proxy.
  2. Open a bug :slight_smile:

Thanks
Ohad

Thanks!
– Adam


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-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/BcP3XdN-Nbo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

I have succeeded in adding the Smart Proxy after enabling the Puppet,
Puppet CA, and TFTP features by editing their respective .yml files within
'/etc/foreman-proxy/settings.d', restarting the 'foreman-proxy' service,
and attempting again to add the Smart Proxy.

Thanks for your patience. Learn something (or several things) new every
day.
– Adam

··· ______________________ *J. Adam Craig* UNIX & Windows Operating Systems Engineer VCU Computer Center 804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

On Mon, Sep 15, 2014 at 1:34 PM, J. Adam Craig jacraig@vcu.edu wrote:

Folks –

I see now that I have to enable the features for ‘foreman-proxy’ when
installing to EL from RPM packages (as opposed to using the
’foreman-installer’, as I’ve done previously) within the
’/etc/foreman-proxy/settings.d’ directory. I am enabling a few features
now, and will post back with my result.

Thanks,
– Adam


J. Adam Craig
UNIX & Windows Operating Systems Engineer
VCU Computer Center
804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

On Mon, Sep 15, 2014 at 1:30 PM, J. Adam Craig jacraig@vcu.edu wrote:

Folks –

I have enabled DEBUG logging for Foreman, and received the following
output when attempting to add the local Puppet master as a Smart Proxy via
the Foreman web console.

Started POST “/smart_proxies” for ::1 at 2014-09-15 13:24:09 -0400
Processing by SmartProxiesController#create as /
Parameters: {“utf8”=>“✓”,
“authenticity_token”=>“S/2HUyYTcRHgtmiaZpTJY9rD5LYU6QznYaYSJ0X61lk=”,
“smart_proxy”=>{“name”=>“Local Puppet Master”, “url”=>“
https://pup-master-1.localdomain:8443”}}
User Load (1.2ms) SELECT users.* FROM users WHERE users.id = 3
LIMIT 1
Setting current user thread-local variable to admin
AuthSource Load (0.5ms) SELECT auth_sources.* FROM auth_sources
WHERE auth_sources.id = 1 LIMIT 1
(0.2ms) BEGIN
SmartProxy Exists (0.4ms) SELECT 1 AS one FROM smart_proxies WHERE
smart_proxies.name = BINARY ‘Local Puppet Master’ LIMIT 1
SmartProxy Exists (0.3ms) SELECT 1 AS one FROM smart_proxies WHERE
smart_proxies.url = BINARY 'https://pup-master-1.localdomain:8443
LIMIT 1
Setting Load (0.4ms) SELECT settings.* FROM settings WHERE
settings.name = ‘ssl_certificate’ ORDER BY name LIMIT 1
Setting Load (0.9ms) SELECT settings.* FROM settings WHERE
settings.name = ‘ssl_ca_file’ ORDER BY name LIMIT 1
Setting Load (0.5ms) SELECT settings.* FROM settings WHERE
settings.name = ‘ssl_priv_key’ ORDER BY name LIMIT 1
Feature Load (1.2ms) SELECT features.* FROM features
Feature Load (0.8ms) SELECT features.* FROM features WHERE
features.name IS NULL
(9.3ms) ROLLBACK
Failed to save:
Rendered taxonomies/_loc_org_tabs.html.erb (0.1ms)
Rendered smart_proxies/_form.html.erb (10.0ms)
Rendered smart_proxies/new.html.erb (11.0ms)
Completed 200 OK in 732ms (Views: 14.2ms | ActiveRecord: 17.6ms)

Does this necessitate a bug report, or is this operator error on my part?
I didn’t have an “ah-ha!” moment while looking over the output.

Thanks!
– Adam


J. Adam Craig
UNIX & Windows Operating Systems Engineer
VCU Computer Center
804.828.4886

“Don’t be a phishing victim – VCU and other reputable organizations will
never use email to request that you reply with your password, social
security number or confidential personal information. For more details,
visit http://infosecurity.vcu.edu/phishing.html

On Sat, Sep 13, 2014 at 12:53 AM, Ohad Levy ohadlevy@gmail.com wrote:

On Sep 12, 2014 10:50 PM, “J. Adam Craig” jacraig@vcu.edu wrote:

Hello!

I am experiencing an issue when attempting to add my Puppet master
(running on the same machine as Foreman) to Foreman as a Smart Proxy.

I am entering its details as follows:
Name: Local Puppet Master
URL: https://pup-master-1.localdomain:8443

The screen then appears to refresh without any error output, and
nothing is added to the Smart Proxies list on the display. I have
confirmed both that ‘foreman-proxy’ is running, and that the service is
listening on TCP port 8443.

Here is the output from ‘production.log’:

Started POST “/smart_proxies” for 192.168.0.199 at 2014-09-12
15:43:05 -0400

Processing by SmartProxiesController#create as /
Parameters: {“utf8”=>“✓”,
“authenticity_token”=>“hYz0GKFAk4h/tTahbKLK1sVO35AXNHbXBOAY1kF72/0=”,
“smart_proxy”=>{“name”=>“Local Puppet Master”, “url”=>“
https://pup-master-1.localdomain:8443”}}

Failed to save:
Rendered taxonomies/_loc_org_tabs.html.erb (0.1ms)
Rendered smart_proxies/_form.html.erb (16.5ms)
Rendered smart_proxies/new.html.erb (17.7ms)
Completed 200 OK in 168ms (Views: 20.4ms | ActiveRecord: 8.4ms)

Any assistance would be greatly appreciated.

My guess the proxy has only features that foreman does not support, if
that’s the case, can you:

  1. Configure at least one more feature on the proxy.
  2. Open a bug :slight_smile:

Thanks
Ohad

Thanks!
– Adam


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-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/BcP3XdN-Nbo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.