kafka-connect-elasticsearch
kafka-connect-elasticsearch copied to clipboard
ERROR Failed to create client to verify connection (Invalid or missing build flavor [oss])
Hello, I'm trying to use kafka-connect-elasticsearch as sink connector.
My Elasticsearch cluster uses oss-7.10.2 version, and when I run the connector, I got the error message below and fail.
ERROR Failed to create client to verify connection (Invalid or missing build flavor [oss])
I managed to run connector, but I had to downgrade kafka-connect-elasticsearch version.
kafka-connect-elasticsearch Versions | RestHighLevlClient Versions | Result |
---|---|---|
>= 13.0.0 | >= 7.17.1 | FAIL |
<= 11.2.1 | <= 7.9.3 | SUCCESS |
As I search the stacktrace, it seems that kafka-connect-elasticsearch uses RestHighLevelClient.info() for validation. And since RestHighLevelClient 7.14 version, there appended version validation codes.
https://github.com/elastic/elasticsearch/blob/7.14/client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java#L2191
if (major < 6) {
return Optional.of("Elasticsearch version 6 or more is required");
}
if (major == 6 || (major == 7 && minor < 14)) {
if ("You Know, for Search".equalsIgnoreCase(mainResponse.getTagline()) == false) {
return Optional.of("Invalid or missing tagline [" + mainResponse.getTagline() + "]");
}
if (major == 7) {
// >= 7.0 and < 7.14
String responseFlavor = mainResponse.getVersion().getBuildFlavor();
if ("default".equals(responseFlavor) == false) { // I think this is the point where validation error occurs.
// Flavor is unknown when running tests, and non-mocked responses will return an unknown flavor
if (Build.CURRENT.flavor() != Build.Flavor.UNKNOWN || "unknown".equals(responseFlavor) == false) {
return Optional.of("Invalid or missing build flavor [" + responseFlavor + "]");
}
}
}
return Optional.empty();
}
Can someone tell me is my guess right? And if I want to use Elasticsearch oss build flavored version, should I use kafka-connect-elasticsearch versions under 13.0.0? (If there is any property to make it compatible with oss build flavor, please let me know)
Thanks!
I realize this comment is super old, but I just ran into this problem and you save me a ridiculous amount of time. I was able to get connect running with 11.2.7. Thanks for putting this out there.
I know, this is pretty old and still no replies on how to get it working with latest connector.. I am upgrading for security fixes from 11.1 so 11.2 is not a great option.