You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running diagnostic utility by root account, it didn't collect any data and failed to create archive.
[root@elasticsearch-1 diagnostics-8.2.2]# ./diagnostics.sh --host localhost -u elastic -p --port 9200 --ssl --type api --noVerify
Using /bin/java as Java Runtime
Using -Xms256m -Xmx2000m for options.
2021-10-13 22:11:02,429 main ERROR Unable to locate appender "diag" for logger config "root"
Processing diagnosticInputs...
Elasticsearch user password: ********************
Closing loggers.
Archiving diagnostic results.
Archive: -20211013-221210.zip was created
Couldn't create zip archive. Trying tar.gz
Archive: -20211013-221210.tar.gz was created
Couldn't create tar.gz archive.
Fatal error occurred: Couldn't create zip and tar.gz archives.. Check diagnostics.log in the archive file for more detail.
We could see zip and tar.gz file, but they are all empty.
We also changed SELinux to permissive and tried running but still had the same problem.
Running with shell debug flag, got the following:
[root@elasticsearch-1 diagnostics-8.2.2]# ./diagnostics.sh --host localhost -u elastic -p --port 9200 --ssl --noVerify
+ scriptDir=./diagnostics.sh
+ scriptDir=.
+ libDir=./lib
+ '[' -d libDir ']'
+ '[' -x /bin/java ']'
+ JAVA=/bin/java
+ echo 'Using /bin/java as Java Runtime'
Using /bin/java as Java Runtime
+ '[' '!' -x /bin/java ']'
+ [[ '' != '' ]]
+ [[ '' == '' ]]
+ export 'DIAG_JAVA_OPTS=-Xms256m -Xmx2000m'
+ DIAG_JAVA_OPTS='-Xms256m -Xmx2000m'
+ echo 'Using -Xms256m -Xmx2000m for options.'
Using -Xms256m -Xmx2000m for options.
+ /bin/java -Xms256m -Xmx2000m -cp './config:./lib/*' co.elastic.support.diagnostics.DiagnosticApp --host localhost -u elastic -p --port 9200 --ssl --noVerify
2021-10-14 13:38:34,463 main ERROR Unable to locate appender "diag" for logger config "root"
Processing diagnosticInputs...
Elasticsearch user password: ********************
Closing loggers.
Archiving diagnostic results.
Archive: -20211014-133840.zip was created
Couldn't create zip archive. Trying tar.gz
Archive: -20211014-133840.tar.gz was created
Couldn't create tar.gz archive.
Fatal error occurred: Couldn't create zip and tar.gz archives.. Check diagnostics.log in the archive file for more detail.
Tried running prior version 8.1.4, it reported issue with creating temp directory:
[root@elasticsearch-1 support-diagnostics-8.1.4]# ./diagnostics.sh --host localhost -u elastic -p --port 9200 --ssl --type api --noVerify
+ scriptDir=./diagnostics.sh
+ scriptDir=.
+ libDir=./lib
+ '[' -d libDir ']'
+ '[' -x /bin/java ']'
+ JAVA=/bin/java
+ echo 'Using /bin/java as Java Runtime'
Using /bin/java as Java Runtime
+ '[' '!' -x /bin/java ']'
+ [[ '' != '' ]]
+ [[ '' == '' ]]
+ export 'DIAG_JAVA_OPTS=-Xms256m -Xmx2000m'
+ DIAG_JAVA_OPTS='-Xms256m -Xmx2000m'
+ echo 'Using -Xms256m -Xmx2000m for options.'
Using -Xms256m -Xmx2000m for options.
+ /bin/java -Xms256m -Xmx2000m -cp './config:./lib/*' com.elastic.support.diagnostics.DiagnosticApp --host localhost -u elastic -p --port 9200 --ssl --type api --noVerify
2021-10-14 13:45:40,125 main ERROR Unable to locate appender "diag" for logger config "root"
Processing diagnosticInputs...
Elasticsearch user password: ********************
Issue with creating temp directory. Check diagnostics.log in the archive file for more detail.
Closing loggers.
Archiving diagnostic results.
Couldn't create zip archive. Trying tar.gz
Couldn't create tar.gz archive.
Deleted directory: .
But creating output dir manually can be done successfully, even tried changing output dir permission to 777, still the same. We also tried changing umask to 011, still the same.
I was wondering what error code was returned when creating dir or creating zip. But we don't have any diagnostics.log to view.
Can I have guidance how to move forward to make the tool working?
The text was updated successfully, but these errors were encountered:
With the latest version of the diag tool, I'm seeing the exact same issue running on windows. I'm running as an admin with an admin command prompt and it will not successfully create the zip file. It's always empty. Tried running on 3 different machines with same issue. Only way I could get it to work was to hit Ctrl-C right before it tried to create the zip file. Then I just manually created the zip file.
It would be nice if the zip/tar file was NOT created successfully, it would leave the files in the directory rather than deleting them.
This environment is hardened.
When running diagnostic utility by root account, it didn't collect any data and failed to create archive.
No diagnostics.log can be found in the directory.
We could see zip and tar.gz file, but they are all empty.
We also changed SELinux to permissive and tried running but still had the same problem.
Running with shell debug flag, got the following:
Tried running prior version 8.1.4, it reported issue with creating temp directory:
But creating output dir manually can be done successfully, even tried changing output dir permission to 777, still the same. We also tried changing umask to 011, still the same.
I was wondering what error code was returned when creating dir or creating zip. But we don't have any diagnostics.log to view.
Can I have guidance how to move forward to make the tool working?
The text was updated successfully, but these errors were encountered: