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 version < 5 doesn't read solr cores from the correct path #57

Closed
Rade333 opened this issue Jan 24, 2017 · 4 comments
Closed

Solr version < 5 doesn't read solr cores from the correct path #57

Rade333 opened this issue Jan 24, 2017 · 4 comments
Labels

Comments

@Rade333
Copy link
Contributor

Rade333 commented Jan 24, 2017

When installing Solr version 4.10.4 with the latest release of this role, Solr doesn't read the solr cores from the correct path, which would be {{ solr_home }} (defaults to /var/solr).

Rather the cores are read from /opt/solr/node1/solr, that is from the solr install path. See screenshot from the solr admin tool:
Alt text

I'm using geerlingguy/ubuntu1604 vagrant box, ansible 2.2.0.0 and release 3.4.2 of this role.

My playbook is

---
- hosts: all
  sudo: yes
  vars:
    solr_version: "4.10.4"
    solr_cores:
      - common
  roles:
    - geerlingguy.java
    - geerlingguy.solr
  post_tasks:
    - name: Remove default core
      file:
        path: "{{ solr_home }}/collection1"
        state: absent
      when: solr_cores is defined

    - name: Create solr core paths
      file:
        path: "{{ solr_home }}/{{ item }}"
        state: directory
        owner: "{{ solr_user }}"
        group: "{{ solr_user }}"
      with_items: "{{ solr_cores }}"
      when: solr_cores is defined

    - name: Copy solr core configs
      copy:
        src: "solr-cores/{{ item }}/"
        dest: "{{ solr_home }}/{{ item }}"
        owner: "{{ solr_user }}"
        group: "{{ solr_user }}"
      with_items: "{{ solr_cores }}"
      notify: restart solr
      when: solr_cores is defined

The core I'm using looks like this
Alt text

core.properties:

name=common

The conf dir is identical to the one from Drupal's search_api_solr module, http://cgit.drupalcode.org/search_api_solr/tree/solr-conf/4.x

@Rade333
Copy link
Contributor Author

Rade333 commented Jan 24, 2017

With the changes from #56:

Alt text

@geerlingguy
Copy link
Owner

Makes sense; for my own servers I'm actually using a different method of getting the path set up for multiple cores... so that's why I've missed this. I'll try to review and get this working better for < 5!

@stale
Copy link

stale bot commented Mar 6, 2020

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Mar 6, 2020
@stale
Copy link

stale bot commented Apr 5, 2020

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@stale stale bot closed this as completed Apr 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants