Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solr setting location seems give problem #1

Closed
mccrodp opened this issue Feb 18, 2016 · 4 comments
Closed

Solr setting location seems give problem #1

mccrodp opened this issue Feb 18, 2016 · 4 comments

Comments

@mccrodp
Copy link

mccrodp commented Feb 18, 2016

I am getting the following when I run Docker Compose:

HTTP ERROR 500

Problem accessing /solr/. Reason:

    {msg=SolrCore 'collection1' is not available due to init failure: Could not load conf for core collection1: Error loading solr config from /opt/solr/example/solr/collection1/conf/solrconfig.xml

I place the apachesolr module from drupal.org in the same directory as the Dockerfile and the settings seem to copy over ok. However, when I ssh into the docker container it seems their is drupal config at both:

/opt/solr/ and /opt/solr-4.10.4/

Any ideas on this one?

solr@a69ccd61c2fc:/opt/solr/example/solr/collection1/conf$ cat schema.xml | grep drupal

@mparker17
Copy link
Owner

I will investigate this... it sounds like Drupal's Apache Solr Search module has updated their schema since I last worked on this image.

In the meantime, you should be able to get this image to build properly by issuing the following commands...

$ git clone --recursive https://github.com/mparker17/docker-solr-apachesolr.git
$ cd docker-solr-apachesolr
$ docker build -t solr-apachesolr .

Background...

I used Git Submodules to ensure that a specific revision of the Apache Solr Search Drupal module is used when adding files to the Docker container.

Git submodules are a little weird because they don't work properly unless you follow a very specific procedure... you either have to git clone --recursive from the beginning, or git submodule init && git submodule update if you didn't recursively clone. Also, frustratingly, if you fiddle with submodule-related stuff, it tends to break in non-trivial-to-debug-and-fix ways. (generally, I try to avoid submodules in favour of package managers like composer, but there are some very specific instances (like this one) when they are the best tool for the job).

While I'm updating the version of the Apache Solr Search module being used, I will also update the README to better explain how to clone / use this repository.

@mccrodp
Copy link
Author

mccrodp commented Feb 19, 2016

Again, thanks @mparker17 great info, especially the part on submodules, I actually didn't know about --recursive.

So, yea, the Drupal solr module > Solr compatibility is more complicated than I expected. It is a surprise that there would be a schema update using the same major version of Solr, but perhaps it is an incremental 4.x minor update...I thought they listed the version as 4.x rather than something specific like 4.10.4.

Anyways, good to know and I'll just use the submodule version you have included in future, unless a specific drupal solr module version is required and then I'll test with that. Thanks.

@mparker17
Copy link
Owner

@mccrodp I got a chance to update this image to:

  • use the Solr configuration in the latest commit to the apachesolr module's 7.x-1.x branch (commit 344c6d7),
  • Use Solr 5 (now that the apachesolr module contains Solr 5-compatible configuration)
  • Make it possible to change the name of the Solr core from collection1 to whatever you want it to be via the SOLR_CORE_NAME environment variable.

... at the time of writing, the Docker Hub has not yet picked up the change, and thus hasn't built a new image yet, but it should soon... https://hub.docker.com/r/mparker17/solr-apachesolr/

@mccrodp
Copy link
Author

mccrodp commented Feb 20, 2016

That's fantastic, many thanks for this, @mparker17. Will test it out soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants