can't connect to solr server when rebuilding index for django haystack

I am getting the following error:

Failed to add documents to Solr: Failed to connect to server at 'http://example.com/:8983/solr/update/?commit=true', are you sure that URL is correct? Checking it in a browser might help: HTTPConnectionPool(host='example.com', port=80): Max retries exceeded with url: /:8983/solr/update/?commit=true (Caused by : [Errno 111] Connection refused)

I can hit the commit=true address which returns this xml: 在这里输入图像描述

I can hit the solr admin with no problem: 在这里输入图像描述

I have opened all ports in my security group especially 8983 and 80.

Here is my settings entry:

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.solr_backend.SolrEngine',
        'URL': 'http://example.com/:8983/solr',
        'TIMEOUT': 60 * 5,
    },
}

Why can't I connect to rebuild the index?


The problem was here:

'URL': 'http://example.com/:8983/solr',

It should be this:

'URL': 'http://example.com:8983/solr',
链接地址: http://www.djcxy.com/p/67038.html

上一篇: 即使提交后,Apache solr索引数据也不可见

下一篇: django haystack重建索引时无法连接到solr服务器