Has anyone succesfully moved solrhome?

cancel
Showing results for 
Search instead for 
Did you mean: 
atTheBeach
Active Member II

Has anyone succesfully moved solrhome?

Jump to solution

None of the standard Solr methods for moving solrhome (the index directory) appear to work. I'm on alfresco-search-services-2.0.8.1.zip (ie. not Docker/etc), and I've tried various things, listed below. For all these, solr.log reports:

 

o.a.s.c.SolrCore null:org.alfresco.error.AlfrescoRuntimeException: 04090001 Failed to initialize keystore: 
   Location: /opt/alfresco-search-services/solrhome/keystore/ssl-repo-client.keystore

However, this is the default solrhome location, and the keystore is now in the new solrhome, which I've set as follows:

 

  1. Setting all of SOLR_HOME, SOLR_SSL_KEY_STORE, and SOLR_SSL_TRUST_STORE in solr.in.sh doesn't work; the new SOLR_HOME is ignored, and Solr expects the keystore to be in the default location shown in the error message above, and not in the locations set by the new SOLR_SSL_KEY_STORE and SOLR_SSL_TRUST_STORE
  2. In the systemd service file which runs Solr I've exported (ie. ENVIRONMENT=) the new SOLR_HOME; this is ignored
  3. In the service file I've passed 'solr.solr.home' as an additional option to 'solr/bin/solr' (with -a "-Dsolr.solr.home=/new/path/to/solrhome"); this is also ignored
  4. In the service file I've set the new solr.solr.home with the -s option (ie. 'solr/bin/solr start -s /new/path/to/solrhome ...'); this is also ignored

In all these cases Solr ignores the new SOLR_HOME, and creates a new default solrhome directory, and then fails to find the keystore in that new directory.

The next step is to directly modify solr/bin/solr to find out what's going on, but this could take some time - does anyone happen to know what the answer is?

 

 

1 Solution

Accepted Solutions
atTheBeach
Active Member II

Re: Has anyone succesfully moved solrhome?

Jump to solution

I figured this out. If you actually move solrhome, rather than letting Solr create it from scratch, there are 3 solrcore.properties files in it which contain hard-wired solrhome locations. If you manually edit these files and fix the locations, Solr will start normally.

Apart from that, setting SOLR_HOME, SOLR_SSL_KEY_STORE, and SOLR_SSL_TRUST_STORE in solr.in.sh is sufficient to do the move.

View solution in original post

3 Replies
angelborroy
Alfresco Employee

Re: Has anyone succesfully moved solrhome?

Jump to solution

Take a look at this: https://hub.alfresco.com/t5/news-announcements/tech-talk-live-157-slides-and-recording/ba-p/321141

We're doing regular sessions to clarify Community doubts.

You're modifying Jetty settings, but you need to modify Java settings.

Hyland Developer Evangelist
atTheBeach
Active Member II

Re: Has anyone succesfully moved solrhome?

Jump to solution

I figured this out. If you actually move solrhome, rather than letting Solr create it from scratch, there are 3 solrcore.properties files in it which contain hard-wired solrhome locations. If you manually edit these files and fix the locations, Solr will start normally.

Apart from that, setting SOLR_HOME, SOLR_SSL_KEY_STORE, and SOLR_SSL_TRUST_STORE in solr.in.sh is sufficient to do the move.

atTheBeach
Active Member II

Re: Has anyone succesfully moved solrhome?

Jump to solution

Hi Angel - nice presentation, thanks. I particularly like the nmap commands. The mTLS debugging kit looks like it could be really useful, but the whole Maven/Docker thing is just fantastically complicated, and I'm going to have to pass on it. Have you thought about rewriting everything in C++? Smiley Wink