iamazy / elasticsearch-sql

parse sql into elasticsearch dsl with antlr4
https://iamazy.github.io/elasticsearch-sql/
MIT License
339 stars 89 forks source link

es 7.15.0 使用 isql 7.14.0 有密码时无法连接 #55

Open miws opened 3 years ago

miws commented 3 years ago

elasticsearch.yml中 xpack.security.enabled: true xpack.license.self_generated.type: basic xpack.security.transport.ssl.enabled: true

使用样例中conn1(),控制台显示 ElasticsearchStatusException[Elasticsearch exception [type=security_exception, reason=missing authentication credentials for REST request [/test/_search?typed_keys=true&max_concurrent_shard_requests=5&ignore_unavailable=false&expand_wildcards=open&allow_no_indices=true&ignore_throttled=true&search_type=query_then_fetch&batched_reduce_size=512]]]21:07:24.331 [main] DEBUG org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager - Connection manager is shutting down

iamazy commented 3 years ago

一般 es 的插件版本要和es版本完全一致,之前我用xpack测过相同版本的isql是没问题的,我先release下7.15.0版本的isql,有时间你可以试下,如果还有问题再交流

miws commented 3 years ago

插件安装修改propertis后是正常的,也devtools中也是可以使用的。只是java项目中无法连接。你的15还没有同步到mvn仓库?

iamazy commented 3 years ago

插件安装修改propertis后是正常的,也devtools中也是可以使用的。只是java项目中无法连接。你的15还没有同步到mvn仓库?

在java项目中无法连接什么意思,elasticsearch-sql只是将 sql转成了dsl,如何请求还是按照es官方的方式,并不会因为xpack之类就不起作用或连接不上。15已经同步到仓库,只是mvn中还没显示,你将版本改下即可

zhangwejun commented 2 years ago

http协议用户名密码方式 这个需要修改下,jdbc返回结果不支持下标方式获取

iamazy commented 2 years ago

http协议用户名密码方式 这个需要修改下,jdbc返回结果不支持下标方式获取

可以给个例子吗,你是如何使用的?