HTTP ERROR: 404 missing core name in path with solr

54,025

Solution 1

I've gotten the same error:

HTTP ERROR: 404 missing core name in path

In my case I've forgotten so set the solr/home value in the WEB-INF/web.xml file

<env-entry>
   <env-entry-name>solr/home</env-entry-name>
   <env-entry-value>/put/your/solr/home/here</env-entry-value>
   <env-entry-type>java.lang.String</env-entry-type>
</env-entry>

After I've added the above code and restarted the server, the error was gone.

Solution 2

You probably have a multi-core setup and haven't included the core in the URL. e.g. instead of requesting http://localhost:8983/solr/select/?q=*%3A* you have to request http://localhost:8983/solr/MyCoreName/select/?q=*%3A*

Solution 3

If you just browse to http://localhost:8983/solr/ you will see all cores listed (at least that did it for me).

Solution 4

Just to keep a note here, if you deleted all files from your solr/data/index directory but left the directory alone and started getting this error, then stop solr, delete the solr/data/index directory and restart. Solr will create the index directory again. For some reason solr will give you this error if it finds the index directory but not the initial stuff it expects in there.

Solution 5

In my case, it was happening due to a previous installation of Solr. So I had to delete my old core directory:

rm -rf /var/lib/solr/mycorename 

then recreate the directory with correct permissions:

sudo mkdir -p /var/lib/solr/mycorename/data
sudo chown -R jetty:jetty /var/lib/solr/mycorename/data
Share:
54,025
kshama
Author by

kshama

Updated on March 21, 2020

Comments

  • kshama
    kshama over 4 years

    I am new to Solr, after installing it in ubuntu 8.10, when I was trying exampledocs to index , as per this link, I got this error:

    HTTP ERROR: 404 missing core name in path

    This is in Jetty.

    What shall I do, in order to solve this?

  • kshama
    kshama over 14 years
    Hi Mauricio Scheffer, sorry for late response. How do i find out whether i have multicore setup or not? Is this something to do with multicore folder. when i tried localhost:8983/solr/admin I got this again HTTP ERROR: 404 missing core name in path
  • Mauricio Scheffer
    Mauricio Scheffer over 14 years
    See if you have a solr.xml file in your solr.home. It will have a line like <core name="MyCoreName" instanceDir="core0" />
  • kshama
    kshama over 14 years
    yes,i found it.thank you; Actually i am trying dataimport as in wiki.apache.org/solr/DataImportHandler#datasource(uses hsqldb) But my database is mysql , In db-dat-config.xml i have to use datasource url="jdbc:mysql:./example-DIH/mysql/ex how do i get ex files as in hsqldb? when i used localhost:8983/solr am getting http 500 Severe errors in solr configuration Is this because of mysql/ex ?
  • Mauricio Scheffer
    Mauricio Scheffer over 14 years
    I have no idea but that's another question altogether. Please include the whole error message in the new question.
  • jpetazzo
    jpetazzo almost 13 years
    Incidentally, if the solr/home is empty (i.e. if you forgot to put the solr.xml and conf/* files there) you can also get this error message.
  • Jsandesu
    Jsandesu almost 13 years
    Also, remember to uncomment the <env-entry> block.
  • Matt Morley - MPCM
    Matt Morley - MPCM about 12 years
    Your post helped a lot! Thank you.
  • Josh
    Josh almost 10 years
    I had the exact same problem. Been tearing my hair out for a week solid trying to get it to work. Thanks so much for posting this.