k2v-academy / K2View-Academy

Other
0 stars 0 forks source link

ElasticSearch Queries #236

Closed 43q5UTNbxCfW4IybHgYQJn2YNRKR3zxTbgouRmp closed 3 years ago

43q5UTNbxCfW4IybHgYQJn2YNRKR3zxTbgouRmp commented 3 years ago

Hi, I installed Elastic Search on my local and when I am trying to query from Webservice/Console, I am getting warning. Could you please let me know if this is related to elastic search version or is it an issue with fabric supporting elastic search?

Version 6.4.2

fabric>search lutype = BILLING tables=CUSTOMER '{"query": {"query_string": { "fields": ["CUSTOMER_ID"], "query": "215"}}}'; |CUSTOMER_ID|FIRST_NAME|LAST_NAME|SSN |_K2IID |SCORE| +-----------+----------+---------+----------+----------+-------+ |215 |talieee |sears |5455651083|5455651083|1.0 |

(1 rows) fabric>

WARN 2021-04-23 22:26:55,116 [LID401000000000004] [JdbcEx Server-0/127.0.0.1:59838] c.k.f.c.Util - Got exception: Unable to parse response body org.elasticsearch.ElasticsearchStatusException: Unable to parse response body at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:1870) at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1624) at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1581) at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1551) at org.elasticsearch.client.RestHighLevelClient.clearScroll(RestHighLevelClient.java:1223) at com.k2view.fabric.search.response.SearchResult.lambda$close$1(SearchResult.java:54) at com.k2view.fabric.common.Util.safeExecution(Util.java:179) at com.k2view.fabric.search.response.SearchResult.close(SearchResult.java:54) at com.k2view.fabric.common.Util.safeClose(Util.java:70) at com.k2view.fabric.session.command.SearchResultSet.close(SearchCommand.java:105) at com.k2view.fabric.common.jdbc.JdbcUtil.sqlException(JdbcUtil.java:169) at com.k2view.fabric.session.sql.FabricResultSet.close(FabricResultSet.java:81) at com.k2view.fabric.common.jdbc.delegates.ResultSetDelegate.close(ResultSetDelegate.java:39) at com.k2view.fabric.session.sql.FabricStatement.close(FabricStatement.java:295) at com.k2view.fabric.common.jdbc.delegates.StatementDelegate.close(StatementDelegate.java:27) at com.k2view.fabric.common.Util.safeClose(Util.java:70) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServerConnection$1.close(JdbcExServerConnection.java:287) at com.k2view.fabric.common.Util.safeClose(Util.java:70) at com.k2view.fabric.jdbcex.k2driver.server.OpenResultSet.close(OpenResultSet.java:155) at com.k2view.fabric.jdbcex.k2driver.server.OpenResultSet.moreRows(OpenResultSet.java:65) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServerConnection.sendResult(JdbcExServerConnection.java:294) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServerConnection.executeAdHocStatement(JdbcExServerConnection.java:258) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServerConnection.lambda$hookActions$6(JdbcExServerConnection.java:86) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServerConnection.handleMessage(JdbcExServerConnection.java:228) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServerConnection.talkAndCloseJdbc(JdbcExServerConnection.java:210) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServerConnection.talk(JdbcExServerConnection.java:196) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServer.talk(JdbcExServer.java:46) at com.k2view.fabric.jdbcex.k2driver.server.JdbcExServer.lambda$new$0(JdbcExServer.java:39) at com.k2view.fabric.jdbcex.tcp.TcpServerWorkerRunnable.run(TcpServerWorkerRunnable.java:28) at com.k2view.fabric.jdbcex.tcp.KillerRunnable.run(KillableThreadPoolExecutor.java:61) at java.lang.Thread.run(Thread.java:748) Suppressed: org.elasticsearch.common.ParsingException: Failed to parse object: expecting field with name [error] but found [succeeded] at org.elasticsearch.common.xcontent.XContentParserUtils.ensureFieldName(XContentParserUtils.java:50) at org.elasticsearch.ElasticsearchException.failureFromXContent(ElasticsearchException.java:592) at org.elasticsearch.rest.BytesRestResponse.errorFromXContent(BytesRestResponse.java:169) at org.elasticsearch.client.RestHighLevelClient.parseEntity(RestHighLevelClient.java:1897) at org.elasticsearch.client.RestHighLevelClient.parseResponseException(RestHighLevelClient.java:1867) ... 30 common frames omitted Caused by: org.elasticsearch.client.ResponseException: method [DELETE], host [http://localhost:9200], URI [/_search/scroll], status line [HTTP/1.1 404 Not Found] {"succeeded":true,"num_freed":0} at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:283) at org.elasticsearch.client.RestClient.performRequest(RestClient.java:261) at org.elasticsearch.client.RestClient.performRequest(RestClient.java:235) at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1611) ... 29 common frames omitted

F78aPg0zjWnRKWkYrBd6lShvmAYl8doniMtEnFN commented 3 years ago

I'm getting exactly the same exceptions on k2fabric.log, no matter if entering the search command on the command-line, or through webservice code that executes the search command thru fabric().fetch(...). Issue seems to be happening when reaching the end of (or trying to close) the result set. Please advise if a defect should be created. Thanks.

Fabric is fabric-6.4.2_47 at revision = 1cfe4800746f1a6c2c07e0ced1ab7ba159043b77. Elasticsearch is AWS Elasticsearch Service:

{
  "name" : "***",
  "cluster_name" : "***",
  "cluster_uuid" : "***",
  "version" : {
    "number" : "7.9.1",
    "build_flavor" : "oss",
    "build_type" : "tar",
    "build_hash" : "unknown",
    "build_date" : "2020-11-03T09:54:32.349659Z",
    "build_snapshot" : false,
    "lucene_version" : "8.6.2",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}
eHK5dcC00peRJzSmBkzpRSXRdBTJxvlzYiuW95S commented 3 years ago

Hi.

A ticket has been opened on this issue on Fabric 6.5 board. This issue will be handled in Fabric 6.5.

You can change the relevant section in logback.xml to ERROR to avoid adding these Warnings to the log file.

See details in the following link: https://github.com/k2view-academy/K2View-Academy/blob/Academy_6.4/articles/21_Fabric_troubleshooting/02_Fabric_troubleshooting_log_files.md

Thanks, Tali