Don't try to get the native code version in the transport client (elastic/x-pack-elasticsearch#600)
The native controller process won't be running
Original commit: elastic/x-pack-elasticsearch@d848e86cd554d58ead59a5d87ec951d300aec42c
@@ -33,6 +33,8 @@ public class MachineLearningFeatureSet implements XPackFeatureSet {
this.enabled = XPackSettings.MACHINE_LEARNING_ENABLED.get(settings);
this.licenseState = licenseState;
Map<String, Object> nativeCodeInfo = NativeController.UNKNOWN_NATIVE_CODE_INFO;
+ // Don't try to get the native code version in the transport client - the controller process won't be running
+ if (XPackPlugin.transportClientMode(settings) == false) {
try {
NativeController nativeController = NativeControllerHolder.getNativeController(settings);
if (nativeController != null) {
@@ -45,6 +47,7 @@ public class MachineLearningFeatureSet implements XPackFeatureSet {
+ "- please check that you are running on a supported platform");
}
}
+ }
this.nativeCodeInfo = nativeCodeInfo;
}
