chef: Getting non-fatal 400 posting to capture endpoint during initial converge in bootstrap

Description

While doing knife bootstrap it gives following error ERROR: Failed to post reporting data to server (HTTP 400), saving to c:/chef/cache/failed-reporting-data.json

This does not affect the bootstrap process though. This probably should be the 404 error as I don’t have any reporting enabled and there is no any configuration for Automate 2 also in my config file. It’s a simple bootstrap.

Chef Version

Latest Chef 15 version

Platform Version

Windows-2012R2

Replication Case

Just run any knife bootstrap command and use latest Chef 15 release version for bootstrap.

knife bootstrap ec2-54-185-185-29.us-west-2.compute.amazonaws.com -o winrm --node-name vj-winrmssl --connection-user 'Administrator' --connection-password 'password' --connection-port 5986 --winrm-auth-method 'ssl' -c ~/workspace/chef-repo/.chef/knife.rb --bootstrap-version '15.0.293' --winrm-ssl -r 'recipe[windows_task::default]' --winrm-ssl-peer-fingerprint '<certificate-thumbpring>' -E developement -VV

Client Output


Stacktrace

[ec2-54-185-185-29.us-west-2.compute.amazonaws.com] resolving cookbooks for run list: ["windows_task::default"]
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] Synchronizing Cookbooks:
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com]   - windows_task (0.1.0)
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] Installing Cookbook Gems:
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] Compiling Cookbooks...
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] Converging 2 resources
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] Recipe: windows_task::default
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com]   * windows_task[chef-client 1] action create
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com]     - windows_task[chef-client 1] task created
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com]   * windows_task[TestTask] action create (up to date)
DEBUG: [WinRM] Waiting for output...
DEBUG: [WinRM] Processing output
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] 
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] Running handlers:
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] Running handlers complete
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] Chef Infra Client finished, 1/2 resources updated in 11 seconds
 [ec2-54-185-185-29.us-west-2.compute.amazonaws.com] [2019-05-10T19:35:53+00:00] ERROR: Failed to post reporting data to server (HTTP 400), saving to c:/chef/cache/failed-reporting-data.json
DEBUG: [WinRM] cleaning up command_id: 9443BE5E-71B4-40BD-8283-E0111B2E469B on shell_id 58BB214A-3FA6-4C11-806A-606D2CF970CF
DEBUG: [WinRM] @ec2-54-185-185-29.us-west-2.compute.amazonaws.com<{:transport=>:ssl, :disable_sspi=>false, :basic_auth_only=>false, :endpoint=>"https://ec2-54-185-185-29.us-west-2.compute.amazonaws.com:5986/wsman", :user=>"Administrator", :password=>"<hidden>", :no_ssl_peer_verification=>false, :realm=>nil, :service=>nil, :ca_trust_file=>nil, :ssl_peer_fingerprint=>"B98C229959C37F95736F282692786AA8A747E691"}> (If (Test-Path "C:/Users/Administrator/AppData/Local/Temp/86836a04-07c4-4ff5-bd7d-e625bdea9a8f/bootstrap.bat") { Remove-Item -Force -Path "C:/Users/Administrator/AppData/Local/Temp/86836a04-07c4-4ff5-bd7d-e625bdea9a8f/bootstrap.bat" })
DEBUG: [WinRM] Command created for If (Test-Path "C:/Users/Administrator/AppData/Local/Temp/86836a04-07c4-4ff5-bd7d-e625bdea9a8f/bootstrap.bat") { Remove-Item -Force -Path "C:/Users/Administrator/AppData/Local/Temp/86836a04-07c4-4ff5-bd7d-e625bdea9a8f/bootstrap.bat" }
if (!$?) { if($LASTEXITCODE) { exit $LASTEXITCODE } else { exit 1 } } with id: 27BD1DEA-4F97-47BE-BC4D-61ED303B65F6
DEBUG: [WinRM] creating command_id: 27BD1DEA-4F97-47BE-BC4D-61ED303B65F6 on shell_id 58BB214A-3FA6-4C11-806A-606D2CF970CF
DEBUG: [WinRM] Waiting for output...
DEBUG: [WinRM] Processing output

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Upgraded, still the same issue.

Facing the same issue on windows node with ssh connection with latest stable chef 15.0.193 node side. Also, this issue is not reproduced on Ubuntu node.

Seems this is not something related to knife bootstrap it raised when chef-client trying to log the end run a report on chef server. same code work if node having chef-14 version. https://github.com/chef/chef/blob/c6f3b113057e4848e80cb04c30f3298898faa030/lib/chef/resource_reporter.rb#L152-L154 might be @lamont-granquist can guide us better on this?

Need to check the chef-server logs will try standalone setup of chef server and reproduce the issue.

Thanks