edx-platform - Comments service error caused by auth user disappeared

This morning, the comments service of our OpenEdX instance stopped working. Noone could post comment or replied in a thread:



 Because the forum data is stored in mongodb, so I first try to look into that database, found out that the user I use for the comment service was disappeared?!! So, I tried to create that user and hopefully, the forum worked again:

1. Login to mongodb cli by typing in "mongo" in your linux console ( not sure how to do it in windows or MacOSX)

$ sudo mongo


2. In mongodb cli, switch to the forum db:

> use mydb


3. Check the existence of myuser user using for the forum service:

> show users



4. If there is no user names myuser, create one (mongodb 2.4, http://docs.mongodb.org/v2.4/reference/method/db.addUser/#db.addUser):

> db.addUser({user: "myuser", pwd: "mypassword", roles: ["readWrite", "dbAdmin"] })


5. You may have to restart the forum service (or even reboot the whole machine):

$ sudo /edx/bin/supervisorctl restart forum






Comments