Elasticsearch version (bin/elasticsearch --version):
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Version: 7.6.2, Build: default/docker/ef48eb35cf30adf4db14086e8aabd07ef6fb113f/2020-03-26T06:34:37.794943Z, JVM: 13.0.2
Plugins installed: []
N/A
JVM version (java -version):
$ /usr/share/elasticsearch/jdk/bin/java
openjdk version "13.0.2" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 13.0.2+8)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 13.0.2+8, mixed mode, sharing)
OS version (uname -a if on a Unix-like system):
Linux b6e0e6b3e8a9 5.4.7-050407-generic #201912311234 SMP Tue Dec 31 17:38:50 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Description of the problem including expected versus actual behavior:
I'm using the docker image docker.elastic.co/elasticsearch/elasticsearch:7.6.2.
The elasticsearch-sql-cli command included in the image doesn't seem to work:
$ ./bin/elasticsearch-sql-cli http://localhost:9200
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
Elasticsearch SQL CLI
Non-option arguments:
uri
Option Description
------ -----------
-b, --binary <Boolean> Disable binary communication. Enabled by default.
Accepts 'true' or 'false' values. (default: true)
-c, --check <Boolean> Enable initial connection check on startup (default:
true)
-d, --debug Enable debug logging
-h, --help Show help
-k, --keystore_location Location of a keystore to use when setting up SSL. If
specified then the CLI will prompt for a keystore
password. If specified when the uri isn't https then
an error is thrown.
-s, --silent Show minimal output
-v, --verbose Show verbose output
ERROR: E is not a recognized option
(run using docker exec -it)
I didn't find bug reports for this error with elasticsearch-sql-cli, but I found this one: https://github.com/elastic/elasticsearch/issues/19931
The issue mentions this can happen if one fails to provide an argument to the command. In my case I'm providing the only required argument.
Steps to reproduce:
Please include a minimal but complete recreation of the problem,
including (e.g.) index creation, mappings, settings, query etc. The easier
you make for us to reproduce it, the more likely that somebody will take the
time to look at it.
container=$(docker run --rm -it -d docker.elastic.co/elasticsearch/elasticsearch:7.6.2)docker exec -it $container ./bin/elasticsearch-sql-cli http://localhost:9200)Using jdk/bin/java -jar bin/elasticsearch-sql-cli-7.6.2.jar http://localhost:9200 works, so this is probably just an issue with the wrapper script.
Pinging @elastic/es-ql (:Query Languages/SQL)
The issue is starting to creep into the CI builds
Still seeing this in 7.9.2. The workaround also still works, thankfully :-].
Most helpful comment
Using
jdk/bin/java -jar bin/elasticsearch-sql-cli-7.6.2.jar http://localhost:9200works, so this is probably just an issue with the wrapper script.