38

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?

kenorb
  • 155,785
  • 88
  • 678
  • 743
kshama
  • 1,637
  • 4
  • 18
  • 21

10 Answers10

19

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.

Rapptz
  • 20,807
  • 5
  • 72
  • 86
disco crazy
  • 31,313
  • 12
  • 80
  • 83
11

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*

Mauricio Scheffer
  • 98,863
  • 23
  • 192
  • 275
  • 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 http://localhost:8983/solr/admin/ I got this again HTTP ERROR: 404 missing core name in path – kshama Feb 16 '10 at 06:52
  • 1
    See if you have a solr.xml file in your solr.home. It will have a line like `` – Mauricio Scheffer Feb 16 '10 at 12:24
  • yes,i found it.thank you; Actually i am trying dataimport as in http://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 http://localhost:8983/solr/ am getting http 500 Severe errors in solr configuration Is this because of mysql/ex ? – kshama Feb 17 '10 at 15:40
  • I have no idea but that's another question altogether. Please include the whole error message in the new question. – Mauricio Scheffer Feb 17 '10 at 15:48
4

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

Jeroen
  • 3,399
  • 1
  • 22
  • 25
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.

tarequeh
  • 1,799
  • 18
  • 18
3

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
Pierco
  • 79
  • 1
  • 4
1

I'm not use SolrCores, but:

After installing new solr version, I got error "HTTP ERROR: 404 missing core name in path" And http://xxx:8080/solr-tour/admin/cores was empty. (If you don't use solrCore, 1 entry is here normally)

I must stop tomcat, delete his localfiles, and start again

/etc/init.d/tomcat5 stop
rm -rf /usr/share/tomcat5/work/Catalina/localhost/*
rm -rf /usr/share/tomcat5/webapps/*
rm -rf /usr/share/tomcat5/logs/*
/etc/init.d/tomcat5 start
Himanshu
  • 31,810
  • 31
  • 111
  • 133
Dawe7
  • 11
  • 1
0

In my case it was happening due to versioning.

Earlier I was using solr 1.4.1. It was running fine. Then I installed solr 3.6.1 and was getting this error.

A folder named solr is there in the tomcat/webapps directory where you generally put the solr.war file.

  • Delete this solr folder
  • Start tomcat

=> Problem is gone.

Stephan
  • 41,764
  • 65
  • 238
  • 329
0

For me the problem was deeper, as I had not set up Solr correctly to begin with.

I followed the instructions here: http://wiki.apache.org/solr/SolrInstall

Basically, apart from just unzipping the solr.war war file to the webapps directory, you need to create a solr home directory (for which you can copy example/solr in the distribution you downloaded).

Then, as per happy-coding's suggestion, you can configure the web.xml file to point to this directory. Restart (if necessary), and voila!

mydoghasworms
  • 18,233
  • 11
  • 61
  • 95
0

My problem was in Tomcat Installed Dir\conf\Catalina\localhost\solr.xml

<Context docBase="C\:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\solr" debug="0" crossContext="true" >
   <Environment name="solr/home" type="java.lang.String" value="D:\\workspace\\common\\src\\test\\resources\\solr\\cores" override="true" />
</Context>

The cores folder path was wrong for me, as I moved the workspace from one machine to another.

Rikin Patel
  • 8,848
  • 7
  • 70
  • 78
Alexandru Pupsa
  • 1,798
  • 4
  • 21
  • 40
0

Hi I've got exactly this error when my solrconfig.xml was malformed (missing closing tag element ). It was for solr 3.5.0 Once I fixed the solrconfig the error went away.

szydan
  • 2,318
  • 1
  • 15
  • 16