-
Notifications
You must be signed in to change notification settings - Fork 437
Description
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.
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!