0

I create a core in solr 5.3 using haystack for my django application and try to do python manage.py rebuild_index, it just gives this error message. The part /update/?commit=true looks strange for me. I try to manually change it to /update?commit=true, but still does not work. In browser, it just says 404. Anyone has any idea on it? Thanks!

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

MC X
  • 337
  • 4
  • 16

1 Answers1

0

Any part after a # in a standard HTTP URL is an anchor, and meant for consumtion on the client. Therefor it's never being transmitted to the server, which means that you end up making a request to http://localhost:8983/solr/ - which probably isn't the URL you want to query.

Just http://localhost:8983/solr/my_core/update?commit=true should work.

MatsLindh
  • 49,529
  • 4
  • 53
  • 84
  • Thanks MatsLindh! I think I figured out what happened. Since I work on a Docker container, the ip should be the Docker container's ip not localhost. Just changed the localhost to Docker's ip, and it works fine now. Thanks! – MC X Oct 02 '15 at 23:48