3

djangoアプリ(haystackを使用)のdotcloudでsolrを実行していますが、問題が発生しています。管理者にアクセスしようとすると、404「パスにコア名がありません」というメッセージが表示されますが、私が知る限り、コアは1つしかありません。

これが私の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> 

ブラウザを.../solr / collection1 / adminに向けても、まだ何もありません。しかし、コアが1つしかないので、... / solr / adminに移動できるようにすべきではありませんか?

haystackの「入門チュートリアル」とdotcloudsolrサービスのドキュメントの手順に従いました。

私の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

そして、インタプリタでテストしようとするとエラーが発生します。

    >>> 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)

エラー出力に「理由:なし」と表示されているのは特に面白いと思います:-P

おそらく関連性もあります。

どんな助けでも大歓迎です。solr / haystack / dotcloud / everythingを含む完全なnewb!

4

1 に答える 1

1

解決しました。

それは私のdotcloud.ymlファイルの問題になってしまいました。

于 2011-08-22T16:57:53.420 に答える