ES SQL Script :: Version Issue and Default Password?

Hi Elasticsearch Masters,

I’m running ES v 7.4.0 as a Docker container. My host box is a Ubuntu box, 16.04.4; my version of Docker is 17.09.0-ce, build afdb6d4.

I want to use the /usr/share/elasticsearch/bin/elasticsearch-env script to run SQL-like queries against ES. I know there are some minor EnvVar issues with the script (documented here) but I was able to manually correct them and get the script running.

But I didn’t get far:

[me@1234567890ab bin]# ./elasticsearch-sql-cli https://elastic@127.0.0.1:9200
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
password:
ERROR: Cannot communicate with the server https://elastic@127.0.0.1:9200. This version of CLI only works with Elasticsearch version v7.4.0 [22e1767283e61a198cb4db791ea66e3f11ab9910]
[me@1234567890ab bin]#

So in the above, the script complains that it can only talking to an ES instance of ver 7.4.0. But I am within my docker container running ES v7.4.0; there shouldn’t be a version issue. Is this easily correctable?

Another issue: that password challenge. I spun up my Docker container, then did a minimum amount of configuration to get my ES service up and running. I don’t recall setting a password anywhere.

What would the password be by default? Where can I set it? The online documentation (here) makes a reference to “If security is enabled on your cluster…” Does that refer to this? Would this be turned on by default?

Thanks!

@redapplesonly if you are not sure about security configuration, there are high chances the command you used to start the CLI is incorrect due to the link to the ES node. Have you tried, by any chance, simply calling elasticsearch-sql-cli without a specific port, number and protocol?

Regarding security, yes, that would be the docs link. A first good step would be a look at https://www.elastic.co/guide/en/elasticsearch/reference/current/security-settings.html#general-security-settings.

that did it, thanks. At least within the docker container

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.