Elasticsearch Sql CLI Not working

Hi Team,

I am trying to connect elastic sql through below command but not able to connect.

[root@cb-1 bin]# ./elasticsearch-sql-cli https://xx.xx.xx.xx:9200
ERROR: Cannot communicate with the server https://xx.xx.xx.xx:9200. This version of CLI only works with Elasticsearch version 8.9.2
[root@cb-1 bin]

Below is the JDK version is currently running on my VM.

[root@cb-1 ~]# java -version
openjdk version "1.8.0_181"
OpenJDK Runtime Environment (build 1.8.0_181-b13)
OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
[root@cb-1 ~]#

The installed elastic version is as below.


[root@cb-1 bin]# ./elasticsearch --version
Version: 8.9.2, Build: rpm/e8179018838f55b8820685f92e245abef3bddc0f/2023-08-31T02:43:14.210479707Z, JVM: 20.0.2

Thanks,
Debasis

Could you try with the username and password?

./elasticsearch-sql-cli sql_user:strongpassword@https://xx.xx.xx.xx:9200

If it still does not work, could you try with a more recent version? 8.15.0.

@dadoonet Do we need to create separate user for sql access or any user name can pass in the command line. Is there any issue with elastic version 8.9.2.

Thanks,
Debasis

I don't think so.

I don't know but I'd try to test on 8.15.