could not connect to localhost:27017: [Errno 111] Connection refused

9,331 views
Skip to first unread message

Ian Flitman

unread,
Oct 2, 2014, 6:11:53 AM10/2/14
to opene...@googlegroups.com
Moving this newer problem to its own thread..
When I do paver devstack lms and open up localhost:8000 I get the following connection refused error:

ConnectionFailure at /

could not connect to localhost:27017: [Errno 111] Connection refused
Request Method: GET
Request URL: http://localhost:8000/
Django Version: 1.4.14
Exception Type: ConnectionFailure
Exception Value:
could not connect to localhost:27017: [Errno 111] Connection refused
Exception Location: /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/pymongo/mongo_client.py in __init__, line 274
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/djpyfs',
 '/edx/app/edxapp/venvs/edxapp/src/django-staticfiles',
 '/edx/app/edxapp/venvs/edxapp/src/django-pipeline',
 '/edx/app/edxapp/venvs/edxapp/src/django-wiki',
 '/edx/app/edxapp/venvs/edxapp/src/lettuce',
 '/edx/app/edxapp/venvs/edxapp/src/pystache-custom',
 '/edx/app/edxapp/venvs/edxapp/src/zendesk',
 '/edx/app/edxapp/venvs/edxapp/src/django-ipware',
 '/edx/app/edxapp/venvs/edxapp/src/pygeoip',
 '/edx/app/edxapp/venvs/edxapp/src/edx-jsme',
 '/edx/app/edxapp/venvs/edxapp/src/xblock',
 '/edx/app/edxapp/venvs/edxapp/src/codejail',
 '/edx/app/edxapp/venvs/edxapp/src/diff-cover',
 '/edx/app/edxapp/venvs/edxapp/src/js-test-tool',
 '/edx/app/edxapp/venvs/edxapp/src/django-waffle',
 '/edx/app/edxapp/venvs/edxapp/src/event-tracking',
 '/edx/app/edxapp/venvs/edxapp/src/edx-analytics-data-api-client',
 '/edx/app/edxapp/venvs/edxapp/src/bok-choy',
 '/edx/app/edxapp/venvs/edxapp/src/django-splash',
 '/edx/app/edxapp/venvs/edxapp/src/acid-xblock',
 '/edx/app/edxapp/venvs/edxapp/src/edx-ora2',
 '/edx/app/edxapp/venvs/edxapp/src/opaque-keys',
 '/edx/app/edxapp/venvs/edxapp/src/ease',
 '/edx/app/edxapp/venvs/edxapp/src/i18n-tools',
 '/edx/app/edxapp/edx-platform/common/lib/calc',
 '/edx/app/edxapp/edx-platform/common/lib/capa',
 '/edx/app/edxapp/edx-platform/common/lib/chem',
 '/edx/app/edxapp/edx-platform/common/lib/sandbox-packages',
 '/edx/app/edxapp/edx-platform/common/lib/symmath',
 '/edx/app/edxapp/edx-platform/common/lib/xmodule',
 '/edx/app/edxapp/venvs/edxapp/src/django-oauth2-provider',
 '/edx/app/edxapp/venvs/edxapp/src/oauth2-provider',
 '/edx/app/edxapp/venvs/edxapp/src/edx-val',
 '/edx/app/edxapp/edx-platform/common/lib/safe_lxml',
 '/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.18.1.15',
 '/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info',
 '/edx/app/edxapp/venvs/edxapp/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info',
 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'),
 path(u'/edx/app/edxapp/edx-platform/common/lib')]
Server time: Thu, 2 Oct 2014 05:51:54 -0400




I checked that port 8000 was free by doing a netstat -nptl command before and after halting and upping the vagrant box. And it is free for edx.
After three days plus of trying with the kifli devstack, this is getting exhausting and preventing us from starting development...anyone?

David Baumgold

unread,
Oct 2, 2014, 9:37:14 AM10/2/14
to opene...@googlegroups.com
That looks like an error with connecting to MongoDB. Can you verify that mongod is running on the VM?
--
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.
For more options, visit https://groups.google.com/d/optout.

Ignacio Piqueras Salazar

unread,
Oct 2, 2014, 10:25:45 AM10/2/14
to opene...@googlegroups.com
It seems something went wrong with mongodb, maybe VM wasn't properly closed with vagrant halt. If you haven't tried this solution yet, I think it could help. I didn't  need steps 4 and 5 in the past but maybe it's more convenient if you do it. Good luck.

1. vagrant up
2. vagrant ssh
3. sudo rm /edx/var/mongo/mongodb/mongod.lock
4. sudo mongod -repair --config /etc/mongodb.conf
5. sudo chown -R mongodb:mongodb /edx/var/mongo/mongodb/.
6. sudo start mongodb



El dijous 2 d’octubre de 2014 12:11:53 UTC+2, Ian Flitman va escriure:

Ian Flitman

unread,
Oct 3, 2014, 3:58:49 AM10/3/14
to opene...@googlegroups.com
Dear David and Dear Ignacio,

Mongo was the problem. Thank you so much for responding with the correct advice. I followed all the steps Ignacio advised and hey presto, it worked. Now I can begin to get into platform properly now, I hope, and satisfy the integration concerns with the university here.


best
ian
Message has been deleted

Randy Ostler

unread,
Mar 5, 2015, 4:55:32 PM3/5/15
to opene...@googlegroups.com
4. sudo mongod -repair --config /etc/mongodb.conf
the correct conf file is /etc/mongod.conf

Thanks for the solution.   
Message has been deleted

Usman Pervaiz

unread,
Mar 12, 2015, 3:23:27 AM3/12/15
to opene...@googlegroups.com
AOA I want to ask something i installed EDX on ubuntu 12.04 accurately EDX studio, Django admin all accessable now but i need to see Database Structure like phpmyadmin How can i access that i tried this 127.0.0.1:27017 but it shows that "it looks like you are trying to access monogodb over http on the native driver port" and i run the command in terminal "vagrant up" terminal shows that the program is not currently installed . i'm confused here i just want to access database on localhost can you tell me how to do that.. ?

Ed Zarecor

unread,
Mar 12, 2015, 7:57:32 AM3/12/15
to opene...@googlegroups.com
Usman,

This looks like a phpmyadmin problem and the error message says it all.  You can verify that mongo is running correctly by using the mongo command line client.

Ed
(e0d on github)

Usman Pervaiz

unread,
Mar 13, 2015, 1:16:34 AM3/13/15
to opene...@googlegroups.com
Hey Ed,

Thanks for your reply. This happened when i run the mongo command on ternminal

usman@usman-OptiPlex-330:~$ sudo mongo
MongoDB shell version: 2.6.8
connecting to: test
Server has startup warnings:
2015-03-13T10:10:11.805+0500 [initandlisten]
2015-03-13T10:10:11.805+0500 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
2015-03-13T10:10:11.805+0500 [initandlisten] **       32 bit builds are limited to less than 2GB of data (or less with --journal).
2015-03-13T10:10:11.805+0500 [initandlisten] **       See http://dochub.mongodb.org/core/32bit
2015-03-13T10:10:11.805+0500 [initandlisten]
>


--
You received this message because you are subscribed to a topic in the Google Groups "Open edX operations" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openedx-ops/vu50rTbb3BA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openedx-ops...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages