Parameter --archiveType is not recognized
fgierlinger opened this issue · 1 comments
Summary
According to (README)[https://github.com/elastic/support-diagnostics/blob/main/README.md] the --archiveType
parameter can be used to specify the format of the output archive. The options tar
, zip
and any
are supported.
None of the documented options actually work with the docker container. The error yielded is always the same.
$ docker run --rm -v /tmp:/mnt -ti support-diagnostics-app bash -x ./diagnostics.sh --type api --ssl --noVerify --archiveType TAR --host instance.ece.example.com --port 9243 -u elastic --password -o /mnt
+ scriptDir=./diagnostics.sh
+ scriptDir=.
+ libDir=./lib
+ '[' -d libDir ']'
+ '[' -x /usr/java/openjdk-12/bin/java ']'
+ JAVA=/usr/java/openjdk-12/bin/java
+ echo 'Using /usr/java/openjdk-12/bin/java as Java Runtime'
Using /usr/java/openjdk-12/bin/java as Java Runtime
+ '[' '!' -x /usr/java/openjdk-12/bin/java ']'
+ [[ '' != '' ]]
+ [[ '' == '' ]]
+ export 'DIAG_JAVA_OPTS=-Xms256m -Xmx2000m'
+ DIAG_JAVA_OPTS='-Xms256m -Xmx2000m'
+ echo 'Using -Xms256m -Xmx2000m for options.'
Using -Xms256m -Xmx2000m for options.
+ /usr/java/openjdk-12/bin/java -Xms256m -Xmx2000m -cp './config:./lib/*' com.elastic.support.diagnostics.DiagnosticApp --type api --ssl --noVerify --archiveType tar --host instance.ece.example.com --port 9243 -u elastic --password -o /mnt
2021-08-19 12:41:28,276 main ERROR Unable to locate appender "diag" for logger config "root"
Processing diagnosticInputs...
Fatal error occurred: Was passed main parameter '--archiveType' but no main parameter was defined in your arg class. Check diagnostics.log in the archive file for more detail.
The error is the same, no matter if using tar
, TAR
, zip
, ZIP
, any
or ANY
as parameter. Also changing the order of the parameter (putting archiveType first or last) does yield the same error.
When the parameter --archiveType
is omitted, the support-diagnostic archive is created successfully.
$ docker run --rm -v /tmp:/mnt -ti support-diagnostics-app bash -x ./diagnostics.sh --type api --ssl --noVerify --host instance.ece.example.com --port 9243 -u elastic --password -o /tmp
+ scriptDir=./diagnostics.sh
+ scriptDir=.
+ libDir=./lib
+ '[' -d libDir ']'
+ '[' -x /usr/java/openjdk-12/bin/java ']'
+ JAVA=/usr/java/openjdk-12/bin/java
+ echo 'Using /usr/java/openjdk-12/bin/java as Java Runtime'
Using /usr/java/openjdk-12/bin/java as Java Runtime
+ '[' '!' -x /usr/java/openjdk-12/bin/java ']'
+ [[ '' != '' ]]
+ [[ '' == '' ]]
+ export 'DIAG_JAVA_OPTS=-Xms256m -Xmx2000m'
+ DIAG_JAVA_OPTS='-Xms256m -Xmx2000m'
+ echo 'Using -Xms256m -Xmx2000m for options.'
Using -Xms256m -Xmx2000m for options.
+ /usr/java/openjdk-12/bin/java -Xms256m -Xmx2000m -cp './config:./lib/*' com.elastic.support.diagnostics.DiagnosticApp --type api --ssl --noVerify --host instance.ece.example.com --port 9243 -u elastic --password -o /tmp
2021-08-19 12:53:25,150 main ERROR Unable to locate appender "diag" for logger config "root"
Processing diagnosticInputs...
Elasticsearch user password: ****
Creating temp directory: /tmp/api-diagnostics
Configuring log file.
Diagnostic logger reconfigured for inclusion into archive
Checking for diagnostic version updates.
Issue encountered while checking diagnostic version for updates.
Failed to get current diagnostic version from Github.
If Github is not accessible from this environment current supported version cannot be confirmed.
Getting Elasticsearch Version.
Could not retrieve the Elasticsearch version - unable to continue. Status: 401 Reason: Authentication failure. Invalid login credentials.
Closing loggers.
Archiving diagnostic results.
Archive: /tmp/api-diagnostics-20210819-125343.zip was created
Deleted directory: /tmp/api-diagnostics.
Expected behaviour
The elastic diagnostic archive is either a zip or a tar archive, depending on the parameter of --archiveType
System information
OS: RHEL 7.9
Docker: 1.13.1
Support Diagnostics: Release v8.1.4