mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Catch exception in org.sleuthkit.autopsy.keywordsearch.Server.isRunning()
This commit is contained in:
parent
ddb10c3a01
commit
08ebc3a5ae
@ -60,6 +60,7 @@ import org.sleuthkit.autopsy.coreutils.PlatformUtil;
|
|||||||
import org.sleuthkit.datamodel.Content;
|
import org.sleuthkit.datamodel.Content;
|
||||||
import org.apache.solr.common.SolrInputDocument;
|
import org.apache.solr.common.SolrInputDocument;
|
||||||
import org.apache.solr.client.solrj.impl.XMLResponseParser;
|
import org.apache.solr.client.solrj.impl.XMLResponseParser;
|
||||||
|
import org.apache.solr.common.SolrException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles for keeping track of a Solr server and its cores
|
* Handles for keeping track of a Solr server and its cores
|
||||||
@ -533,12 +534,16 @@ public class Server {
|
|||||||
// probably caused by starting a connection as the server finishes
|
// probably caused by starting a connection as the server finishes
|
||||||
// shutting down)
|
// shutting down)
|
||||||
if (cause instanceof ConnectException || cause instanceof SocketException) { //|| cause instanceof NoHttpResponseException) {
|
if (cause instanceof ConnectException || cause instanceof SocketException) { //|| cause instanceof NoHttpResponseException) {
|
||||||
logger.log(Level.INFO, "Solr server is not running, cause: " + cause.getMessage());
|
logger.log(Level.INFO, "Solr server is not running, cause: {0}", cause.getMessage());
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
throw new KeywordSearchModuleException(
|
throw new KeywordSearchModuleException(
|
||||||
NbBundle.getMessage(this.getClass(), "Server.isRunning.exception.errCheckSolrRunning.msg"), ex);
|
NbBundle.getMessage(this.getClass(), "Server.isRunning.exception.errCheckSolrRunning.msg"), ex);
|
||||||
}
|
}
|
||||||
|
} catch (SolrException ex) {
|
||||||
|
// Just log 404 errors for now...
|
||||||
|
logger.log(Level.INFO, "Solr server is not running", ex);
|
||||||
|
return false;
|
||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
throw new KeywordSearchModuleException(
|
throw new KeywordSearchModuleException(
|
||||||
NbBundle.getMessage(this.getClass(), "Server.isRunning.exception.errCheckSolrRunning.msg2"), ex);
|
NbBundle.getMessage(this.getClass(), "Server.isRunning.exception.errCheckSolrRunning.msg2"), ex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user