elasticsearch-sql-cli: ERROR: E is not a recognized option with docker.elastic.co/elasticsearch/elasticsearch:7.6.2 distribution

Created on 5 Jun 2020  路  4Comments  路  Source: elastic/elasticsearch

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.

  1. start the elasticsearch container(e.g. container=$(docker run --rm -it -d docker.elastic.co/elasticsearch/elasticsearch:7.6.2)
  2. try and run the elasticsearch-sql-cli command inside the container(e.g. docker exec -it $container ./bin/elasticsearch-sql-cli http://localhost:9200)
:Query LanguageSQL >bug

Most helpful comment

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.

All 4 comments

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)

Still seeing this in 7.9.2. The workaround also still works, thankfully :-].

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DhairyashilBhosale picture DhairyashilBhosale  路  3Comments

jpountz picture jpountz  路  3Comments

malpani picture malpani  路  3Comments

Praveen82 picture Praveen82  路  3Comments

dawi picture dawi  路  3Comments