0

I've tried various tutorials and I get a 404 error when I finally navigate to host:port/solr on my CentOS machine.

Can anyone tell me why I would get a 404?

Once I find a solution I'll make this the official tutorial on how to install Apache Solr on a CentOS 6 / Tomcat6 configuration. In the meantime, there is very little documentation out there...


Tomcat6 Configuration (Source)

yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps

vi /usr/share/tomcat6/conf/tomcat6.conf
JAVA_HOME="/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/"

Additionally, I've added an admin and manager role user in /etc/tomcat6/tomcat-users.xml


/usr/share/tomcat6/conf/Catalina/localhost/solr.xml

<Context docBase="/data/solr/solr.war" debug="0" privileged="true" allowLinking="true" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/data/solr" override="true" />
</Context>
3
  • Can you outline the configuration that you've applied to Tomcat thus far? Feb 23, 2012 at 16:25
  • My Tomcat configuration appears to be minimal (see edit)
    – AlxVallejo
    Feb 23, 2012 at 16:47
  • Also for the way the files are setup, see this page: newpush.com/2011/10/…
    – AlxVallejo
    Feb 23, 2012 at 17:11

1 Answer 1

0

You must configure Tomcat to actually point to the Solr instance.

See Solr's example in their documentation:

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/opt/solr/example/solr/solr.war" debug="0" crossContext="true">
  <Environment name="solr/home" type="java.lang.String" value="/opt/solr/example/solr" override="true"/>
</Context>

This should be placed in $CATALINA_HOME/conf/Catalina/localhost/solr.xml, and adjust the paths for your install locations.

14
  • This is awesome, and I'll def. accept this, but now I see that I'm getting a 500 error in my solr configuration. screencast.com/t/K9TKDqNI
    – AlxVallejo
    Feb 23, 2012 at 17:38
  • It's trying to create the directory /usr/share/tomcat/solr/data/index and failing - what's your solr/home configured to be? Feb 23, 2012 at 17:41
  • 1
    @AlxVallejo, What user is running Tomcat? Make sure that user has permissions to the solr/home directory.
    – HTTP500
    Feb 23, 2012 at 17:49
  • @HTTP500, I simply created a new user in the tomcat-users.xml
    – AlxVallejo
    Feb 23, 2012 at 18:05
  • @ShaneMadden, my solr/home is at /data/solr/
    – AlxVallejo
    Feb 23, 2012 at 18:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .