I've installed readthedocs locally accorging to this manual: http://docs.readthedocs.io/en/latest/install.html#installing-read-the-docs
This manual is completed by me on Debian VM, up to and including "building documentation for pip"
(I've managed to download it as epub and it seems correct)
BUT!
I was expecting (don't know why, but it is not mentioned explicitly that this will not be working) that the "Search" function will be .. functioning.
Actually, I get an error like this:
ConnectionError at /projects/pip/search/
ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f33d42e5710>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f33d42e5710>: Failed to establish a new connection: [Errno 111] Connection refused)
Request Method: GET
Request URL: http://127.0.0.1:8000/projects/pip/search/?q=Pypa
Django Version: 1.8.3
Exception Type: ConnectionError
Exception Value:
ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f33d42e5710>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f33d42e5710>: Failed to establish a new connection: [Errno 111] Connection refused)
Exception Location: /home/marchuk/rtd/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py in perform_request, line 85
Python Executable: /home/marchuk/rtd/bin/python
Python Version: 2.7.8
Python Path:
['/home/marchuk/rtd/checkouts/readthedocs.org',
'/home/marchuk/rtd/lib/python2.7',
'/home/marchuk/rtd/lib/python2.7/plat-x86_64-linux-gnu',
'/home/marchuk/rtd/lib/python2.7/lib-tk',
'/home/marchuk/rtd/lib/python2.7/lib-old',
'/home/marchuk/rtd/lib/python2.7/lib-dynload',
'/usr/lib/python2.7',
'/usr/lib/python2.7/plat-x86_64-linux-gnu',
'/usr/lib/python2.7/lib-tk',
'/home/marchuk/rtd/local/lib/python2.7/site-packages',
'/home/marchuk/rtd/checkouts/readthedocs.org']
Server time: Fri, 1 Jul 2016 04:44:27 -0500
every time I try to perform a search
Sounds like you aren't running elasticsearch. The error looks odd, I'd expect port numbers there. Can you edit with error pasted as a code block, not a quoted comment?
Also:
This bug is being marked as community effort. The core team will try to facilitate resolution with this issue, but without the resources to support external installations outside of our production environment, we must rely on the community to help.
You can read more information on our philosophy around supporting Read the Docs as an open source and volunteer run effort here:
http://docs.readthedocs.io/en/latest/open-source-philosophy.html
Sounds like you aren't running elasticsearch
Should I ? It is not mentioned on the page. Maybe the docs are lacking..
@62mkv To build the project locally, you will need to pip install the requirements.txt file -- see README pip install -r requirements.txt https://github.com/rtfd/readthedocs.org/blob/master/requirements/pip.txt and requirements file.
This file includes elasticsearch among the dependencies.
I think the documentation should explicitly mention Elasticsearch, Redis (and possibly PostgreSQL too). It would also be good to add a link to http://docs.readthedocs.io/en/latest/rtfd.html?highlight=elasticsearch#elastic-search-setup
This could be a good task for new contributors.
Hey, can I take up this bug? I am a newbie
Is this still an issue? I can take it.
Hi @JosemyD, yes, this is still needs to be addressed. You find the installation document at https://github.com/rtfd/readthedocs.org/blob/master/docs/install.rst.
Hello! I have installed the project locally according to docs.readthedocs.io/en/latest/install.html#installing-read-the-docs.
I am still getting this as an issue whenever I use search from home page.
The exact error is something like this:
Request Method: GET
Request URL: http://127.0.0.1:8000/search/?q=python
File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
149. response = self.process_exception_by_middleware(e, request)
File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
147. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/readthedocs/search/views.py" in elastic_search
49. request, user_input.query, language=user_input.language)
File "/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/readthedocs/search/lib.py" in search_project
49. return ProjectIndex().search(body)
File "/home/shubham/virtualenv/rtd/checkouts/readthedocs.org/readthedocs/search/indexes.py" in search
208. body=body, **kwargs)
File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/elasticsearch/client/utils.py" in _wrapped
69. return func(*args, params=params, **kwargs)
File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/elasticsearch/client/__init__.py" in search
504. params=params, body=body)
File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/elasticsearch/transport.py" in perform_request
307. status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/home/shubham/virtualenv/rtd/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py" in perform_request
85. raise ConnectionError('N/A', str(e), e)
Exception Type: ConnectionError at /search/
Exception Value: ConnectionError(<urllib3.connection.HTTPConnection object at 0x7f7718481c90>: Failed to establish a new connection: [Errno 111] Connection refused) caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f7718481c90>: Failed to establish a new connection: [Errno 111] Connection refused
I am a newbie here trying to understand the code so that I can contribute. Thanks for the help!
@shubham76 you need to setup elasticsearch to get the search working (this isn't mandatory to start contributing or for your builds)
You can check this PR with some improvements on the installation guide https://github.com/rtfd/readthedocs.org/pull/3631
@stsewd Okay! I don't think I am going to use search for now. I will leave this aside then!
Thanks for your help! :)
Most helpful comment
I think the documentation should explicitly mention Elasticsearch, Redis (and possibly PostgreSQL too). It would also be good to add a link to http://docs.readthedocs.io/en/latest/rtfd.html?highlight=elasticsearch#elastic-search-setup
This could be a good task for new contributors.