Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

execute("chef-server-core-reconfigure") fails: FATAL: Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2) #133

Closed
pcbear opened this issue Feb 17, 2017 · 8 comments
Assignees
Labels
Triage: Needs Information Indicates an issue needs more information in order to work on it.

Comments

@pcbear
Copy link

pcbear commented Feb 17, 2017

Cookbook version

chef-ingredient (0.21.3)

Chef-client version

chef-client 12.15.19 and 12.18.31

Platform Details

Oracle Linux Server release 6.8
Attempted with chef-server 12.8.0 and 12.12.0

Scenario:

chef-server-ctl reconfigure fails to execute

Steps to Reproduce:

chef-enterprise cookbook depends on chef-ingredient

recipe server contains the chef-ingredient resource:

chef_ingredient 'chef-server' do
action :reconfigure
end

Attempted with both chef-solo and chef-client -z.

Expected Result:

Expecting 'chef-server-ctl reconfigure' to execute without error

Actual Result:

[2017-02-17T15:49:02+00:00] ERROR: chef_ingredient[chef-server] (chef-enterprise::server line 54) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[chef-server-core-reconfigure] (/root/cache/cookbooks/chef-ingredient/libraries/chef_ingredient_provider.rb line 105) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of chef-server-ctl reconfigure ----
STDOUT: [2017-02-17T15:49:02+00:00] FATAL: Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
STDERR:
---- End output of chef-server-ctl reconfigure ----

chef-stacktrace.out
https://gist.github.com/pcbear/1c6f89e17e81f7c401edf27cc3460a22

chef-client run
https://gist.github.com/pcbear/46d3d3111c004217cbee1b74e71c6fa3

@kennonkwok
Copy link

@pcbear did this work for you on a previous version of the cookbook?

@kennonkwok
Copy link

@pcbear I just tried to repro this on the cookbook version 1.1.0, chef-client 12.19.36, and oel 6.8 from bento and seemed OK for me.

This was my test recipe:

chef_ingredient 'chef-server' do
  action [ :install, :reconfigure ]
end

@cheeseplus
Copy link

Is this system ipv6 only by chance?

@gravesb
Copy link

gravesb commented Apr 17, 2017

I'm seeing the same error during a packer build running chef-solo. However if I remove the reconfigure lines from the recipe and spin up the resulting AMI, I can run reconfigure manually just fine. I see the same behavior on chef-ingredient 0.21.4 and 2.0.4. Also tested on chef-client 12.17.44 and 12.19.36.

@wrightp wrightp self-assigned this Apr 17, 2017
@gravesb
Copy link

gravesb commented Apr 18, 2017

FWIW, I was able to modify the /etc/hosts file and removed localhost and localhost.localdomain from the ::1 entry (so localhost was no longer mapped to an ipv6 address). This resolved the issue for me.

@wrightp
Copy link

wrightp commented Apr 18, 2017

@gravesb Thanks for the update. I was unable to reproduce this yesterday, but that bit of info gives me a place to start. I'll update what I find.

@wrightp
Copy link

wrightp commented Apr 20, 2017

This is not a chef-ingredient issue. This is specific to chef server reconfigure and ipv6. Check that the chef server is configured for ipv6. Otherwise you can submit an issue to https://github.com/chef/chef-server

@wrightp wrightp closed this as completed Apr 20, 2017
@gravesb
Copy link

gravesb commented Apr 20, 2017

I didn't realize you had to configure the server for ipv6, but now that you mention it I do see it in the docs here: https://docs.chef.io/config_rb_server.html. Thanks

@tas50 tas50 added Triage: Needs Information Indicates an issue needs more information in order to work on it. and removed Status: Pending Contributor Response labels Jan 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Triage: Needs Information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

6 participants