Skip to content

Scrub fails on Windows #867

@kaltman

Description

@kaltman

Attempting to scrub a zip results in a null pointer exception as mentioned here: #809

Attempting to run against a unzipped diagnostic fails as well:

PS C:\Users\test_user\Downloads\diagnostics-9.3.1-dist\diagnostics-9.3.1> .\scrub.bat -i "C:\Users\***\Downloads\diagnostic-3b71d3-2025-Jul-02--13_39_26\api-diagnostics-20250702-173926"
No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable.
Using -Xms1g -Xmx1g  for options.
2025-07-02T20:33:52.552351800Z main ERROR Unable to locate appender "diag" for logger config "root"
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by org.fusesource.hawtjni.runtime.Library in an unnamed module (file:/C:/Users/test_user/Downloads/diagnostics-9.3.1-dist/diagnostics-9.3.1/lib/jline-2.14.6.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

Processing diagnosticInputs...
Using version: 9.3.1 of diagnostic-utiliy
Deleted directory: C:\Users\test_user\Downloads\diagnostics-9.3.1-dist\diagnostics-9.3.1\scrubbed-api-diagnostics-20250702-173926.
Diagnostic logger reconfigured for inclusion into archive
Threadpool configured with 2 workers.
Archiving diagnostic results.
Archive: C:\Users\test_user\Downloads\diagnostics-9.3.1-dist\diagnostics-9.3.1\scrubbed-api-diagnostics-20250702-173926-20250702-203353.zip was created
Closing loggers.
Deleted directory: C:\Users\test_user\Downloads\diagnostics-9.3.1-dist\diagnostics-9.3.1\scrubbed-api-diagnostics-20250702-173926.

Creates an empty zip file

scrubber.log reports:

20:33:53.184 [main] INFO  co.elastic.support.BaseService - Diagnostic logger reconfigured for inclusion into archive
20:33:53.188 [main] INFO  co.elastic.support.scrub.ScrubService - Threadpool configured with 2 workers.
20:33:53.701 [main] ERROR co.elastic.support.scrub.ScrubService - java.util.concurrent.FutureTask@13d9b21f[Completed exceptionally: java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 3
C:\Users\test_user\Downloads\diagnostic-3b71d3-2025-Jul-02--13_39_26\api-diagnostics-20250702-173926\
   ^]
20:33:53.701 [main] ERROR co.elastic.support.scrub.ScrubService - java.util.concurrent.FutureTask@2826f61[Completed exceptionally: java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 3
C:\Users\test_user\Downloads\diagnostic-3b71d3-2025-Jul-02--13_39_26\api-diagnostics-20250702-173926\
   ^]
20:33:53.702 [main] ERROR co.elastic.support.scrub.ScrubService - java.util.concurrent.FutureTask@62727399[Completed exceptionally: java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence near index 3
C:\Users\test_user\Downloads\diagnostic-3b71d3-2025-Jul-02--13_39_26\api-diagnostics-20250702-173926\
   ^]
...
20:33:53.725 [main] INFO  co.elastic.support.BaseService - Archiving diagnostic results.
20:33:53.748 [main] INFO  co.elastic.support.util.ArchiveUtils - Archive: C:\Users\test_user\Downloads\diagnostics-9.3.1-dist\diagnostics-9.3.1\scrubbed-api-diagnostics-20250702-173926-20250702-203353.zip was created
20:33:53.752 [main] INFO  co.elastic.support.BaseService - Closing loggers.
20:33:53.785 [main] INFO  co.elastic.support.util.SystemUtils - Deleted directory: C:\Users\test_user\Downloads\diagnostics-9.3.1-dist\diagnostics-9.3.1\scrubbed-api-diagnostics-20250702-173926.

System info:

OS Name:                       Microsoft Windows Server 2025 Datacenter
OS Version:                    10.0.26100 N/A Build 26100

Java version:

java.exe --version
java 24.0.1 2025-04-15
Java(TM) SE Runtime Environment (build 24.0.1+9-30)
Java HotSpot(TM) 64-Bit Server VM (build 24.0.1+9-30, mixed mode, sharing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions