Chef plugin error when execute "chef-client" command on windows node

Hello,

Chef server v12 is installed on a server with CentOS7.
Foreman 1.9 (with Chef plugins) is installed on another server (CentOS7).
I added a Windows 2012 R2 node to Chef and I attempt to add it to foreman.

So, on the node I add the gem chef_handler_foreman (command = .\gem install
chef_handler_foreman) successfully and I added parameters to file client.rb:

#chef
log_level :info
log_location STDOUT
chef_server_url 'https://chef-server.jdelocal/organizations/lbn'
validation_client_name 'lbn-validator'
validation_key 'C:\chef\lbn-validator.pem'
node_name 'chef-client'

#foreman
require 'chef_handler_foreman'
foreman_server_options :url => 'http://foreman.jdelocal/foreman'
foreman_facts_upload true
#foreman_facts_whitelist ['lsb','network','cpu']
#foreman_facts_blacklist ['kernel','counters','interfaces::sit0']
foreman_facts_cache_file 'C:\chef\cache\chef_foreman_cache.md5'
foreman_reports_upload true
reports_log_level "notice"

I have an error when I execute the chef-client
command: http://pastebin.com/qZXhbwks

Somebody can help me please?

Regards,

Here is the ohai output:

{
"cpu": {
"0": {
"vendor_id": "GenuineIntel",
"family": "12",
"model": "3851",
"stepping": "11",
"physical_id": "CPU0",
"cores": 1,
"model_name": "Intel64 Family 6 Model 15 Stepping 11",
"mhz": "2933",
"cache_size": "0 KB"
},
"total": 1,
"real": 1
},
"filesystem": {
"A:": {
"kb_size": 0,
"kb_available": 0,
"kb_used": 0,
"percent_used": 0,
"mount": "A:",
"volume_name": null
},
"C:": {
"kb_size": 42580570,
"kb_available": 32746262,
"kb_used": 9834308,
"percent_used": 23,
"mount": "C:",
"fs_type": "ntfs",
"volume_name": ""
},
"D:": {
"kb_size": 4268605,
"kb_available": 0,
"kb_used": 4268605,
"percent_used": 100,
"mount": "D:",
"fs_type": "udf",
"volume_name": "IRM_SSS_X64FRE_EN-US_DV5"
}
},
"kernel": {
"os_info": {
"boot_device": "\Device\HarddiskVolume1",
"build_number": "9600",
"build_type": "Multiprocessor Free",
"caption": "Microsoft Windows Server 2012 R2 Standard",
"code_set": "1252",
"country_code": "33",
"creation_class_name": "Win32_OperatingSystem",
"cs_creation_class_name": "Win32_ComputerSystem",
"csd_version": null,
"cs_name": "CHEF-CLIENT",
"current_time_zone": 120,
"data_execution_prevention_32_bit_applications": true,
"data_execution_prevention_available": true,
"data_execution_prevention_drivers": true,
"data_execution_prevention_support_policy": 3,
"debug": false,
"description": "",
"distributed": false,
"encryption_level": 256,
"foreground_application_boost": 2,
"free_physical_memory": "3106628",
"free_space_in_paging_files": "1441792",
"free_virtual_memory": "4590272",
"install_date": "20150916023451.000000+120",
"large_system_cache": null,
"last_boot_up_time": "20150916153549.491645+120",
"local_date_time": "20150917141853.372000+120",
"locale": "040c",
"manufacturer": "Microsoft Corporation",
"max_number_of_processes": -1,
"max_process_memory_size": "137438953344",
"mui_languages": [
"en-US"
],
"name": "Microsoft Windows Server 2012 R2
Standard>C:\Windows|\Device\Harddisk0\Partition2",
"number_of_licensed_users": 0,
"number_of_processes": 46,
"number_of_users": 1,
"operating_system_sku": 7,
"organization": "",
"os_architecture": "64-bit",
"os_language": 1033,
"os_product_suite": 272,
"os_type": 18,
"other_type_description": null,
"pae_enabled": null,
"plus_product_id": null,
"plus_version_number": null,
"portable_operating_system": false,
"primary": true,
"product_type": 3,
"registered_user": "Windows User",
"serial_number": "00252-60070-32232-AA177",
"service_pack_major_version": 0,
"service_pack_minor_version": 0,
"size_stored_in_paging_files": "1441792",
"status": "OK",
"suite_mask": 272,
"system_device": "\Device\HarddiskVolume2",
"system_directory": "C:\Windows\system32",
"system_drive": "C:",
"total_swap_space_size": null,
"total_virtual_memory_size": "5635636",
"total_visible_memory_size": "4193844",
"version": "6.3.9600",
"windows_directory": "C:\Windows"
},
"name": "Microsoft Windows Server 2012 R2 Standard",
"release": "6.3.9600",
"version": "6.3.9600 Build 9600",
"os": "WINNT",
"cs_info": {
"admin_password_status": 1,
"automatic_managed_pagefile": true,
"automatic_reset_boot_option": true,
"automatic_reset_capability": true,
"boot_option_on_limit": 3,
"boot_option_on_watch_dog": 3,
"boot_rom_supported": true,
"bootup_state": "Normal boot",
"caption": "CHEF-CLIENT",
"chassis_bootup_state": 3,
"creation_class_name": "Win32_ComputerSystem",
"current_time_zone": 120,
"daylight_in_effect": true,
"description": "AT/AT COMPATIBLE",
"dns_host_name": "chef-client",
"domain": "WORKGROUP",
"domain_role": 2,
"enable_daylight_savings_time": true,
"front_panel_reset_status": 3,
"hypervisor_present": true,
"infrared_supported": false,
"initial_load_info": null,
"install_date": null,
"keyboard_password_status": 3,
"last_load_info": null,
"manufacturer": "VMware, Inc.",
"model": "VMware Virtual Platform",
"name": "CHEF-CLIENT",
"name_format": null,
"network_server_mode_enabled": true,
"number_of_logical_processors": 1,
"number_of_processors": 1,
"oem_string_array": [
"[MS_VM_CERT/SHA1/27d66596a61c48dd3dc7216fd715126e33f59ae7]",
"Welcome to the Virtual Machine"
],
"part_of_domain": false,
"pause_after_reset": "3932100000",
"pc_system_type": 1,
"pc_system_type_ex": 1,
"power_management_capabilities": null,
"power_management_supported": null,
"power_on_password_status": 0,
"power_state": 0,
"power_supply_state": 3,
"primary_owner_contact": null,
"primary_owner_name": "Windows User",
"reset_capability": 1,
"reset_count": -1,
"reset_limit": -1,
"roles": [
"LM_Workstation",
"LM_Server",
"NT",
"Server_NT"
],
"status": "OK",
"support_contact_description": null,
"system_startup_delay": null,
"system_startup_options": null,
"system_startup_setting": null,
"system_type": "x64-based PC",
"thermal_state": 3,
"total_physical_memory": "4294496256",
"user_name": null,
"wake_up_type": 6,
"workgroup": "WORKGROUP"
},
"machine": "x86_64",
"pnp_drivers": {
"SWD\SCDEVICEENUMBUS\0": {
"caption": null,
"class_guid": "{62f9c741-b25a-46ce-b54c-9bccce08b6f2}",
"compat_id": "SWD\GenericRaw",
"creation_class_name": null,
"description": "Generic software device",
"device_class": "SOFTWAREDEVICE",
"device_id": "SWD\SCDEVICEENUMBUS\0",
"device_name": "Generic software device",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": "Smart Card Device Enumeration Bus",
"hard_ware_id": "root\scdeviceenum",
"inf_name": "c_swdevice.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\0000003d",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"SWD\PRINTENUM\{0F441C3A-8EAE-4EEB-91F4-347F528DEEE0}": {
"caption": null,
"class_guid": "{1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc}",
"compat_id": "GenPrintQueue",
"creation_class_name": null,
"description": "Local Print Queue",
"device_class": "PRINTQUEUE",
"device_id":
"SWD\PRINTENUM\{0F441C3A-8EAE-4EEB-91F4-347F528DEEE0}",
"device_name": "Local Print Queue",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": "Fax (redirected 1)",
"hard_ware_id": "PRINTENUM\microsoftmicrosoft_s7d14",
"inf_name": "PrintQueue.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\00000049",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"SWD\PRINTENUM\{6093610A-E6B1-427B-90A5-0072BA6BAFCF}": {
"caption": null,
"class_guid": "{1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc}",
"compat_id": "GenPrintQueue",
"creation_class_name": null,
"description": "Local Print Queue",
"device_class": "PRINTQUEUE",
"device_id":
"SWD\PRINTENUM\{6093610A-E6B1-427B-90A5-0072BA6BAFCF}",
"device_name": "Local Print Queue",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": "Microsoft XPS Document Writer",
"hard_ware_id": "PRINTENUM\{0f4130dd-19c7-7ab6-99a1-980f03b2ee4e}",
"inf_name": "PrintQueue.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\00000035",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"SWD\PRINTENUM\PRINTQUEUES": {
"caption": null,
"class_guid": "{1ed2bbf9-11f0-4084-b21f-ad83a8e6dcdc}",
"compat_id": "SWD\GenericRaw",
"creation_class_name": null,
"description": "Local Print Queue",
"device_class": "PRINTQUEUE",
"device_id": "SWD\PRINTENUM\PRINTQUEUES",
"device_name": "Local Print Queue",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": "Root Print Queue",
"hard_ware_id": "PRINTENUM\LocalPrintQueue",
"inf_name": "PrintQueue.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\00000034",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"SWD\IP_TUNNEL_VBUS\TEREDO_TUNNEL_DEVICE": {
"caption": null,
"class_guid": "{4d36e972-e325-11ce-bfc1-08002be10318}",
"compat_id": "SWD\GenericRaw",
"creation_class_name": null,
"description": "Microsoft Teredo Tunneling Adapter",
"device_class": "NET",
"device_id": "SWD\IP_TUNNEL_VBUS\TEREDO_TUNNEL_DEVICE",
"device_name": "Microsoft Teredo Tunneling Adapter",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": "Teredo Tunneling Pseudo-Interface",
"hard_ware_id": "TEREDO",
"inf_name": "nettun.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\00000037",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"SWD\IP_TUNNEL_VBUS\ISATAP_0": {
"caption": null,
"class_guid": "{4d36e972-e325-11ce-bfc1-08002be10318}",
"compat_id": "SWD\GenericRaw",
"creation_class_name": null,
"description": "Microsoft ISATAP Adapter",
"device_class": "NET",
"device_id": "SWD\IP_TUNNEL_VBUS\ISATAP_0",
"device_name": "Microsoft ISATAP Adapter",
"dev_loader": null,
"driver_date": "20060621000000.
*****+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": "Microsoft ISATAP Adapter",
"hard_ware_id": "ISATAP",
"inf_name": "nettun.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\00000036",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"SWD\IP_TUNNEL_VBUS\IP_TUNNEL_DEVICE_ROOT": {
"caption": null,
"class_guid": "{62f9c741-b25a-46ce-b54c-9bccce08b6f2}",
"compat_id": "SWD\GenericRaw",
"creation_class_name": null,
"description": "Generic software device",
"device_class": "SOFTWAREDEVICE",
"device_id": "SWD\IP_TUNNEL_VBUS\IP_TUNNEL_DEVICE_ROOT",
"device_name": "Generic software device",
"dev_loader": null,
"driver_date": "20060621000000.
*****+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": "Microsoft IPv4 IPv6 Transition Adapter Bus",
"hard_ware_id": "(null)",
"inf_name": "c_swdevice.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\0000002f",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"ROOT\RDPBUS\0000": {
"caption": null,
"class_guid": "{4d36e97d-e325-11ce-bfc1-08002be10318}",
"compat_id": null,
"creation_class_name": null,
"description": "Remote Desktop Device Redirector Bus",
"device_class": "SYSTEM",
"device_id": "ROOT\RDPBUS\0000",
"device_name": "Remote Desktop Device Redirector Bus",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": null,
"hard_ware_id": "ROOT\RDPBUS",
"inf_name": "rdpbus.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\00000015",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"ROOT\SYSTEM\0000": {
"caption": null,
"class_guid": "{4d36e97d-e325-11ce-bfc1-08002be10318}",
"compat_id": null,
"creation_class_name": null,
"description": "Plug and Play Software Device Enumerator",
"device_class": "SYSTEM",
"device_id": "ROOT\SYSTEM\0000",
"device_name": "Plug and Play Software Device Enumerator",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": null,
"hard_ware_id": "ROOT\SWENUM",
"inf_name": "swenum.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "(Standard system devices)",
"name": null,
"pdo": "\Device\00000014",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"ROOT\MSSMBIOS\0000": {
"caption": null,
"class_guid": "{4d36e97d-e325-11ce-bfc1-08002be10318}",
"compat_id": null,
"creation_class_name": null,
"description": "Microsoft System Management BIOS Driver",
"device_class": "SYSTEM",
"device_id": "ROOT\MSSMBIOS\0000",
"device_name": "Microsoft System Management BIOS Driver",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": null,
"hard_ware_id": "ROOT\mssmbios",
"inf_name": "mssmbios.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "(Standard system devices)",
"name": null,
"pdo": "\Device\00000013",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"ROOT\MS_PPPOEMINIPORT\0000": {
"caption": null,
"class_guid": "{4d36e972-e325-11ce-bfc1-08002be10318}",
"compat_id": null,
"creation_class_name": null,
"description": "WAN Miniport (PPPOE)",
"device_class": "NET",
"device_id": "ROOT\MS_PPPOEMINIPORT\0000",
"device_name": "WAN Miniport (PPPOE)",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": "WAN Miniport (PPPOE)",
"hard_ware_id": "ms_pppoeminiport",
"inf_name": "netrasa.inf",
"install_date": null,
"is_signed": true,
"location": null,
"manufacturer": "Microsoft",
"name": null,
"pdo": "\Device\00000012",
"signer": "Microsoft Windows",
"started": null,
"start_mode": null,
"status": null,
"system_creation_class_name": null,
"system_name": null,
"version": "6.3.9600.16384",
"date": "20060621"
},
"ROOT\NDISVIRTUALBUS\0000": {
"caption": null,
"class_guid": "{4d36e97d-e325-11ce-bfc1-08002be10318}",
"compat_id": null,
"creation_class_name": null,
"description": "NDIS Virtual Network Adapter Enumerator",
"device_class": "SYSTEM",
"device_id": "ROOT\NDISVIRTUALBUS\0000",
"device_name": "NDIS Virtual Network Adapter Enumerator",
"dev_loader": null,
"driver_date": "20060621000000.******+***",
"driver_name": null,
"driver_provider_name": "Microsoft",
"driver_version": "6.3.9600.16384",
"friendly_name": null,
"hard_ware_id": "ROOT\NdisVirtualBus",
"inf_name": "ndisvirtualbus.inf",
"install_date": null,
"is_

Hello,

for the record, this has been fixed in chef-handler-foreman 0.1.0 released
today but it seems there's still some parsing issue with windows facts on
foreman_chef side. I'll try to reproduce locally and fix it in upcoming
foreman_chef release.

··· -- Marek

On Thursday 17 of September 2015 05:09:22 n4rk0o wrote:

Hello,

Chef server v12 is installed on a server with CentOS7.
Foreman 1.9 (with Chef plugins) is installed on another server (CentOS7).
I added a Windows 2012 R2 node to Chef and I attempt to add it to foreman.

So, on the node I add the gem chef_handler_foreman (command = .\gem install
chef_handler_foreman) successfully and I added parameters to file client.rb:

#chef
log_level :info
log_location STDOUT
chef_server_url 'https://chef-server.jdelocal/organizations/lbn
validation_client_name 'lbn-validator’
validation_key 'C:\chef\lbn-validator.pem’
node_name ‘chef-client’

#foreman
require 'chef_handler_foreman’
foreman_server_options :url => 'http://foreman.jdelocal/foreman
foreman_facts_upload true
#foreman_facts_whitelist [‘lsb’,‘network’,‘cpu’]
#foreman_facts_blacklist [‘kernel’,‘counters’,‘interfaces::sit0’]
foreman_facts_cache_file 'C:\chef\cache\chef_foreman_cache.md5’
foreman_reports_upload true
reports_log_level “notice”

I have an error when I execute the chef-client
command: http://pastebin.com/qZXhbwks

Somebody can help me please?

Regards,