Project

General

Profile

Actions

Bug #26014

closed

Service status method on Windows failed

Added by Elaad FURREEDAN 18 days ago. Updated 10 days ago.

Status:
Resolved
Priority:
1 (highest)
Category:
-
Target version:
Severity:
Critical - prevents main use of Rudder | no workaround | data loss | security
UX impact:
I hate Rudder for that
User visibility:
First impressions of Rudder
Effort required:
Priority:
228
Name check:
To do
Fix check:
To do
Regression:
Yes

Description

The problem is at least present since 8.2.2 (serveur + agent). Didn't test on 8.1.
Create a technique with a method "Service status", on the agent run the technique is failing with an error :

PS C:\Users\administrator> rudder agent run                                                                                                                                                                        Policies already up to date                                                                                                                                                                                        Rudder agent 8.2.3.2000000000                                                                                                                                                                                      Node uuid: 5251356e-dc64-4a3a-9445-3da24ae47a99                                                                                                                                                                    Start execution with config [20241204-092928-a096c91b]                                                                                                                                                             

Mode    State              Technique                 Component                 Key                       Message
Enforce control            Common                    start                     20241204-092928-a096c91b  Start execution 
Enforce result_success     dsc-common                Reporting configuration   NXLog                     File C:\Program Files (x86)\nxlog\conf\nxlog.conf does not exists 
Enforce result_na          dsc-common                Service status            nxlog                     Not applicable 
[01:40:04 ERR] |||||>  ConvertFrom-Json : 
At C:\Program Files\Rudder\resources\rudderCli\RudderVariables\Public\Get-MandatoryJsonFileToHash.ps1:19 char:44
+     return (Get-Content -Path $path -Raw | ConvertFrom-Json | Convert ...
+                                            ~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [ConvertFrom-Json], InvalidOperationException
    + FullyQualifiedErrorId : DuplicateKeysInJsonString,Microsoft.PowerShell.Commands.ConvertFromJsonCommand

Enforce result_success     dsc-common                System variables          data                      Defined Rudder properties, inventory variables and parameters. 
Enforce result_success     dsc-common                Agent tasks               Rudder-Agent              The Rudder-Agent task was already correctly setup. 
Enforce result_success     dsc-common                Agent tasks               Rudder-Inventory          The Rudder-Inventory task was already correctly setup. 
Enforce result_success     dsc-common                Log system for reports    None                      All reports were successfully sent 
Enforce result_success     dsc-common                Prerun check              $env:PATH                 Rudder presence in $env:PATH was correct 
Enforce result_success     dsc-common                Inventory                 None                      No forced inventory to send 
Enforce result_success     motdConfiguration         MOTD Configuration        None                      Entry 'legalnoticecaption' in registry 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' is correctly set 
Enforce result_success     motdConfiguration         MOTD Configuration        None                      Entry 'legalnoticetext' in registry 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' is correctly set 
Enforce result_success     fileTemplate              Templates location        C:\test                   Directory C:\Program Files\Rudder\tmp\templates was already present 
Enforce result_success     fileTemplate              Load Template from a f... C:\test                   File C:\Program Files\Rudder\tmp\templates\C__test content is correct 
Enforce result_success     fileTemplate              Expand template           C:\test                   The file 'C:\test' was already correct 
Enforce result_na          fileTemplate              Posthook                  C:\test                   No posthook defined 
Enforce result_na          fileTemplate              Put permissions           C:\test                   Not applicable 
Enforce result_na          fileTemplate              Templates directory pe... C:\test                   Not applicable 
Audit   audit_noncompliant test_service_support_o... Service status            W32Time                   An unknown error occurred while checking status of service 'W32Time' 
Audit   log_warning        test_service_support_o... Service status            W32Time                    Import-Module : 
At C:\Program Files\Rudder\policy\ncf\30_generic_methods\service_status.ps1:19 char:20
+ ... port-Module ($dscResource | Select-Object -ExpandProperty ParentPath) ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Import-Module], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.ImportModuleCommand

Enforce control            Common                    end                       20241204-092928-a096c91b  End execution 

## Summary #####################################################################
execution time: 0.83s
################################################################################


Files

clipboard-202412041040-dfjhk.png (26 KB) clipboard-202412041040-dfjhk.png Elaad FURREEDAN, 2024-12-04 10:40
Actions #1

Updated by Elaad FURREEDAN 18 days ago

  • UX impact set to I hate Rudder for that
Actions #2

Updated by Elaad FURREEDAN 18 days ago

  • User visibility set to First impressions of Rudder
  • Priority changed from 0 to 228
Actions #3

Updated by Elaad FURREEDAN 18 days ago

  • Priority changed from N/A to To review
Actions #6

Updated by François ARMAND 17 days ago

  • Priority changed from To review to 1 (highest)
Actions #7

Updated by Elaad FURREEDAN 10 days ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF