Reputation: 1716
I have downloaded Solr 3.5.0. After unzipping I cd into solr\example and then run java -jar start.jar. The following message comes up:
Logging to STDERR via org.mortbay.log.StdErrLog jetty-6.1-SNAPSHOT Started [email protected]:8983
If I then go to http://localhost:8983/ in my browser I get an error:
Error 404 - Not Found. No context on this server matched or handled this request. Contexts known to this server are:
With nothing under the contexts.
If I go to http://localhost:8983/solr/admin I then get
HTTP ERROR: 404
Problem accessing /solr/admin. Reason:
NOT_FOUND
Powered by Jetty://
I am on a Windows7 machine if that helps. What am I doing wrong?
Upvotes: 19
Views: 49933
Reputation: 51
If you downloaded the source-version of Solr you need to run ant example
to get the example code installed...
Would have been nice, if it were mentioned in the README ;o)
Upvotes: 4
Reputation: 1
HDP 2.2.4
1: Stop ambari server
2:
VERSION=hdp-select status hadoop-client | sed 's/hadoop-client - \([0-9]\.[0-9]\).*/\1/'
sudo git clone https://github.com/abajwa-hw/solr-stack.git /var/lib/ambari-server/resources/stacks/HDP/$VERSION/services/SOLR
3: comment Directory and File in lines 28 thru 42 and 61 thru 67 vi var/lib/ambari-server/resources/stacks/HDP/2.2/services/SOLR/package/scripts/master.py Comment out “Directory”
3: Before Install: mkdir -p /var/log/solr
mkdir -p /var/run/solr
mkdir -p /opt/solr
chown -R solr:solr
4: Restart ambari
5: Follow Install Solr service — https://github.com/abajwa-hw/solr-stack
6: After Install ONLY: su - solr
cd /opt/solr
ln -s /opt/solr/solr latest
mkdir -p /opt/solr/latest/server/solr/resources
7: Start Solr now FROM AMBARI (actually this IS NOT WORKING - the below manual start.jar is working) or cd /opt/solr/latest/example [solr@sandbox example]$ java -jar start.jar
8: Solr INSTALL and RUN logs /var/log/solr/solr-install.log
Upvotes: 0
Reputation: 156
I had a similar problem. The Solr quick start guide says to run: bin/solr start -e cloud -noprompt
So I ran the command from Solr root directory. But I couldn't connect to Solr Admin UI on http://localhost:8983/solr/. I got this error: curl: (7) Failed to connect to localhost port 8983: Connection refused
I solved this using ianckc suggestion. First make sure you have a .war file in example/webapps
and then run java -jar start.jar
from example
directory.
Upvotes: 0
Reputation: 374
I just had the same problem, you download apache-solr-3.5.0-src.tgz, but instead you want to use apache-solr-3.5.0.tgz or apache-solr-3.5.0.zip
apache-solr-3.5.0.tgz includes apache-solr-3.5.0/example/webapps/solr.war
Upvotes: 2
Reputation: 60205
The first error is normal, you should go to http://localhost:8983/solr/
instead of http://localhost:8983
. In fact the only web application running within jetty is contained in the solr.war
, so you need to add the solr
context to access it.
Then you should see the Solr welcome page where you can click on the Solr Admin
link, which perhaps should point to the location you already tried: http://localhost:8983/solr/admin
.
Anyway, when you try to access to http://localhost:8983/ Jetty should list the available contexts, but don't have any context on your list, while I have /solr ---> org.mortbay.jetty.webapp.WebAppContext etc.
. This means the solr webapp is not starting correctly.
Upvotes: 21