Skip to content

Re install Open edX in Ubuntu 12.04

dangtrinh edited this page Sep 10, 2014 · 5 revisions

Officially, you should only run the bootstrap script to install Open edX production stack on a freshly installed Ubuntu server, because it will potentially destroy the server It is run on. Actually, you can do a re-installation of the Open edX stack on the same server with an extra effort. There will be a couple of issues you need to solve in order to move forward. Here are some of them:

1. MySQL error:

TASK: [edxlocal | create a database for edxapp] *******************************

failed: [localhost] => {"failed": true, "item": ""}

msg: unable to connect, check login_user and login_password are correct, or alternatively check ~/.my.cnf contains credentials

This means that your server has already been installed mysql server and have a different login privilege from the default. => To fix this error, create the /root/.my.cnf file with the following content:

[client]

user=root

password=<your root pass>

[mysql]

user=root

password=<your root pass>

[mysqldump]

user=root

password=<your root pass>

[mysqldiff]

user=root

password=<your root pass>

2. If the process fail at importing demo course step:

=> remove/comment out the demo role from /var/tmp/configuration/playbooks/edx_sandbox.yml (because you don't need this course)

=> re-run the installation script:

# sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," --limit @/root/edx_sandbox.retry

3. If fail at installing xqueue's "install python post-requirements" step:

=> source to the xqueue virtualenv:

# source /edx/app/xqueue/venvs/xqueue/bin/activate

=> Install the post-requirements:

(xqueue)# pip install -r /edx/app/xqueue/xqueue/requirements.txt

=> Restart xqueue:

# /edx/bin/supervisorctl restart xqueue xqueue_consumer

=> remove/comment out this step from xqueue's /var/tmp/configuration/playbooks/roles/xqueue/tasks/deploy.yml

=> re-run the installation script:

# sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost," --limit @/root/edx_sandbox.retry

So, to be concluded, if you get any error when re-installing the Open edX stack, just read the error messages carefully and then check out the Ansible playbooks for that specific portion (roles), you will find out the solution to fix that issue.