Skip to content
Snippets Groups Projects
Unverified Commit b55a3882 authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #6753 from eugene7646/release-4.18.0

Potential NPE fix in SU Solr logic (7343)
parents 8418223a edb24ce0
No related branches found
No related tags found
No related merge requests found
...@@ -671,9 +671,18 @@ private HttpSolrClient configureMultiUserConnection(Case theCase, Index index, S ...@@ -671,9 +671,18 @@ private HttpSolrClient configureMultiUserConnection(Case theCase, Index index, S
"Server.status.failed.msg=Local Solr server did not respond to status request. This may be because the server failed to start or is taking too long to initialize.",}) "Server.status.failed.msg=Local Solr server did not respond to status request. This may be because the server failed to start or is taking too long to initialize.",})
synchronized void startLocalSolr(SOLR_VERSION version) throws KeywordSearchModuleException, SolrServerNoPortException, SolrServerException { synchronized void startLocalSolr(SOLR_VERSION version) throws KeywordSearchModuleException, SolrServerNoPortException, SolrServerException {
logger.log(Level.INFO, "Starting local Solr " + version + " server"); //NON-NLS
if (version == SOLR_VERSION.SOLR8) {
localSolrFolder = InstalledFileLocator.getDefault().locate("solr", Server.class.getPackage().getName(), false); //NON-NLS
} else {
// solr4
localSolrFolder = InstalledFileLocator.getDefault().locate("solr4", Server.class.getPackage().getName(), false); //NON-NLS
}
if (isLocalSolrRunning()) { if (isLocalSolrRunning()) {
if (localServerVersion.equals(version)) { if (localServerVersion.equals(version)) {
// this version of local server is already running // this version of local server is already running
logger.log(Level.INFO, "Local Solr " + version + " server is already running"); //NON-NLS
return; return;
} else { } else {
// wrong version of local server is running, stop it // wrong version of local server is running, stop it
...@@ -715,12 +724,10 @@ synchronized void startLocalSolr(SOLR_VERSION version) throws KeywordSearchModul ...@@ -715,12 +724,10 @@ synchronized void startLocalSolr(SOLR_VERSION version) throws KeywordSearchModul
try { try {
if (version == SOLR_VERSION.SOLR8) { if (version == SOLR_VERSION.SOLR8) {
logger.log(Level.INFO, "Starting Solr 8 server"); //NON-NLS logger.log(Level.INFO, "Starting Solr 8 server"); //NON-NLS
localSolrFolder = InstalledFileLocator.getDefault().locate("solr", Server.class.getPackage().getName(), false); //NON-NLS
curSolrProcess = runLocalSolr8ControlCommand(new ArrayList<>(Arrays.asList("start", "-p", //NON-NLS curSolrProcess = runLocalSolr8ControlCommand(new ArrayList<>(Arrays.asList("start", "-p", //NON-NLS
Integer.toString(localSolrServerPort)))); //NON-NLS Integer.toString(localSolrServerPort)))); //NON-NLS
} else { } else {
// solr4 // solr4
localSolrFolder = InstalledFileLocator.getDefault().locate("solr4", Server.class.getPackage().getName(), false); //NON-NLS
logger.log(Level.INFO, "Starting Solr 4 server"); //NON-NLS logger.log(Level.INFO, "Starting Solr 4 server"); //NON-NLS
curSolrProcess = runLocalSolr4ControlCommand(new ArrayList<>( curSolrProcess = runLocalSolr4ControlCommand(new ArrayList<>(
Arrays.asList("-Dbootstrap_confdir=../solr/configsets/AutopsyConfig/conf", //NON-NLS Arrays.asList("-Dbootstrap_confdir=../solr/configsets/AutopsyConfig/conf", //NON-NLS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment