English 中文(简体)
Solr Admin not found: "missing core name in path"
原标题:

I m running solr on dotcloud for my django app (using haystack) and am running into some trouble. I receive a 404 "missing core name in path" message when trying to access the admin, despite the fact that--as far as I can tell--I only have a single core.

Here is my schema.xml:

    <?xml version="1.0" encoding="UTF-8" ?>

    <solr persistent="false"> 

      <!-- 
      adminPath: RequestHandler path to manage cores.   
        If  null  (or absent), cores will not be manageable via request handler 
      --> 
      <cores adminPath="/admin/cores" defaultCoreName="collection1"> 
       <core name="collection1" instanceDir="." shard="shard1"/> 
      </cores> 
    </solr> 

When I point my browser at .../solr/collection1/admin, still nothing. But since I ve only got a single core shouldn t I just be able to go to .../solr/admin?

I ve followed the steps on the haystack "getting started tutorial" as well as the dotcloud solr service docs.

The relevant code in my settings.py:

    HAYSTACK_SITECONF =  gigmash.search_sites 
    HAYSTACK_SEARCH_ENGINE =  solr 
    HAYSTACK_SOLR_URL =  http://35543365.dotcloud.com/solr  #provided by dotcloud
    HAYSTACK_INCLUDE_SPELLING = True
    HAYSTACK_SEARCH_RESULTS_PER_PAGE = 10

And here s the error I get when I try and test in the interpreter:

    >>> from haystack.query import SearchQuerySet
    >>> sqs = SearchQuerySet().all()
    >>> sqs.count()
    Failed to query Solr using  *:* : [Reason: None]
    java.lang.NullPointerException  at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:91)   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)   at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)  at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:297) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)    at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)  at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

I find it especially amusing that my error output says "reason: none" :-P

Perhaps also relevant: despite having run ./manage.py build_solr_schema and ./manage.py rebuild_index (and having rebuild index (accurately) report the number of models indexed), a data/ directory has not been created in my solr/ directory.

Any help would be greatly appreciated. Total newb with solr/haystack/dotcloud/everything!

最佳回答

Solved.

It ended up being an issue with my dotcloud.yml file.

问题回答

暂无回答




相关问题
How to get two random records with Django

How do I get two distinct random records using Django? I ve seen questions about how to get one but I need to get two random records and they must differ.

Moving (very old) Zope/Plone Site to Django

I am ask to move data from a (now offline) site driven by Plone to a new Django site. These are the version informations I have: Zope Version (unreleased version, python 2.1.3 ) Python Version 2.1....

Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

Flexible pagination in Django

I d like to implement pagination such that I can allow the user to choose the number of records per page such as 10, 25, 50 etc. How should I go about this? Is there an app I can add onto my project ...

is it convenient to urlencode all next parameters? - django

While writing code, it is pretty common to request a page with an appended "next" query string argument. For instance, in the following template code next points back to the page the user is on: &...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

热门标签