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

ConnectionError: [Errno 111] Connection refused when running django-admin set_staff #400

Closed
natea opened this issue Jul 14, 2013 · 1 comment

Comments

@natea
Copy link

natea commented Jul 14, 2013

When running the rake django-admin["set_staff ] command, an error occurs when trying to contact the comments service. It appears that the user is still given the proper permission, but perhaps this hook should check to see that the comment service is properly configured before attempting to make a connection to it.

(edx-platform)vagrant@precise32:/opt/edx/edx-platform$ rake django-admin["set_staff natea"]
phantomjs not found on path. Set $PHANTOMJS_PATH. Using browser for jasmine tests
django-admin.py set_staff natea --traceback --settings=lms.envs.dev --pythonpath=. 
2013-07-12 14:35:38,928 DEBUG 15716 [django.db.backends] util.py:50 - (0.003) SELECT "auth_user"."id", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."password", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."username" = natea ; args=('natea',)
2013-07-12 14:35:38,934 DEBUG 15716 [django.db.backends] util.py:50 - (0.000) SELECT (1) AS "a" FROM "auth_user" WHERE "auth_user"."id" = 1  LIMIT 1; args=(1,)
2013-07-12 14:35:38,936 DEBUG 15716 [django.db.backends] util.py:50 - (0.000) UPDATE "auth_user" SET "username" = natea, "first_name" = , "last_name" = , "email" = naune@edx.org, "password" = pbkdf2_sha256$10000$QjztFsTHu2Pb$rgkQLxaZ2twzW6AmFCfvmw5s6f9g68Ue6Kgh/ZJk8Tk=, "is_staff" = True, "is_active" = False, "is_superuser" = False, "last_login" = 2013-07-12 18:35:20.846662, "date_joined" = 2013-07-12 18:35:20.614442 WHERE "auth_user"."id" = 1 ; args=(u'natea', u'', u'', u'naune@edx.org', u'pbkdf2_sha256$10000$QjztFsTHu2Pb$rgkQLxaZ2twzW6AmFCfvmw5s6f9g68Ue6Kgh/ZJk8Tk=', True, False, False, u'2013-07-12 18:35:20.846662', u'2013-07-12 18:35:20.614442', 1)
2013-07-12 14:35:38,952 INFO 15716 [requests.packages.urllib3.connectionpool] connectionpool.py:191 - Starting new HTTP connection (1): localhost
2013-07-12 14:35:38,958 INFO 15716 [comment_client.utils] utils.py:44 - Deleting API key from params
2013-07-12 14:35:38,959 ERROR 15716 [comment_client.utils] utils.py:47 - Trying to call put on http://localhost:4567/api/v1/users/1 with params {'username': u'natea', 'external_id': '1', 'email': u'naune@edx.org'}
Traceback (most recent call last):
  File "/opt/edx/edx-platform/lms/lib/comment_client/utils.py", line 38, in perform_request
    response = requests.request(method, url, data=data_or_params, timeout=5)
  File "/home/vagrant/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/requests/safe_mode.py", line 39, in wrapped
    return function(method, url, **kwargs)
  File "/home/vagrant/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/requests/api.py", line 51, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/vagrant/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/requests/sessions.py", line 241, in request
    r.send(prefetch=prefetch)
  File "/home/vagrant/.virtualenvs/edx-platform/local/lib/python2.7/site-packages/requests/models.py", line 634, in send
    raise ConnectionError(sockerr)
ConnectionError: [Errno 111] Connection refused
2013-07-12 14:35:38,970 ERROR 15716 [mitx.discussion] models.py:778 - '[Errno 111] Connection refused'
2013-07-12 14:35:38,971 ERROR 15716 [mitx.discussion] models.py:779 - update user info to discussion failed for user with id: 1
Success!
@jzoldak
Copy link
Contributor

jzoldak commented Aug 8, 2013

Changes to the user table on the django app tries to keep the user table on the discussion side in sync. There is a feature flag for this - ENABLE_DISCUSSION_SERVICE. Set that to False in your settings.py file and you should be all set.

@jzoldak jzoldak closed this as completed Aug 8, 2013
chrisrossi pushed a commit to jazkarta/edx-platform that referenced this issue Mar 31, 2014
Sujeet1379 pushed a commit to chandrudev/edx-platform that referenced this issue Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants