localhost:8000 complains about "connection refused"

827 views
Skip to first unread message

Cay Horstmann

unread,
Sep 2, 2015, 1:05:33 AM9/2/15
to Open edX operations
I did a fresh install of the edX devstack, and started it with

sudo su edxapp
paver devstack lms

When I tried connecting to localhost:8000, I got the error below. What can I do to overcome that?

Thanks,

Cay

[Errno 111] Connection refused
Request Method:GET
Request URL:http://localhost:8000/
Django Version:1.4.22
Exception Type:ConnectionFailure
Exception Value:
[Errno 111] Connection refused
Exception Location:/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py in __init__, line 369
Python Executable:/edx/app/edxapp/venvs/edxapp/bin/python
Python Version:2.7.3
Python Path:
['.',
 '.',
 '/edx/app/edxapp/edx-platform',
 '/edx/app/edxapp/venvs/edxapp/src/xblock-poll',
 '/edx/app/edxapp/venvs/edxapp/src/edx-sga',
 '/edx/app/edxapp/venvs/edxapp/src/edx-user-state-client',
 '/edx/app/edxapp/venvs/edxapp/src/edx-reverification-block',
 '/edx/app/edxapp/venvs/edxapp/src/xblock-google-drive',
 '/edx/app/edxapp/venvs/edxapp/src/xblock-utils',
 '/edx/app/edxapp/venvs/edxapp/src/edx-milestones',
 '/edx/app/edxapp/venvs/edxapp/src/edx-search',
 '/edx/app/edxapp/venvs/edxapp/src/recommender-xblock',
 '/edx/app/edxapp/venvs/edxapp/src/edx-val',
 '/edx/app/edxapp/venvs/edxapp/src/oauth2-provider',
 '/edx/app/edxapp/venvs/edxapp/src/opaque-keys',
 '/edx/app/edxapp/venvs/edxapp/src/edx-submissions',
 '/edx/app/edxapp/venvs/edxapp/src/edx-ora2',
 '/edx/app/edxapp/venvs/edxapp/src/acid-xblock',
 '/edx/app/edxapp/venvs/edxapp/src/django-splash',
 '/edx/app/edxapp/venvs/edxapp/src/event-tracking',
 '/edx/app/edxapp/venvs/edxapp/src/js-test-tool',
 '/edx/app/edxapp/venvs/edxapp/src/codejail',
 '/edx/app/edxapp/venvs/edxapp/src/xblock',
 '/edx/app/edxapp/venvs/edxapp/src/ccx-keys',
 '/edx/app/edxapp/venvs/edxapp/src/parse-rest',
 '/edx/app/edxapp/venvs/edxapp/src/djpyfs',
 '/edx/app/edxapp/venvs/edxapp/src/edx-jsme',
 '/edx/app/edxapp/venvs/edxapp/src/pygeoip',
 '/edx/app/edxapp/venvs/edxapp/src/zendesk',
 '/edx/app/edxapp/venvs/edxapp/src/pystache-custom',
 '/edx/app/edxapp/venvs/edxapp/src/mongodb-proxy',
 '/edx/app/edxapp/venvs/edxapp/src/django-oauth2-provider',
 '/edx/app/edxapp/venvs/edxapp/src/django-wiki',
 '/edx/app/edxapp/venvs/edxapp/src/django-pipeline',
 '/edx/app/edxapp/edx-platform/common/lib/xmodule',
 '/edx/app/edxapp/edx-platform/common/lib/symmath',
 '/edx/app/edxapp/edx-platform/common/lib/sandbox-packages',
 '/edx/app/edxapp/edx-platform/common/lib/safe_lxml',
 '/edx/app/edxapp/edx-platform/common/lib/dogstats',
 '/edx/app/edxapp/edx-platform/common/lib/chem',
 '/edx/app/edxapp/edx-platform/common/lib/capa',
 '/edx/app/edxapp/edx-platform/common/lib/calc',
 '/edx/app/edxapp/venvs/edxapp/src/edx-organizations',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/plat-linux2',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/lib-tk',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/lib-old',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/lib-dynload',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages',
 '/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/newrelic-2.46.0.37',
 '/edx/app/edxapp/edx-platform',
 Path(u'/edx/app/edxapp/edx-platform'),
 Path(u'/edx/app/edxapp/edx-platform/lms/djangoapps'),
 Path(u'/edx/app/edxapp/edx-platform/common/djangoapps')]



frank

unread,
Sep 2, 2015, 1:53:47 AM9/2/15
to Open edX operations
hi cay,
   looks like the connection from lms to mongodb could not be established. make sure mongod is running.
   1. vagrant ssh
   2. sudo mongod --dbpath=/edx/var/mongo/mongodb

Eslam Mohamed Diaa

unread,
Sep 2, 2015, 8:58:03 AM9/2/15
to Open edX operations
Hello Cay,

Yes you should repair mongo and restart it

After vagrant ssh
sudo -i   >> to login as root
mongod  --repair -f /etc/mongod.conf
nohup mongod -f /etc/mongod.conf &

that's it ..

Cay Horstmann

unread,
Sep 2, 2015, 10:09:11 AM9/2/15
to Open edX operations
It works!

Thanks,

Cay

PS. This seems like a bug. It happened to myself and my graduate student. We were both doing a fresh install. Is it worth reporting? Where?

David Baumgold

unread,
Sep 2, 2015, 10:15:18 AM9/2/15
to opene...@googlegroups.com
Here’s the documentation for how to file bug reports: https://openedx.atlassian.net/wiki/display/SUST/How+to+File+a+Quality+Bug+Report
--
You received this message because you are subscribed to the Google Groups "Open edX operations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/2208d696-47ec-4284-b108-4554c4e853d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

gaurav k

unread,
Aug 4, 2017, 10:59:50 AM8/4/17
to Open edX operations
Hi David,

Edx cms re index not working - showing error - There were errors reindexing course. 
Need help .
Error  log -

OpenEDXv2 [service_variant=cms][elasticsearch][env:sandbox] WARNING [OpenEDXv2  42543] [base.py:82] - HEAD http://locahost:9200/courseware_index [status:N/A request:0.027s]
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 78, in perform_request
    response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 591, in urlopen
    raise MaxRetryError(self, url, e)
MaxRetryError: HTTPConnectionPool(host=u'locahost', port=9200): Max retries exceeded with url: /courseware_index (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
Aug  4 14:58:48 OpenEDXv2 [service_variant=cms][urllib3.connectionpool][env:sandbox] INFO [OpenEDXv2  42543] [connectionpool.py:257] - Starting new HTTP connection (2): locahost
Aug  4 14:58:48 OpenEDXv2 [service_variant=cms][elasticsearch][env:sandbox] WARNING [OpenEDXv2  42543] [base.py:82] - HEAD http://locahost:9200/courseware_index [status:N/A request:0.003s]
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 78, in perform_request
    response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 591, in urlopen
    raise MaxRetryError(self, url, e)
MaxRetryError: HTTPConnectionPool(host=u'locahost', port=9200): Max retries exceeded with url: /courseware_index (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
Aug  4 14:58:48 OpenEDXv2 [service_variant=cms][urllib3.connectionpool][env:sandbox] INFO [OpenEDXv2  42543] [connectionpool.py:257] - Starting new HTTP connection (3): locahost
Aug  4 14:58:48 OpenEDXv2 [service_variant=cms][elasticsearch][env:sandbox] WARNING [OpenEDXv2  42543] [base.py:82] - HEAD http://locahost:9200/courseware_index [status:N/A request:0.003s]
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 78, in perform_request
    response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 591, in urlopen
    raise MaxRetryError(self, url, e)
MaxRetryError: HTTPConnectionPool(host=u'locahost', port=9200): Max retries exceeded with url: /courseware_index (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
Aug  4 14:58:48 OpenEDXv2 [service_variant=cms][urllib3.connectionpool][env:sandbox] INFO [OpenEDXv2  42543] [connectionpool.py:257] - Starting new HTTP connection (4): locahost
Aug  4 14:58:48 OpenEDXv2 [service_variant=cms][elasticsearch][env:sandbox] WARNING [OpenEDXv2  42543] [base.py:82] - HEAD http://locahost:9200/courseware_index [status:N/A request:0.003s]
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 78, in perform_request
    response = self.pool.urlopen(method, url, body, retries=False, headers=self.headers, **kw)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/urllib3/connectionpool.py", line 591, in urlopen
    raise MaxRetryError(self, url, e)
MaxRetryError: HTTPConnectionPool(host=u'locahost', port=9200): Max retries exceeded with url: /courseware_index (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)
Aug  4 14:58:48 OpenEDXv2 [service_variant=cms][root][env:sandbox] ERROR [OpenEDXv2  42543] [exceptions.py:17] - Uncaught exception from <class 'django.core.handlers.wsgi.WSGIHandler'>
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 45, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/course.py", line 317, in course_search_index_handler
    reindex_course_and_check_access(course_key, request.user)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/course.py", line 133, in reindex_course_and_check_access
    return CoursewareSearchIndexer.do_course_reindex(modulestore(), course_key)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 377, in do_course_reindex
    return cls._do_reindex(modulestore, course_key)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 284, in _do_reindex
    indexed_count = cls.index(modulestore, structure_key)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 139, in index
    searcher = SearchEngine.get_search_engine(cls.INDEX_NAME)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/search/search_engine_base.py", line 50, in get_search_engine
    return search_engine_class(index=index) if search_engine_class else None
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/search/elastic.py", line 275, in __init__
    if not self._es.indices.exists(index=self.index_name):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 69, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/client/indices.py", line 224, in exists
    params=params)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 307, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 89, in perform_request
    raise ConnectionError('N/A', str(e), e)
ConnectionError: ConnectionError(HTTPConnectionPool(host=u'locahost', port=9200): Max retries exceeded with url: /courseware_index (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)) caused by: MaxRetryError(HTTPConnectionPool(host=u'locahost', port=9200): Max retries exceeded with url: /courseware_index (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known))
Aug  4 14:58:48 OpenEDXv2 [service_variant=cms][django.request][env:sandbox] ERROR [OpenEDXv2  42543] [base.py:256] - Internal Server Error: /course/course-v1:Microsoft+DAT206x+2017/search_reindex
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 145, in inner
    return func(*args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", line 22, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 110, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/views/decorators/http.py", line 45, in inner
    return func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/course.py", line 317, in course_search_index_handler
    reindex_course_and_check_access(course_key, request.user)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/views/course.py", line 133, in reindex_course_and_check_access
    return CoursewareSearchIndexer.do_course_reindex(modulestore(), course_key)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 377, in do_course_reindex
    return cls._do_reindex(modulestore, course_key)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 284, in _do_reindex
    indexed_count = cls.index(modulestore, structure_key)
  File "/edx/app/edxapp/edx-platform/cms/djangoapps/contentstore/courseware_index.py", line 139, in index
    searcher = SearchEngine.get_search_engine(cls.INDEX_NAME)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/search/search_engine_base.py", line 50, in get_search_engine
    return search_engine_class(index=index) if search_engine_class else None
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/search/elastic.py", line 275, in __init__
    if not self._es.indices.exists(index=self.index_name):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/client/utils.py", line 69, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/client/indices.py", line 224, in exists
    params=params)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/transport.py", line 307, in perform_request
    status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/elasticsearch/connection/http_urllib3.py", line 89, in perform_request
    raise ConnectionError('N/A', str(e), e)
ConnectionError: ConnectionError(HTTPConnectionPool(host=u'locahost', port=9200): Max retries exceeded with url: /courseware_index (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known)) caused by: MaxRetryError(HTTPConnectionPool(host=u'locahost', port=9200): Max retries exceeded with url: /courseware_index (Caused by <class 'socket.gaierror'>: [Errno -2] Name or service not known))
Reply all
Reply to author
Forward
0 new messages