I have downloaded solr from here and untar'd it. Then went to the example directory in apache-solr-3.1.0/solr/example
and ran this command
java -jar start.jar
But when I open http://localhost:8983/solr/admin/
it shows like this
HTTP ERROR: 404 Problem accessing /solr/admin/.
Reason:
NOT_FOUND
Powered by Jetty://
I'm using Ubuntu 11.04. Why this problem is coming?
mkdir work
java -jar start.jar
It seems that Jetty will use the
work
directory if it exists, otherwise it uses/tmp
I've been experiencing this issue as well and finally found the details and resolution to the matter. The issue (as I understand) is specific to using Jetty as your servlet container.
The cause is that Jetty will place some files in the OS's
/tmp
directory--and occasionally the OS will delete them. In this scenario your admin pages will start returning 404's with the exception you've mentioned, but all searches and queries continue to execute as normal.The solution is simple: creating a
work
subdirectory underneath yourjetty.home
folder (a runtime variable) will solve the problem. Jetty will see thework
folder and will place temporary files in that location rather than in/tmp
. The OS doesn't manage this location and therefore won't delete files that are still in use.There is a bug report detailing this issue and resolution filed at: https://issues.apache.org/jira/browse/SOLR-118
If your install is running mostly with the defaults, then Jetty's work files are probably in /tmp where they may have been wiped.
Stop and restart Solr after creating a $(jetty.home)/work directory and you should stop seeing the 404s.
It is probably better to ask for help on a different forum, because the problem you have does not seem to have any connection with ubuntu.
Anyway, one of the first hits on google brings me to: http://lucene.472066.n3.nabble.com/Adding-the-suggest-component-td2694982.html Try running:
prior to
java -jar start.jar
I also had this problems and finally solved it with using version from here http://archive.apache.org/dist/lucene/solr/3.5.0/ but only when I downloaded zip version. No Idea why.