diff --git a/solr/core/src/java/org/apache/solr/core/RunExecutableListener.java b/solr/core/src/java/org/apache/solr/core/RunExecutableListener.java index e0300b3163c..1ae83e5ef0d 100644 --- a/solr/core/src/java/org/apache/solr/core/RunExecutableListener.java +++ b/solr/core/src/java/org/apache/solr/core/RunExecutableListener.java @@ -83,7 +83,7 @@ class RunExecutableListener extends AbstractSolrEventListener { proc = Runtime.getRuntime().exec(cmd, envp ,dir); } catch (Error err) { // Create better error message - if (err.getMessage() != null && err.getMessage().contains("posix_spawn")) { + if (err.getMessage() != null && (err.getMessage().contains("posix_spawn") || err.getMessage().contains("UNIXProcess"))) { Error newErr = new Error("Error forking command due to JVM locale bug (see https://issues.apache.org/jira/browse/SOLR-6387): " + err.getMessage()); newErr.setStackTrace(err.getStackTrace()); err = newErr; diff --git a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java index f09c1a8e5de..c716a8023ca 100644 --- a/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java @@ -225,7 +225,7 @@ public class SystemInfoHandler extends RequestHandlerBase // ignore - log.warn("Error executing command", ex); return "(error executing: " + cmd + ")"; } catch (Error err) { - if (err.getMessage() != null && err.getMessage().contains("posix_spawn")) { + if (err.getMessage() != null && (err.getMessage().contains("posix_spawn") || err.getMessage().contains("UNIXProcess"))) { log.warn("Error forking command due to JVM locale bug (see https://issues.apache.org/jira/browse/SOLR-6387): " + err.getMessage()); return "(error executing: " + cmd + ")"; }