Devstack hawthorn Open edX install on ubuntu VM

make requirements one command firstly i have to run so how it is done with python env please help

@Rohan_Singh you might want to activate your environment first and then run the command i.e

  1. source /path/to/python/env/activate
  2. make requirements
2 Likes

ok thanks basically this is uses for installing openedx devstack so make requirement cmd is not working if i run it under env activated so can you elaborate please thanks in advanced @Paul_Aswa

First, ensure you environment is runing on python 3.5. Then, could you post the error you are getting?

1 Like

both python3 and python2 is installed so should i make python3 default only for that i think i have to completely delete python2 ? is it right @Paul_Aswa

—> pavelib.servers.update_db
—> pavelib.prereqs.install_prereqs
—> pavelib.prereqs.install_node_prereqs
—> pavelib.prereqs.install_python_prereqs
—> pavelib.prereqs.uninstall_python_packages
pip freeze > /edx/app/edxapp/edx-platform/test_root/log/pip_freeze.log
NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE=devstack_docker /edx/bin/edxapp-migrate-lms --traceback --pythonpath=.

Build failed running pavelib.servers.update_db: Subprocess return code: 1
make: *** [Makefile:44 : dev.provision.run] Erreur 1

Can anyone help me to solve the problem please ?

@Paul_Aswa i stuck here and http://localhost:18000/ port for lms is not opening after type cmd ‘sudo make dev.up’ please help

@Rohan_Singh You have posted multiple times, in multiple threads, pinging many people, all about the same issue - please don’t do that, it creates a lot of unnecessary noise on the forum. It can be frustrating to have an issue, but this isn’t going to get it solved faster - if anything, it might make people who could help you hesitate to reply to you, for fear of getting spammed in turn… Remember that the help we all provide on the forum is on a volunteer basis.

1 Like

@antoviaque sure sorry for that

1 Like

Avoid using your system’s python environment - use a separate environment (you can use Poetry to manage different environments). In this specific case, you need to ensure that it is a python 3.5 environment. Once you have the environment set up, activate it first and afterwards you can proceed with running the installation commands. With this setup, you may not need sudo for any command.

Also note that the lms may take some time to run even after make dev.up has exited.

1 Like

ok @Paul_Aswa thaku for information i am trying it .

(env) rohan@rohan:~ sudo apt update Hit:1 https://download.docker.com/linux/ubuntu xenial InRelease Hit:2 http://in.archive.ubuntu.com/ubuntu xenial InRelease Hit:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease Hit:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease Get:5 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB] Fetched 109 kB in 2s (50.9 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 39 packages can be upgraded. Run 'apt list --upgradable' to see them. (env) rohan@rohan:~ make requirements
make: *** No rule to make target ‘requirements’. Stop.
(env) rohan@rohan:~ sudo make requirements make: *** No rule to make target 'requirements'. Stop. (env) rohan@rohan:~

i also have to install pip in activated env @Paul_Aswa

(venv) rohan@rohan:~/vir_env/devstack$ sudo docker-compose restart
Restarting edx.devstack.forum …
Restarting edx.devstack.edx_notes_api …
Restarting edx.devstack.discovery …
Restarting edx.devstack.forum … done
Restarting edx.devstack.edx_notes_api … done
Restarting edx.devstack.discovery … done
Restarting edx.devstack.firefox … done
Restarting edx.devstack.ecommerce … done
Restarting edx.devstack.chrome … done
Restarting edx.devstack.credentials … done
Restarting edx.devstack.studio … done
Restarting edx.devstack.lms … done
Restarting edx.devstack.mongo … done
Restarting edx.devstack.devpi … done
^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^[[B^(venv) rohan@rohan:~/vir_env/devstack$ sudo make dev.provision ./repo.sh clone The [course-discovery] repo is already checked out. Continuing.
The [credentials] repo is already checked out. Continuing.
The [cs_comments_service] repo is already checked out. Continuing.
The [ecommerce] repo is already checked out. Continuing.
The [edx-e2e-tests] repo is already checked out. Continuing.
The [edx-notes-api] repo is already checked out. Continuing.
The [edx-platform] repo is already checked out. Continuing.
The [xqueue] repo is already checked out. Continuing.
The [edx-analytics-pipeline] repo is already checked out. Continuing.
DOCKER_COMPOSE_FILES="-f docker-compose.yml -f docker-compose-host.yml" ./provision.sh

  • RED=’\033[0;31m’
  • GREEN=’\033[0;32m’
  • YELLOW=’\033[0;33m’
  • NC=’\033[0m’
  • docker-compose up -d mysql mongo
    edx.devstack.mongo is up-to-date
    edx.devstack.mysql is up-to-date
  • echo ‘Waiting for MySQL’
    Waiting for MySQL
  • docker exec -i edx.devstack.mysql mysql -uroot -se ‘SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = ‘’‘root’’’)’
  • sleep 20
  • echo -e ‘MySQL ready’
    MySQL ready
  • echo -e ‘\033[0;32mCreating databases and users…\033[0m’
    Creating databases and users…
  • docker exec -i edx.devstack.mysql mysql -uroot mysql
  • docker exec -i edx.devstack.mongo mongo
    MongoDB shell version: 3.2.16
    connecting to: test
    connection to 127.0.0.1
    [
    {
    “user” : “admin”,
    “pwd” : “password”,
    “roles” : [
    “root”
    ],
    “database” : “admin”
    },
    {
    “user” : “cs_comments_service”,
    “pwd” : “password”,
    “roles” : [
    “readWrite”
    ],
    “database” : “cs_comments_service”
    },
    {
    “user” : “edxapp”,
    “pwd” : “password”,
    “roles” : [
    “readWrite”
    ],
    “database” : “edxapp”
    }
    ]
    bye
  • ./provision-lms.sh
    ++ apps=(lms studio)
    ++ ./load-db.sh edxapp
    Loading the edxapp database…
    Finished loading the edxapp database!
    ++ ./load-db.sh edxapp_csmh
    Loading the edxapp_csmh database…
    Finished loading the edxapp_csmh database!
    ++ for app in ‘"{apps[@]}"' ++ docker-compose -f docker-compose.yml -f docker-compose-host.yml up -d lms edx.devstack.mongo is up-to-date edx.devstack.devpi is up-to-date edx.devstack.memcached is up-to-date edx.devstack.mysql is up-to-date edx.devstack.lms is up-to-date ++ for app in '"{apps[@]}"’
    ++ docker-compose -f docker-compose.yml -f docker-compose-host.yml up -d studio
    edx.devstack.mysql is up-to-date
    edx.devstack.mongo is up-to-date
    edx.devstack.devpi is up-to-date
    edx.devstack.memcached is up-to-date
    edx.devstack.studio is up-to-date
    ++ docker-compose exec lms bash -c ‘source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && NO_PYTHON_UNINSTALL=1 paver install_prereqs’
    —> pavelib.prereqs.install_prereqs
    —> pavelib.prereqs.install_node_prereqs
    Node prereqs unchanged, skipping…
    —> pavelib.prereqs.install_python_prereqs
    —> pavelib.prereqs.uninstall_python_packages
    NO_PYTHON_UNINSTALL is set. No attempts will be made to uninstall old Python libs.
    Python prereqs unchanged, skipping…
    pip freeze > /edx/app/edxapp/edx-platform/test_root/log/pip_freeze.log


++ docker-compose restart lms
Restarting edx.devstack.lms … done
++ docker-compose exec lms bash -c ‘source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && paver update_db --settings devstack_docker’
—> pavelib.servers.update_db
—> pavelib.prereqs.install_prereqs
—> pavelib.prereqs.install_node_prereqs
Node prereqs unchanged, skipping…
—> pavelib.prereqs.install_python_prereqs
—> pavelib.prereqs.uninstall_python_packages
NO_PYTHON_UNINSTALL is set. No attempts will be made to uninstall old Python libs.
Python prereqs unchanged, skipping…
pip freeze > /edx/app/edxapp/edx-platform/test_root/log/pip_freeze.log



NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE=devstack_docker /edx/bin/edxapp-migrate-lms --traceback --pythonpath=.
2021-03-04 23:08:53,063 WARNING 84 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/newrelic/console.py:84: DeprecationWarning: formatargspec is deprecated since Python 3.5. Use signature and the Signature object directly
prototype = wrapper.name[3:] + ’ ’ + inspect.formatargspec(

2021-03-04 23:08:53,204 WARNING 84 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/edx-platform/lms/djangoapps/course_wiki/plugins/markdownedx/wiki_plugin.py:7: DeprecationWarning: ‘etree’ is deprecated. Use ‘xml.etree.ElementTree’ instead.
from lms.djangoapps.course_wiki.plugins.markdownedx import mdx_mathjax, mdx_video

2021-03-04 23:08:55,357 WARNING 84 [py.warnings] [user None] [ip None] warnings.py:109 - /edx/app/edxapp/venvs/edxapp/src/django-wiki/wiki/plugins/links/wiki_plugin.py:9: DeprecationWarning: ‘etree’ is deprecated. Use ‘xml.etree.ElementTree’ instead.
from wiki.plugins.links.mdx.djangowikilinks import WikiPathExtension

Traceback (most recent call last):
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 217, in ensure_connection
self.connect()
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 195, in connect
self.connection = self.get_new_connection(conn_params)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/mysql/base.py”, line 227, in get_new_connection
return Database.connect(**conn_params)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (2005, “Unknown MySQL server host ‘edx.devstack.mysql57’ (22)”)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “manage.py”, line 123, in
execute_from_command_line([sys.argv[0]] + django_args)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/init.py”, line 381, in execute_from_command_line
utility.execute()
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/init.py”, line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/base.py”, line 323, in run_from_argv
self.execute(*args, **cmd_options)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/base.py”, line 361, in execute
self.check()
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/base.py”, line 387, in check
all_issues = self._run_checks(
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/management/commands/migrate.py”, line 64, in _run_checks
issues = run_checks(tags=[Tags.database])
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/checks/registry.py”, line 72, in run_checks
new_errors = check(app_configs=app_configs)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/checks/database.py”, line 10, in check_database_backends
issues.extend(conn.validation.check(**kwargs))
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/mysql/validation.py”, line 9, in check
issues.extend(self._check_sql_mode(**kwargs))
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/mysql/validation.py”, line 13, in _check_sql_mode
with self.connection.cursor() as cursor:
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 256, in cursor
return self._cursor()
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 233, in _cursor
self.ensure_connection()
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 217, in ensure_connection
self.connect()
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/utils.py”, line 89, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 217, in ensure_connection
self.connect()
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/base/base.py”, line 195, in connect
self.connection = self.get_new_connection(conn_params)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/db/backends/mysql/base.py”, line 227, in get_new_connection
return Database.connect(**conn_params)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/MySQLdb/init.py”, line 130, in Connect
return Connection(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/MySQLdb/connections.py”, line 185, in init
super().init(*args, **kwargs2)
django.db.utils.OperationalError: (2005, “Unknown MySQL server host ‘edx.devstack.mysql57’ (22)”)

Captured Task Output:

—> pavelib.servers.update_db
—> pavelib.prereqs.install_prereqs
—> pavelib.prereqs.install_node_prereqs
—> pavelib.prereqs.install_python_prereqs
—> pavelib.prereqs.uninstall_python_packages
pip freeze > /edx/app/edxapp/edx-platform/test_root/log/pip_freeze.log
NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE=devstack_docker /edx/bin/edxapp-migrate-lms --traceback --pythonpath=.

Build failed running pavelib.servers.update_db: Subprocess return code: 1
Makefile:44: recipe for target ‘dev.provision.run’ failed
make: *** [dev.provision.run] Error 1
(venv) rohan@rohan:~/vir_env/devstack$ sudo make dev.up
docker-compose -f docker-compose.yml -f docker-compose-host.yml up -d
edx.devstack.chrome is up-to-date
edx.devstack.memcached is up-to-date
edx.devstack.mysql is up-to-date
edx.devstack.elasticsearch is up-to-date
edx.devstack.firefox is up-to-date
edx.devstack.devpi is up-to-date
edx.devstack.mongo is up-to-date
edx.devstack.credentials is up-to-date
edx.devstack.ecommerce is up-to-date
edx.devstack.discovery is up-to-date
edx.devstack.edx_notes_api is up-to-date
edx.devstack.studio is up-to-date
edx.devstack.lms is up-to-date
edx.devstack.forum is up-to-date
./programs/provision.sh cache >/dev/null
(venv) rohan@rohan:~/vir_env/devstack$

1 Like