1

I am running CKAN v2.7.2 over HTTPs using Apache and have configured Nginx-reverse proxy to access CKAN.Thus,I am accessing CKAN using Nginx only.

All the three components (CKAN,Apache,Nginx are running on docker).

The CKAN page is being loaded however,I get the following error logs in apache ckan_default.conf.error.log

raise ConnectionError(e, request=request)
[wsgi:error] [pid 93:tid 139753652762368] ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/ckan/select/?s

ERROR [pysolr] Failed to connect to server at 
'http://127.0.0.1:8983/solr/ckan/select/?sort=score+desc%2C+metadata

Traceback (most recent call last):
File "/usr/lib/ckan/default/lib/python2.7/site-packages/pysolr.py", line 366, in _send_request
File "/usr/lib/ckan/default/lib/python2.7/site-packages/requests/sessions.py", line 501, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/requests/sessions.py", line 488, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/requests/sessions.py", line 609, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/ckan/default/lib/python2.7/site-packages/requests/adapters.py", line 487, in send
raise ConnectionError(e, request=request)
ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8983): Max retries exceeded with url: /solr/ckan/s
  • What's your production.ini file have for the solr url? solr_url=http://127.0.0.1:8983/solr? Actually, maybe you don't modify this from a docker install? – user3366016 Dec 20 '18 at 18:21
  • In production.ini I have solr_url = 127.0.0.1:8983/solr/ckan – argg Dec 21 '18 at 1:50
1

You cannot reach solr from ckan because they are running in two different container on the same virtual network.

If you run a container, a bridged network will be created by default.

$ hostname -i
::1 127.0.0.1
$ docker run --rm alpine hostname -i
172.17.0.2

If container share the same network (like when you usually run containers with docker-compose, you can connect from one to the other using the name of the last one.

In your case, you should probably connect to http://solr:8983/solr/ckan.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.