Zipkin与elasticsearch存储(QueryParsingException)

时间:2017-03-29 13:47:50

标签: elasticsearch spring-cloud zipkin

我对Zipkin与弹性搜索存储有疑问。

将spring-cloud-sleuth更新为1.1.1.RELEASE后(因为我们将弹簧启动从1.3.8更新为1.4.4,弹簧云从Brixton.SR6更新为Camden.SR4)我们还更新了zipkin-storage-elasticsearch和我们的zipkin服务的pom.xml中的zipkin-autoconfigure-storage-elasticsearch到版本1.16.2。我们使用的是elasticsearch版本2.4.1。 当我们启动服务时,我们得到了一个 error on zipkin's ui和一个堆栈跟踪:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is Failed to execute phase [query], all shards failed; shardFailures {[cAMggVueTv67tHV7aykwlg][zipkin-2017-03-29][0]: RemoteTransportException[[Infamnia][172.18.0.20:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{"size":0,"query":{"bool":{"must":{"match_all":{}},"filter":{"bool":{"should":[{"nested":{"query":{"term":{"annotations.endpoint.serviceName":"xxx"}},"path":"annotations"}},{"nested":{"query":{"term":{"binaryAnnotations.endpoint.serviceName":"xxx"}},"path":"binaryAnnotations"}}]}}}},"aggregations":{"name_agg":{"terms":{"field":"name","size":2147483647,"order":{"_term":"asc"}}}}}]]; nested: QueryParsingException[[nested] nested object under path [annotations] is not of nested type]; }{[cAMggVueTv67tHV7aykwlg][zipkin-2017-03-29][1]: RemoteTransportException[[Infamnia][172.18.0.20:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{"size":0,"query":{"bool":{"must":{"match_all":{}},"filter":{"bool":{"should":[{"nested":{"query":{"term":{"annotations.endpoint.serviceName":"xxx"}},"path":"annotations"}},{"nested":{"query":{"term":{"binaryAnnotations.endpoint.serviceName":"xxx"}},"path":"binaryAnnotations"}}]}}}},"aggregations":{"name_agg":{"terms":{"field":"name","size":2147483647,"order":{"_term":"asc"}}}}}]]; nested: QueryParsingException[[nested] nested object under path [annotations] is not of nested type]; }{[cAMggVueTv67tHV7aykwlg][zipkin-2017-03-29][2]: RemoteTransportException[[Infamnia][172.18.0.20:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{"size":0,"query":{"bool":{"must":{"match_all":{}},"filter":{"bool":{"should":[{"nested":{"query":{"term":{"annotations.endpoint.serviceName":"xxx"}},"path":"annotations"}},{"nested":{"query":{"term":{"binaryAnnotations.endpoint.serviceName":"xxx"}},"path":"binaryAnnotations"}}]}}}},"aggregations":{"name_agg":{"terms":{"field":"name","size":2147483647,"order":{"_term":"asc"}}}}}]]; nested: QueryParsingException[[nested] nested object under path [annotations] is not of nested type]; }{[cAMggVueTv67tHV7aykwlg][zipkin-2017-03-29][3]: RemoteTransportException[[Infamnia][172.18.0.20:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{"size":0,"query":{"bool":{"must":{"match_all":{}},"filter":{"bool":{"should":[{"nested":{"query":{"term":{"annotations.endpoint.serviceName":"xxx"}},"path":"annotations"}},{"nested":{"query":{"term":{"binaryAnnotations.endpoint.serviceName":"xxx"}},"path":"binaryAnnotations"}}]}}}},"aggregations":{"name_agg":{"terms":{"field":"name","size":2147483647,"order":{"_term":"asc"}}}}}]]; nested: QueryParsingException[[nested] nested object under path [annotations] is not of nested type]; }{[cAMggVueTv67tHV7aykwlg][zipkin-2017-03-29][4]: RemoteTransportException[[Infamnia][172.18.0.20:9300][indices:data/read/search[phase/query]]]; nested: SearchParseException[failed to parse search source [{"size":0,"query":{"bool":{"must":{"match_all":{}},"filter":{"bool":{"should":[{"nested":{"query":{"term":{"annotations.endpoint.serviceName":"xxx"}},"path":"annotations"}},{"nested":{"query":{"term":{"binaryAnnotations.endpoint.serviceName":"xxx"}},"path":"binaryAnnotations"}}]}}}},"aggregations":{"name_agg":{"terms":{"field":"name","size":2147483647,"order":{"_term":"asc"}}}}}]]; nested: QueryParsingException[[nested] nested object under path [annotations] is not of nested type]; }] with root cause    


org.elasticsearch.index.query.QueryParsingException: [nested] nested object under path [annotations] is not of nested type
at org.elasticsearch.index.query.support.NestedInnerQueryParseSupport.setPath(NestedInnerQueryParseSupport.java:162)
at org.elasticsearch.index.query.NestedQueryParser.parse(NestedQueryParser.java:82)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:250)
at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:120)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:250)
at org.elasticsearch.index.query.QueryParseContext.parseInnerFilter(QueryParseContext.java:263)
at org.elasticsearch.index.query.BoolQueryParser.parse(BoolQueryParser.java:91)
at org.elasticsearch.index.query.QueryParseContext.parseInnerQuery(QueryParseContext.java:250)
at org.elasticsearch.index.query.IndexQueryParserService.innerParse(IndexQueryParserService.java:320)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:223)
at org.elasticsearch.index.query.IndexQueryParserService.parse(IndexQueryParserService.java:218)
at org.elasticsearch.search.query.QueryParseElement.parse(QueryParseElement.java:33)
at org.elasticsearch.search.SearchService.parseSource(SearchService.java:856)
at org.elasticsearch.search.SearchService.createContext(SearchService.java:667)
at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:633)
at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:377)
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:368)
at org.elasticsearch.search.action.SearchServiceTransportAction$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:365)
at org.elasticsearch.transport.TransportRequestHandler.messageReceived(TransportRequestHandler.java:33)
at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:77)
at org.elasticsearch.transport.TransportService$4.doRun(TransportService.java:376)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Zipkin正在使用spring-cloud-sleuth 1.0.0.RELEASE,zipkin-storage-elasticsearch,zipkin-autoconfigure-storage-elasticsearch 1.7.0和elasticsearch 2.3.5。我在这里错过了什么?哪个版本应该一起使用?

1 个答案:

答案 0 :(得分:0)

一般来说,最好使用zipkin的Elasticsearch的http变种,因为它不能与Spring Boot的弹性搜索库版本冲突。

我会将zipkin的组ID中的所有内容设置为最新的(目前是1.21.0,即Spring Boot 1.4.x)并使用zipkin-autoconfigure-storage-elasticsearch-http(加上你正在使用的那个) will be dropped

确保您的es主机是在url语法ex中指定的。 http://host1:9200