| Puppet Version: Puppet Server Version: OS Name/Version: facter on windows servers returns non-UTF characters {{msi_info:}}{{{{ }}}} {{{{ "Alteryx 2020.2 x64 Server (Remove only)\0e\0\0\0\x11":}}}} {{{{ version: 2020.2.3.27789}}}} {{{{ vendor: Alteryx installdate: ''}}}} {{...}} {} The short-term workaround is to disable package inventory collection on these nodes or remove this package. Please open a Jira ticket for this issue. Desired Behavior:
- Windows fact gathering should work stripping out troublesome non-UTF characters
Actual Behavior:
- Windows facts are failing to insert into puppetdb with errors:
``` 2022-11-21T01:47:08.618Z ERROR [p.p.command] [842,189,640] [replace facts] Exceeded max attempts (5) for hkwvadapp436.zone1.scbdev.net [Ljava.lang.Throwable;@7f2a2006 2022-11-21T01:49:07.293Z ERROR [p.p.command] [842,262,475] [replace facts] Retrying after attempt 4 for hkwvadapp436.zone1.scbdev.net, due to: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 [Ljava.lang.Throwable;@7f2a2006 2022-11-21T02:21:21.094Z ERROR [p.p.command] [842,370,208] [replace facts] Retrying after attempt 3 for hkwvadapp436.zone1.scbdev.net, due to: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 [Ljava.lang.Throwable;@7f2a2006 2022-11-21T02:29:53.884Z ERROR [p.p.command] [842,457,322] [replace facts] Retrying after attempt 2 for hkwvadapp436.zone1.scbdev.net, due to: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 [Ljava.lang.Throwable;@7f2a2006 2022-11-21T02:39:03.480Z ERROR [p.p.command] [842,546,330] [replace facts] Retrying after attempt 1 for hkwvadapp436.zone1.scbdev.net, due to: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 [Ljava.lang.Throwable;@7f2a2006 2022-11-21T02:39:35.186Z ERROR [p.p.command] [842,395,470] [replace facts] Retrying after attempt 3 for hkwvadapp436.zone1.scbdev.net, due to: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 [Ljava.lang.Throwable;@7f2a2006 2022-11-21T02:49:09.155Z ERROR [p.p.command] [842,262,475] [replace facts] Exceeded max attempts (5) for hkwvadapp436.zone1.scbdev.net [Ljava.lang.Throwable;@7f2a2006 2022-11-21T03:02:30.741Z ERROR [p.p.command] [842,652,330] [replace facts] Retrying after attempt 0 for hkwvadapp436.zone1.scbdev.net, due to: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00 [Ljava.lang.Throwable;@7f2a2006 ``` **What do we know:
- Inspection of the facter output on one of the windows servers reveals some possible candidates. ``puppet facts --render-as yaml``
``` msi_info: "Alteryx 2020.2 x64 Server (Remove only)\0e\0\0\0\x11": version: 2020.2.3.27789 vendor: Alteryx installdate: '' ... ... diskdrives: '': Capacity: '575664128' FreeSpace: '118386688' FileSystem: "NTFS\r" "D:": Capacity: '107371032576' FreeSpace: '98313584640' FileSystem: "NTFS\r" "C:": Capacity: '106796412928' FreeSpace: '71102283776' FileSystem: NTFS ... ... ```
- Inspection of the debug agent run reveals:
``` Debug: Facter: executing command: C:\Windows\system32\cmd.exe /c C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy remotesigned -Command "& { [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8; (get-itemproperty -path hklm:\software\microsoft\windows\currentversion\uninstall* -Exclude nbi* | select displayname, displayversion, publisher, @{label='installdate'; expression={[datetime]::ParseExact($.installdate,'yyyyMMdd',$null).toshortdatestring()}}, uninstallstring) + (get-itemproperty -path HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall* -Exclude nbi* | select displayname, displayversion, publisher, @{label='installdate'; expression={[datetime]::ParseExact($.installdate,'yyyyMMdd',$null).toshortdatestring()}}, uninstallstring) | sort -Property 'DisplayName' | convertto-csv -delimiter ';' | select -Skip 2 }" Debug: Facter: ;;;;"C:\ProgramData
{8AFA1BA5-4A02-4BE9-9109-E844AF87ECDF} \RInstaller.exe" ;;;;"C:\ProgramData
{9D5434B2-ECD1-42D6-967D-5C7704D47541} \AlteryxInstallx64.exe" ;;;; ;;;; ;;;; ;;;;"C:\ProgramData
{BB67A754-82EF-4165-A046-979A1240E1BB} \AlteryxAISInstall.exe" ;;;; ;;;; "Alteryx 2021.2 x64 Server (Remove only) Debug: Facter: process exited with exit code 0. Debug: Facter: fact "msi_info" has resolved to { Alteryx 2021.2 x64 Server (Remove only)e¡ => { version => "2021.2.1.35394", vendor => "Alteryx", installdate => "" } , ``` |