Project

General

Profile

Actions

Feature #22048

closed

ERF12-8219 [ForemanChef::ProxyException]: Unable to communicate with Chef proxy,

Added by snow snow over 6 years ago. Updated almost 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The following error occurred when I tried to delete a host "ERF12-8219 [ForemanChef::ProxyException]: Unable to communicate with Chef proxy, undefined method `auto_deletion' for #"

i install the chef-plugins with "foreman-installer \
--enable-foreman-plugin-chef \
--enable-foreman-plugin-tasks \
--enable-foreman-proxy-plugin-chef"

#i disable the chef use false
--chef.yml--
@---
:enabled: false
:chef_authenticate_nodes: false
:chef_server_url: https://foreman.j.com
  1. smart-proxy client node needs to have some admin right on chef-server
  2. in order to retrive all nodes public keys
  3. e.g. 'host.example.net'
    :chef_smartproxy_clientname: foreman.j.com
  4. e.g. /etc/chef/client.pem
    :chef_smartproxy_privatekey: /etc/chef/client.pem
  1. turning of chef_ssl_verify is not recommended as it turn off authentication
  2. you can try set path to chef server certificate by chef_ssl_pem_file
  3. before setting chef_ssl_verify to false
  4. note that chef_ssl_pem_file must contain both private key and certificate
  5. because chef-api 0.5 requires it
    :chef_ssl_verify: false
  6. :chef_ssl_pem_file: /path@

I use the "Kickstart default" template as "Provisioning template". I found some configuration related to chef proxy in this template.
"chef_enabled = @host.respond_to?(:chef_proxy) && @host.chef_proxy"


Files

111.png View 111.png 38 KB snow snow, 12/26/2017 12:06 PM
222.png View 222.png 39 KB snow snow, 12/26/2017 12:08 PM
333.png View 333.png 12.1 KB snow snow, 12/26/2017 12:08 PM
444.png View 444.png 28.6 KB snow snow, 12/26/2017 12:09 PM
555.png View 555.png 11.6 KB snow snow, 12/26/2017 12:13 PM
Actions #1

Updated by Anonymous over 6 years ago

  • Project changed from Foreman to Chef
  • Category deleted (Plugin integration)
  • Difficulty deleted (hard)
  • Assignee deleted (Anonymous)

Please do not assign tickets to people out of the blue. Thanks.

Actions #2

Updated by Marek Hulán over 6 years ago

  • Status changed from New to Duplicate
  • translation missing: en.field_release set to 216

This is most likely incompatibility with Foreman 1.16, closing as a duplicate of #19620, please let us know if you use older version of Foreman. This should be fixed in upcoming 0.6.0 release

Updated by snow snow over 6 years ago

Marek Hulán wrote:

This is most likely incompatibility with Foreman 1.16, closing as a duplicate of #19620, please let us know if you use older version of Foreman. This should be fixed in upcoming 0.6.0 release

Hi Marek Hulán Thank you for your recovery.
I have now reinstalled a foreman, and my system configuration and software configuration are as follows.

[root@foreman pxelinux.cfg]# yum -y update
....
[root@foreman pxelinux.cfg]# cat /proc/version
Linux version 3.10.0-693.11.1.el7.x86_64 () (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Mon Dec 4 23:52:40 UTC 2017
[root@foreman pxelinux.cfg]# ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]
[root@foreman foreman]# rpm -qa | grep foreman
tfm-rubygem-foreman_setup-5.0.0-1.fm1_13.el7.noarch
foreman-release-1.16.0-1.el7.noarch
tfm-rubygem-foreman-tasks-0.10.0-2.fm1_16.el7.noarch
tfm-rubygem-foreman_chef-0.5.0-1.fm1_15.el7.noarch
foreman-1.16.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.11.0-1.el7.noarch
foreman-selinux-1.16.0-1.el7.noarch
foreman-release-scl-3-1.el7.noarch
foreman-debug-1.16.0-1.el7.noarch
foreman-postgresql-1.16.0-1.el7.noarch
tfm-rubygem-foreman-tasks-core-0.2.0-1.fm1_16.el7.noarch
foreman-cli-1.16.0-1.el7.noarch
foreman-installer-1.16.0-1.el7.noarch
foreman-proxy-1.16.0-1.el7.noarch
[root@foreman foreman]#

foreman-installer \
--enable-foreman-plugin-chef \
--enable-foreman-plugin-tasks \
--enable-foreman-proxy-plugin-chef \
--foreman-proxy-plugin-chef-server-url="https://chefserver.j.com/organizations/my_cloud" \
--foreman-proxy-plugin-chef-client-name="jack" \
--foreman-proxy-plugin-chef-private-key="/etc/opscode/jack.pem" \
--no-enable-puppet \
--foreman-server-ssl-crl=""

And then I created a machine("Create Host"):
The last three items are not configured




The following error occurred when I clicked on submit

The error log is as follows
2017-12-26 19:44:45 c9697cf2 [foreman-tasks/action] [E] ERF12-0944 [ForemanChef::ProxyException]: Unab
le to communicate with Chef proxy, 500 Internal Server Error (ForemanChef::ProxyException) | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_chef-0.5.0/app/lib/actions/foreman_chef/host/c
reate.rb:31:in `rescue in plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_chef-0.5.0/app/lib/actions/foreman_chef/host/c
reate.rb:11:in `plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/action.rb:468:in `block (3
levels) in execute_plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware/stack.rb:26:in `
call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware/stack.rb:26:in `
pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware.rb:17:in `pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware.rb:34:in `plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware/stack.rb:22:in `
call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware/stack.rb:26:in `
pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware.rb:17:in `pass' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware.rb:34:in `plan' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware/stack.rb:22:in `
call' | /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.30/lib/dynflow/middleware/world.rb:30:in `
execute'
.........

Actions #4

Updated by snow snow over 6 years ago

The problem has been solved. I re-use foreman-installer installed foreman_chef found yum foreman_chef version is 0.6.0,

Actions #5

Updated by Marek Hulán over 6 years ago

Thanks for confirmation!

Actions

Also available in: Atom PDF