0

I have installed the tomcat and solr(i.e solr-4.10.2) by following the tutorial

http://duntuk.com/how-install-apache-solr-46-apache-tomcat-7-use-drupal

I can successfully view the tomcat homepage using localhost:8983/ but when comes to

localhost:8983/solr/ and localhost:8983/solr/drupal Its giving me the 404 error

The below are the errors when Iam starting my tomcat server

    WARNING: A docBase /usr/local/tomcat/webapps/solr.war inside the host appBase has been specified, and will be ignored
    15 Dec, 2014 5:43:04 PM org.apache.catalina.startup.SetContextPropertiesRule begin
    WARNING: [SetContextPropertiesRule]{Context} Setting property 'debug' to '0' did not find a matching property.
   INFO: JSR 356 WebSocket (Java WebSocket 1.1) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocket JARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. 
    15 Dec, 2014 5:43:07 PM org.apache.tomcat.websocket.server.WsSci onStartup
    15 Dec, 2014 5:43:08 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Error filterStart
    15 Dec, 2014 5:43:08 PM org.apache.catalina.core.StandardContext startInternal
    SEVERE: Context [/solr] startup failed due to previous errors

I have even checked How to run Solr 4 in Tomcat locally?

and in my /usr/local/tomcat/lib contains the jar folders like

log4j-1.2.17.jar
jul-to-slf4j-1.7.6.jar
jcl-over-slf4j-1.7.6.jar
slf4j-api-1.7.6.jar
slf4j-log4j12-1.7.6.jar

and in /usr/local/tomcat/conf/Catalina/localhost/solr.xml this is the configuration I have used

<Context docBase="/usr/local/tomcat/webapps/solr.war" debug="0" crossContext="true">
  <Environment name="solr/home" type="java.lang.String" value="/usr/local/tomcat/solr" override="true" />
</Context>

Please help with the problem Thankyou

Community
  • 1
  • 1
Choco
  • 1,054
  • 1
  • 7
  • 20
  • take a look in this https://wiki.apache.org/solr/SolrLogging#Using_the_example_logging_setup_in_containers_other_than_Jetty – Federico Sierra Dec 15 '14 at 13:20
  • Thanks for ur reply @FedericoSierra I have looked it already That is what I did.But still getting the error.Even though the Jar files exist it is raising error. – Choco Dec 15 '14 at 14:18
  • Try you enable logging in the application, see http://stackoverflow.com/questions/3016808/tomcat-startup-logs-severe-error-filterstart-how-to-get-a-stack-trace some answers talk about this. – Federico Sierra Dec 15 '14 at 14:22
  • Hi I have Edited my code please check it I got a info that"WebSocket (Java WebSocket 1.1) support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocket JARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available. " Is the jar not able to reconize because of this – Choco Dec 16 '14 at 04:48

1 Answers1

0

Make sure that, both java and javac versions are same.

for that you need to check with these commands

java -version

javac-version

if both are not same, you should run this command

sudo apt-get install default-jre

after that you need to run this command

sudo apt-get install openjdk-7-jre

and set path by using this command

sudo update-alternatives --config java

then you will get output like this enter image description here

select version you have installed earlier i.e., type 2 there, because you have installed java-7.

Hope it will work.

Veeru
  • 348
  • 4
  • 13