1

作为我之前遇到的这个问题的后续:(mongo_connector.py 通常需要多长时间?

我想知道在运行以下命令时是否有其他人遇到过这个问题:

$ python /usr/local/lib/python2.7/dist-packages/mongo-connector/mongo_connector.py -m localhost:27017 --docManager /usr/local/lib/python2.7/dist-packages/mongo-connector/doc_managers/solr_doc_manager.py -t http://localhost:8080/solr4

这是我得到的错误输出:

2012-08-20 10:24:11,893 - INFO - Beginning Mongo Connector
2012-08-20 10:24:12,971 - INFO - Starting new HTTP connection (1): localhost
2012-08-20 10:24:12,974 - INFO - Finished 'http://localhost:8080/solr4/update/?commit=true' (post) with body 'u'<commit ' in 0.017 seconds.
2012-08-20 10:24:12,983 - ERROR - [Reason: /solr4/update/]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/mongo-connector/mongo_connector.py", line 441, in <module>
    auth_username=options.admin_name)
  File "/usr/local/lib/python2.7/dist-packages/mongo-connector/mongo_connector.py", line 100, in __init__
    unique_key=u_key)
  File "/usr/local/lib/python2.7/dist-packages/mongo-connector/doc_managers/solr_doc_manager.py", line 54, in __init__
    self.run_auto_commit()
  File "/usr/local/lib/python2.7/dist-packages/mongo-connector/doc_managers/solr_doc_manager.py", line 95, in run_auto_commit
    self.solr.commit()
  File "/usr/local/lib/python2.7/dist-packages/pysolr.py", line 802, in commit
    return self._update(msg, waitFlush=waitFlush, waitSearcher=waitSearcher)
  File "/usr/local/lib/python2.7/dist-packages/pysolr.py", line 359, in _update
    return self._send_request('post', path, message, {'Content-type': 'text/xml; charset=utf-8'})
  File "/usr/local/lib/python2.7/dist-packages/pysolr.py", line 293, in _send_request
    raise SolrError(error_message)
pysolr.SolrError: [Reason: /solr4/update/]

原因:[原因:/solr4/update/] 并不是我什至可以开始调试的输出。Solr 运行良好,MongoDB 运行良好。这个问题可能是由什么引起的?

到目前为止,我一直在遵循此页面上的说明:http: //loutilities.wordpress.com/2012/11/26/complementing-mongodb-with-real-time-solr-search/#comment-183。我还在各种网站上看到,将以下内容添加到我的 Solr 的 solrconfig.xml 应该可以访问“更新”,但这已经在我的系统上进行了配置:

<requestHandler name="/update" class="solr.XmlUpdateRequestHandler">

这就是我掌握的所有信息。关于我可能做错了什么的任何提示?

4

0 回答 0