You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mikhail Khludnev (JIRA)" <ji...@apache.org> on 2016/11/09 19:57:58 UTC

[jira] [Commented] (SOLR-9745) bin/solr* swallows errors from running example instances at least

    [ https://issues.apache.org/jira/browse/SOLR-9745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15651886#comment-15651886 ] 

Mikhail Khludnev commented on SOLR-9745:
----------------------------------------

just a scratch 
{code}
diff --git a/solr/core/src/java/org/apache/solr/util/SolrCLI.java b/solr/core/src/java/org/apache/solr/util/SolrCLI.java
index 2c2898d..e13de13 100644
--- a/solr/core/src/java/org/apache/solr/util/SolrCLI.java
+++ b/solr/core/src/java/org/apache/solr/util/SolrCLI.java
@@ -2904,10 +2904,14 @@ public class SolrCLI {
             }
           }
         }
-        executor.execute(org.apache.commons.exec.CommandLine.parse(startCmd), startEnv, new DefaultExecuteResultHandler());
+        DefaultExecuteResultHandler handler  = new DefaultExecuteResultHandler()
+        executor.execute(org.apache.commons.exec.CommandLine.parse(startCmd), startEnv, handler);

         // brief wait before proceeding on Windows
         try {
+          handler.waitFor();
+          System.out.print(handler.getExitValue()+" "+handler.getException());
           Thread.sleep(3000);
         } catch (InterruptedException ie) {
           // safe to ignore ...
{code}

> bin/solr* swallows errors from running example instances at least
> -----------------------------------------------------------------
>
>                 Key: SOLR-9745
>                 URL: https://issues.apache.org/jira/browse/SOLR-9745
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Server
>    Affects Versions: 6.3, master (7.0)
>            Reporter: Mikhail Khludnev
>              Labels: newbie, newdev
>
> It occurs on mad scenario in LUCENE-7534:
> * solr.cmd weren't granted +x
> * coolhacker worked it around with cmd /C solr.cmd start -e ..
> * but when SolrCLI runs solr instances with the same solr.cmd, it just silently fails
> I think we can just pass ExecuteResultHandler which will dump exception to console. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org