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

compliance profiles not pulling through chef-server from automatev2 with chef-client 14.8.12 #8102

Open
Stromweld opened this Issue Jan 7, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@Stromweld
Copy link
Contributor

Stromweld commented Jan 7, 2019

Description

chef-client 14.8.12 is not pulling compliance profiles from automate v2 server proxied by chef-server when using the audit cookbook

Chef Version

chef-client - 14.8.12
chef-server - 12.18.14
automate - 20181212095204

Platform Version

CentOS 7
Windows 2016

Replication Case

configure audit cookbook to use chef-server-automate and chef-server for reporter and fetcher. add profiles to chef-client run.

Client Output

Chef-client run finishes without errors and then during the audit cookbook handler run for inspec profiles you get below error.

Running handlers:
[2019-01-03T14:05:44-06:00] ERROR: Report handler Chef::Handler::AuditReport raised #<NoMethodError: undefined method `[]' for #<URI::HTTPS:0x000000000672b1f8>>
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/fetchers/url.rb:126:in `parse_uri'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/fetchers/url.rb:98:in `initialize'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/plugins/inspec-compliance/lib/inspec-compliance/target.rb:18:in `initialize'
[2019-01-03T14:05:44-06:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/vendor/chef-server/fetcher.rb:43:in `new'
[2019-01-03T14:05:44-06:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/vendor/chef-server/fetcher.rb:43:in `resolve'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/plugin/v1/registry.rb:18:in `block in resolve'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/plugin/v1/registry.rb:17:in `each'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/plugin/v1/registry.rb:17:in `resolve'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/fetcher.rb:11:in `resolve'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/cached_fetcher.rb:12:in `initialize'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/profile.rb:30:in `new'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/profile.rb:30:in `resolve_target'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/profile.rb:78:in `for_target'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/inspec-core-3.0.61/lib/inspec/runner.rb:197:in `add_target'
[2019-01-03T14:05:44-06:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:170:in `block in call'
[2019-01-03T14:05:44-06:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:170:in `each'
[2019-01-03T14:05:44-06:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:170:in `call'
[2019-01-03T14:05:44-06:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:81:in `report'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/handler.rb:257:in `run_report_unsafe'
[2019-01-03T14:05:44-06:00] ERROR: /var/chef/cache/cookbooks/audit/files/default/handler/audit_report.rb:99:in `run_report_safely'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/handler.rb:123:in `block in run_report_handlers'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/handler.rb:121:in `each'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/handler.rb:121:in `run_report_handlers'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/handler.rb:133:in `block in <class:Handler>'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/client.rb:445:in `block in run_completed_successfully'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/client.rb:444:in `each'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/client.rb:444:in `run_completed_successfully'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/client.rb:301:in `run'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application.rb:321:in `block in fork_chef_client'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application.rb:309:in `fork'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application.rb:309:in `fork_chef_client'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application.rb:274:in `block in run_chef_client'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/local_mode.rb:44:in `with_server_connectivity'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application.rb:261:in `run_chef_client'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application/client.rb:475:in `sleep_then_run_chef_client'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application/client.rb:464:in `block in interval_run_chef_client'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application/client.rb:463:in `loop'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application/client.rb:463:in `interval_run_chef_client'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application/client.rb:447:in `run_application'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/lib/chef/application.rb:66:in `run'
[2019-01-03T14:05:44-06:00] ERROR: /opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.8.12/bin/chef-client:25:in `<top (required)>'
[2019-01-03T14:05:44-06:00] ERROR: /bin/chef-client:74:in `load'
[2019-01-03T14:05:44-06:00] ERROR: /bin/chef-client:74:in `<main>'
  - Chef::Handler::AuditReport
Running handlers complete
Chef Client finished, 8/120 resources updated in 01 minutes 03 seconds
@teknofire

This comment has been minimized.

Copy link

teknofire commented Jan 7, 2019

Duplicate of inspec/inspec#3626 which was fixed in inspec/inspec#3633 and released in Inspec 3.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment