skip to Main Content

I installed apache solr on CentOS 7 to follow this link https://computingforgeeks.com/install-apache-solr-on-centos-fedora/

After Completing installation, solr status is

enter image description here

After running this command

sudo systemctl enable solr

Show below message

solr.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig solr on

I ran the command to create testcollection.

sudo su - solr -c "/opt/solr/bin/solr create -c testcollection -n data_driven_schema_configs"

After running the command, error is showing below

ERROR: Error CREATEing SolrCore 'testcollection': Unable to create core [tpcollection3] Caused by: null

Can I get any suggestion for creating collection or core successfully.
Question are

1. Why cannot enable solr on centos 7?
2. Why cannot create collection or core?

2

Answers


  1. Chosen as BEST ANSWER

    Actually I solved to follow another way.

    You can extract your desired directory. I made a directory /solr

    mkdir /solr
    

    Download latest version solr from latest release of Apache Solr

    Extract it

    tar -xvf solr-8.2.0.tgz 
    

    Add a User

    useradd solr
    

    Give permission

    chown -R solr:solr solr-8.2.0
    

    Go to your created user

    su - solr
    

    Go to Extracted solr bin file

     cd solr-8.2.0/bin
    

    Start Solr, check solr status and create solr core Or collection

    ./solr start  
    ./solr status
    ./solr create -c testcollection -n data_driven_schema_configs 
    

    You will see your created collection or core successful message.

    Created new core 'testcollection'
    

    1. /sbin/chkconfig solr on is a command fallback to systemctl enable solr, it achieves the same task that is to enable Solr at startup. That said, there is a service installation script that should help install Solr as a service : /opt/solr/bin/install_solr_service.sh.

    2. Ensure you have set the right permissions on Solr directories and restart Solr, also I don’t think you need the sudo su part :

      chown -R solr:solr /var/solr/
      ./solr restart
      ./solr create -c testcollection
      
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search