Skip to content

[ML] Improve message when native controller cannot connect #43565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -481,9 +481,14 @@ public Collection<Object> createComponents(Client client, ClusterService cluster
normalizerProcessFactory = new NativeNormalizerProcessFactory(environment, nativeController);
analyticsProcessFactory = new NativeAnalyticsProcessFactory(environment, nativeController);
} catch (IOException e) {
// This also should not happen in production, as the MachineLearningInfoTransportAction should have
// hit the same error first and brought down the node with a friendlier error message
throw new ElasticsearchException("Failed to create native process factories for Machine Learning", e);
// The low level cause of failure from the named pipe helper's perspective is almost never the real root cause, so
// only log this at the lowest level of detail. It's almost always "file not found" on a named pipe we expect to be
// able to connect to, but the thing we really need to know is what stopped the native process creating the named pipe.
logger.trace("Failed to connect to ML native controller", e);
throw new ElasticsearchException("Failure running machine learning native code. This could be due to running "
+ "on an unsupported OS or distribution, missing OS libraries, or a problem with the temp directory. To "
+ "bypass this problem by running Elasticsearch without machine learning functionality set ["
+ XPackSettings.MACHINE_LEARNING_ENABLED.getKey() + ": false].");
}
} else {
autodetectProcessFactory = (job, autodetectParams, executorService, onProcessCrash) ->
Expand Down