Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locally installed readthedocs #2281

Closed
62mkv opened this issue Jul 1, 2016 · 11 comments
Closed

locally installed readthedocs #2281

62mkv opened this issue Jul 1, 2016 · 11 comments
Assignees
Labels
Community Effort Good First Issue Good for new contributors

Comments

@62mkv
Copy link

62mkv commented Jul 1, 2016

Details

  • Project URL:
  • Build URL (if applicable):
  • Read the Docs username (if applicable):

Expected Result

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.

Actual Result

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

@agjohnson
Copy link
Contributor

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?

@agjohnson
Copy link
Contributor

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

@62mkv
Copy link
Author

62mkv commented Jul 15, 2016

Sounds like you aren't running elasticsearch

Should I ? It is not mentioned on the page. Maybe the docs are lacking..

@willingc
Copy link
Contributor

@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.

@berkerpeksag
Copy link
Member

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.

@berkerpeksag berkerpeksag added the Good First Issue Good for new contributors label Jul 28, 2016
@SubhrajyotiSen
Copy link

Hey, can I take up this bug? I am a newbie

@JosemyDuarte
Copy link

Is this still an issue? I can take it.

@berkerpeksag
Copy link
Member

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.

@shubham76
Copy link
Contributor

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!

@stsewd
Copy link
Member

stsewd commented Feb 19, 2018

@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 #3631

@shubham76
Copy link
Contributor

@stsewd Okay! I don't think I am going to use search for now. I will leave this aside then!
Thanks for your help! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Effort Good First Issue Good for new contributors
Projects
None yet
Development

No branches or pull requests

9 participants