· 6 years ago · Oct 23, 2019, 09:50 AM
1==================================================
2 Interactive platform configuration
3==================================================
4Your website domain name for students (LMS) [lms.helloprof.com]
5Your website domain name for teachers (CMS) [studio.lms.helloprof.com]
6Your platform name/title [My Open edX]
7Your public contact email address [frederique@helloprof.com]
8The default language code for the platform [en]
9Activate SSL/TLS certificates for HTTPS access? Important note: this will NOT work in a development environment. [y/N]
10Configuration saved to /Users/fred/Library/Application Support/tutor/config.yml
11================================================
12 Updating the current environment
13================================================
14Environment generated in /Users/fred/Library/Application Support/tutor/env
15==============================================
16 Stopping any existing platform
17==============================================
18docker-compose -f /Users/fred/Library/Application Support/tutor/env/local/docker-compose.yml --project-name tutor_local rm --stop --force
19No stopped containers
20=============================================
21 HTTPS certificates generation
22=============================================
23HTTPS is not activated: certificate generation skipped
24======================================================
25 Starting the platform in detached mode
26======================================================
27docker-compose -f /Users/fred/Library/Application Support/tutor/env/local/docker-compose.yml --project-name tutor_local up --remove-orphans -d
28Creating network "tutor_local_default" with the default driver
29Creating tutor_local_openedx-assets_1 ... done
30Creating tutor_local_rabbitmq_1 ... done
31Creating tutor_local_mysql_1 ... done
32Creating tutor_local_mongodb_1 ... done
33Creating tutor_local_memcached_1 ... done
34Creating tutor_local_elasticsearch_1 ... done
35Creating tutor_local_smtp_1 ... done
36Creating tutor_local_forum_1 ... done
37Creating tutor_local_cms_1 ... done
38Creating tutor_local_lms_1 ... done
39Creating tutor_local_cms_worker_1 ... done
40Creating tutor_local_lms_worker_1 ... done
41Creating tutor_local_nginx_1 ... done
42================================================
43 Database creation and migrations
44================================================
45Initialising all services...
46docker-compose -f /Users/fred/Library/Application Support/tutor/env/local/docker-compose.yml --project-name tutor_local exec mysql sh -e -c echo "Initialising MySQL..."
47mysql_connection_max_attempts=10
48mysql_connection_attempt=0
49until mysql -u root --password="AlT0xz2u" --host "mysql" --port 3306 -e 'exit'
50do
51 mysql_connection_attempt=$(expr $mysql_connection_attempt + 1)
52 echo " [$mysql_connection_attempt/$mysql_connection_max_attempts] Waiting for MySQL service (this may take a while)..."
53 if [ $mysql_connection_attempt -eq $mysql_connection_max_attempts ]
54 then
55 echo "MySQL initialisation error" 1>&2
56 exit 1
57 fi
58 sleep 10
59done
60echo "MySQL is up and running"
61
62mysql -u root --password="AlT0xz2u" --host "mysql" --port 3306 -e 'CREATE DATABASE IF NOT EXISTS openedx;'
63mysql -u root --password="AlT0xz2u" --host "mysql" --port 3306 -e 'GRANT ALL ON openedx.* TO "openedx"@"%" IDENTIFIED BY "0yJ8PUoL";'
64Initialising MySQL...
65Warning: Using a password on the command line interface can be insecure.
66MySQL is up and running
67Warning: Using a password on the command line interface can be insecure.
68Warning: Using a password on the command line interface can be insecure.
69Initialising lms...
70docker-compose -f /Users/fred/Library/Application Support/tutor/env/local/docker-compose.yml --project-name tutor_local exec lms sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s
71./manage.py lms --settings=tutor.production migrate
72
73./manage.py lms --settings=tutor.production create_oauth2_client \
74 "http://androidapp.com" "http://androidapp.com/redirect" public \
75 --client_id android --client_secret lSjR1IfvIsbH1kCVgxDltSGa \
76 --trusted
77
78# Fix incorrect uploaded file path
79if [ -d /openedx/data/uploads/ ]; then
80 if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
81 echo "Migrating LMS uploaded files to shared directory"
82 mv /openedx/data/uploads/* /openedx/media/
83 rm -rf /openedx/data/uploads/
84 fi
85fi
862019/10/23 09:44:01 Waiting for: tcp://mysql:3306
872019/10/23 09:44:01 Connected to tcp://mysql:3306
88WARNING:py.warnings:/openedx/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
89 warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
90
912019-10-23 09:45:02,283 WARNING 26 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
922019-10-23 09:45:02,288 WARNING 26 [enterprise.utils] utils.py:51 - cannot import name _LTI_BACKENDS
93Operations to perform:
94 Apply all migrations: admin, api_admin, assessment, auth, badges, block_structure, bookmarks, branding, bulk_email, catalog, celery_utils, certificates, commerce, completion, consent, content_type_gating, contentserver, contenttypes, cors_csrf, course_action_state, course_duration_limits, course_goals, course_groups, course_modes, course_overviews, courseware, crawlers, credentials, credit, dark_lang, database_fixups, degreed, django_comment_common, django_notify, django_openid_auth, djcelery, edx_oauth2_provider, edx_proctoring, edxval, email_marketing, embargo, enterprise, entitlements, experiments, external_auth, grades, instructor_task, integrated_channel, lms_xblock, microsite_configuration, milestones, mobile_api, notes, oauth2, oauth2_provider, oauth_dispatch, oauth_provider, organizations, programs, redirects, rss_proxy, sap_success_factors, schedules, self_paced, sessions, shoppingcart, site_configuration, sites, social_django, splash, static_replace, status, student, submissions, survey, teams, theming, third_party_auth, track, user_api, user_authn, util, verified_track_content, verify_student, video_config, video_pipeline, waffle, waffle_utils, wiki, workflow, xapi, xblock_django
95Running migrations:
96 Applying oauth2.0001_initial...Traceback (most recent call last):
97 File "./manage.py", line 123, in <module>
98 execute_from_command_line([sys.argv[0]] + django_args)
99 File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
100 utility.execute()
101 File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 356, in execute
102 self.fetch_command(subcommand).run_from_argv(self.argv)
103 File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 283, in run_from_argv
104 self.execute(*args, **cmd_options)
105 File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/base.py", line 330, in execute
106 output = self.handle(*args, **options)
107 File "/openedx/venv/local/lib/python2.7/site-packages/django/core/management/commands/migrate.py", line 204, in handle
108 fake_initial=fake_initial,
109 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 115, in migrate
110 state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
111 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
112 state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
113 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
114 state = migration.apply(state, schema_editor)
115 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/migration.py", line 129, in apply
116 operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
117 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/migrations/operations/models.py", line 97, in database_forwards
118 schema_editor.create_model(model)
119 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 319, in create_model
120 self.execute(sql, params or None)
121 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/base/schema.py", line 136, in execute
122 cursor.execute(sql, params)
123 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
124 return self.cursor.execute(sql, params)
125 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
126 six.reraise(dj_exc_type, dj_exc_value, traceback)
127 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/utils.py", line 62, in execute
128 return self.cursor.execute(sql)
129 File "/openedx/venv/local/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 101, in execute
130 return self.cursor.execute(query, args)
131 File "/openedx/venv/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
132 self.errorhandler(self, exc, value)
133 File "/openedx/venv/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
134 raise errorclass, errorvalue
135django.db.utils.OperationalError: (1050, "Table 'oauth2_accesstoken' already exists")
136Error: Command failed with status 1: docker-compose -f /Users/fred/Library/Application Support/tutor/env/local/docker-compose.yml --project-name tutor_local exec lms sh -e -c dockerize -wait tcp://mysql:3306 -timeout 20s
137./manage.py lms --settings=tutor.production migrate
138
139./manage.py lms --settings=tutor.production create_oauth2_client \
140 "http://androidapp.com" "http://androidapp.com/redirect" public \
141 --client_id android --client_secret lSjR1IfvIsbH1kCVgxDltSGa \
142 --trusted
143
144# Fix incorrect uploaded file path
145if [ -d /openedx/data/uploads/ ]; then
146 if [ -n "$(ls -A /openedx/data/uploads/)" ]; then
147 echo "Migrating LMS uploaded files to shared directory"
148 mv /openedx/data/uploads/* /openedx/media/
149 rm -rf /openedx/data/uploads/
150 fi
151fi