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

Did not receive email after register #215

Closed
kikoShen opened this issue May 12, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@kikoShen
Copy link

commented May 12, 2019

My configuration via vim:

  1. lms.auth.json:

"EMAIL_HOST_USER": "1172443266@qq.com",
"EMAIL_HOST_PASSWORD": "xxxxxxxxxxxxxx"

  1. lms.env.json:

"EMAIL_BACKEND": "django.core.mail.backends.smtp.EmailBackend",
"EMAIL_HOST": "smtp.qq.com",
"EMAIL_PORT": 25,

Unexpected behavior

After configuration, run tutor local stop tutor local start -d . Register a new user, did not receive email:(
my friend and I did the same configurations, she succeed but use native build.

Note

  1. $("tutor config printroot/") is Users/kiko/Library/Application\Support/tutor/ .
  2. I also changed the cms.auth.json and cms.env.json. It seems that if lms has been changed, then you edit the cms. after stop and start , lms will traceback to default. only one can be effective.
@regisb

This comment has been minimized.

Copy link
Collaborator

commented May 12, 2019

Hi @kikoShen! Can you check the logs from the lms_worker? You can get them with tutor local logs lms_worker.

@kikoShen

This comment has been minimized.

Copy link
Author

commented May 13, 2019

kiko config $ tutor local logs lms_worker
docker-compose -f /Users/kiko/Library/Application Support/tutor/env/local/docker-compose.yml --project-name tutor_local logs lms_worker
Attaching to tutor_local_lms_worker_1
lms_worker_1      | WARNING:py.warnings:/openedx/edx-platform/lms/djangoapps/courseware/__init__.py:5: DeprecationWarning: Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported
lms_worker_1      |   warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
lms_worker_1      | 
lms_worker_1      | 2019-05-13 02:49:26,790 WARNING 1 [enterprise.utils] utils.py:50 - Could not import Registry from third_party_auth.provider
lms_worker_1      | 2019-05-13 02:49:26,792 WARNING 1 [enterprise.utils] utils.py:51 - cannot import name _LTI_BACKENDS
lms_worker_1      | 2019-05-13 02:50:00,028 WARNING 1 [py.warnings] platforms.py:812 - /openedx/venv/local/lib/python2.7/site-packages/celery/platforms.py:812: RuntimeWarning: You are running the worker with superuser privileges, which is
lms_worker_1      | absolutely not recommended!
lms_worker_1      | 
lms_worker_1      | Please specify a different user using the -u option.
lms_worker_1      | 
lms_worker_1      | User information: uid=0 euid=0 gid=0 egid=0
lms_worker_1      | 
lms_worker_1      |   uid=uid, euid=euid, gid=gid, egid=egid,
lms_worker_1      | 
lms_worker_1      | 2019-05-13 02:50:00,600 WARNING 1 [py.warnings] worker.py:161 - /openedx/venv/local/lib/python2.7/site-packages/celery/apps/worker.py:161: CDeprecationWarning: 
lms_worker_1      | Starting from version 3.2 Celery will refuse to accept pickle by default.
lms_worker_1      | 
lms_worker_1      | The pickle serializer is a security concern as it may give attackers
lms_worker_1      | the ability to execute any command.  It's important to secure
lms_worker_1      | your broker from unauthorized access when using pickle, so we think
lms_worker_1      | that enabling pickle should require a deliberate action and not be
lms_worker_1      | the default choice.
lms_worker_1      | 
lms_worker_1      | If you depend on pickle then you should set a setting to disable this
lms_worker_1      | warning and to be sure that everything will continue working
lms_worker_1      | when you upgrade to Celery 3.2::
lms_worker_1      | 
lms_worker_1      |     CELERY_ACCEPT_CONTENT = ['pickle', 'json', 'msgpack', 'yaml']
lms_worker_1      | 
lms_worker_1      | You must only enable the serializers that you will actually use.
lms_worker_1      | 
lms_worker_1      | 
lms_worker_1      |   warnings.warn(CDeprecationWarning(W_PICKLE_DEPRECATED))
lms_worker_1      | 
lms_worker_1      |  
lms_worker_1      |  -------------- celery@edx.lms.core.default.%d3cfe9d94a2c v3.1.25 (Cipater)
lms_worker_1      | ---- **** ----- 
lms_worker_1      | --- * ***  * -- Linux-4.9.125-linuxkit-x86_64-with-Ubuntu-16.04-xenial
lms_worker_1      | -- * - **** --- 
lms_worker_1      | - ** ---------- [config]
lms_worker_1      | - ** ---------- .> app:         proj:0x7f62e97e6850
lms_worker_1      | - ** ---------- .> transport:   amqp://guest:**@rabbitmq:5672//
lms_worker_1      | - ** ---------- .> results:     
lms_worker_1      | - *** --- * --- .> concurrency: 2 (prefork)
lms_worker_1      | -- ******* ---- 
lms_worker_1      | --- ***** ----- [queues]
lms_worker_1      |  -------------- .> edx.lms.core.default exchange=edx.lms.core(direct) key=edx.lms.core.default
lms_worker_1      |                 .> edx.lms.core.high exchange=edx.lms.core(direct) key=edx.lms.core.high
lms_worker_1      |                 .> edx.lms.core.high_mem exchange=edx.lms.core(direct) key=edx.lms.core.high_mem
lms_worker_1      | 
lms_worker_1      | [tasks]
lms_worker_1      |   . bulk_email.tasks.send_course_email
lms_worker_1      |   . celery_utils.tasks.mark_resolved
lms_worker_1      |   . edx_sga.tasks.zip_student_submissions
lms_worker_1      |   . email_marketing.tasks.get_email_cookies_via_sailthru
lms_worker_1      |   . email_marketing.tasks.update_course_enrollment
lms_worker_1      |   . email_marketing.tasks.update_user
lms_worker_1      |   . email_marketing.tasks.update_user_email
lms_worker_1      |   . gating.tasks.task_evaluate_subsection_completion_milestones
lms_worker_1      |   . integrated_channels.integrated_channel.tasks.transmit_content_metadata
lms_worker_1      |   . integrated_channels.integrated_channel.tasks.transmit_learner_data
lms_worker_1      |   . integrated_channels.integrated_channel.tasks.unlink_inactive_learners
lms_worker_1      |   . lms.djangoapps.certificates.tasks.generate_certificate
lms_worker_1      |   . lms.djangoapps.discussion.tasks.send_ace_message
lms_worker_1      |   . lms.djangoapps.discussion.tasks.update_discussions_map
lms_worker_1      |   . lms.djangoapps.email_marketing.tasks.get_email_cookies_via_sailthru
lms_worker_1      |   . lms.djangoapps.email_marketing.tasks.update_course_enrollment
lms_worker_1      |   . lms.djangoapps.email_marketing.tasks.update_user
lms_worker_1      |   . lms.djangoapps.email_marketing.tasks.update_user_email
lms_worker_1      |   . lms.djangoapps.grades.tasks.compute_all_grades_for_course
lms_worker_1      |   . lms.djangoapps.grades.tasks.compute_grades_for_course
lms_worker_1      |   . lms.djangoapps.grades.tasks.compute_grades_for_course_v2
lms_worker_1      |   . lms.djangoapps.grades.tasks.recalculate_course_and_subsection_grades_for_user
lms_worker_1      |   . lms.djangoapps.grades.tasks.recalculate_subsection_grade_v3
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.calculate_grades_csv
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.calculate_may_enroll_csv
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.calculate_problem_grade_report
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.calculate_problem_responses_csv
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.calculate_students_features_csv
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.cohort_students
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.course_survey_report_csv
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.delete_problem_state
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.enrollment_report_features_csv
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.exec_summary_report_csv
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.export_ora2_data
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.generate_certificates
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.override_problem_score
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.proctored_exam_results_csv
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.rescore_problem
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.reset_problem_attempts
lms_worker_1      |   . lms.djangoapps.instructor_task.tasks.send_bulk_course_email
lms_worker_1      |   . lms.djangoapps.verify_student.tasks.send_verification_status_email
lms_worker_1      |   . openedx.core.djangoapps.content.block_structure.tasks.get_course_in_cache
lms_worker_1      |   . openedx.core.djangoapps.content.block_structure.tasks.get_course_in_cache_v2
lms_worker_1      |   . openedx.core.djangoapps.content.block_structure.tasks.update_course_in_cache
lms_worker_1      |   . openedx.core.djangoapps.content.block_structure.tasks.update_course_in_cache_v2
lms_worker_1      |   . openedx.core.djangoapps.coursegraph.tasks.dump_course_to_neo4j
lms_worker_1      |   . openedx.core.djangoapps.credentials.tasks.v1.tasks.send_grade_to_credentials
lms_worker_1      |   . openedx.core.djangoapps.programs.tasks.v1.tasks.award_course_certificate
lms_worker_1      |   . openedx.core.djangoapps.programs.tasks.v1.tasks.award_program_certificates
lms_worker_1      |   . openedx.core.djangoapps.schedules.tasks.ScheduleCourseUpdate
lms_worker_1      |   . openedx.core.djangoapps.schedules.tasks.ScheduleMessageBaseTask
lms_worker_1      |   . openedx.core.djangoapps.schedules.tasks.ScheduleRecurringNudge
lms_worker_1      | 2019-05-13 02:50:15,488 INFO 1 [celery.worker.consumer] consumer.py:526 - Connected to amqp://guest:**@rabbitmq:5672//
lms_worker_1      | 2019-05-13 02:50:15,718 INFO 1 [celery.worker.consumer] consumer.py:614 - mingle: searching for neighbors
lms_worker_1      | 2019-05-13 02:50:16,955 INFO 1 [celery.worker.consumer] consumer.py:620 - mingle: sync with 1 nodes
lms_worker_1      | 2019-05-13 02:50:16,994 INFO 1 [celery.worker.consumer] consumer.py:630 - mingle: sync complete
lms_worker_1      | 2019-05-13 02:50:17,427 WARNING 1 [celery.redirected] log.py:282 - celery@edx.lms.core.default.%d3cfe9d94a2c ready.
lms_worker_1      | 2019-05-13 04:20:29,397 INFO 1 [celery.worker.strategy] strategy.py:60 - Received task: student.tasks.send_activation_email[e625065f-7f41-4765-853e-2aa272b2ef27]
lms_worker_1      | 2019-05-13 04:20:34,119 INFO 117 [edx.celery.task] tasks.py:26 - Activation Email has been sent to User kikoshen522@qq.com
lms_worker_1      | 2019-05-13 04:20:34,400 INFO 1 [celery.worker.job] job.py:402 - Task student.tasks.send_activation_email[e625065f-7f41-4765-853e-2aa272b2ef27] succeeded in 4.1493739s: None

Note

I configure the lms.auth.json and lms.env.json ,then run tutor config save -y tutor local stop
tutor local quickstart. And then I check out these two files, they didn't be changed! What should I do can really changed them?
And every time I run tutor local quickstart trying to changed the last three activate values, they did not work in fact. So I need to changed them manually and run tutor config save -y. This really upsets me.
屏幕快照 2019-05-13 13 06 32

@regisb

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2019

I configure the lms.auth.json and lms.env.json ,then run tutor config save -y tutor local stop
tutor local quickstart. And then I check out these two files, they didn't be changed! What should I do can really changed them?

I think there is some misunderstanding on how tutor works.

  1. The files in env/ are generated automatically by tutor every time you run tutor save. This is what I call "the environment": it's mostly configuration files for the Open edX platform. You should not modify those files yourself. Instead, you should modify the tutor configuration, which is stored in config.yml. This is what is explained in the documentation, although I now realize that this section is not very clear: https://docs.tutor.overhang.io/configuration.html
  2. There are two ways to modify the configuration.
    a. You can either manually edit config.yml, or...
    b. ... run tutor config save -y --set NAME=VALUE

In case a, the environment is not automatically re-generated. Tutor does not detect your manual changes, so you should run tutor config save -y to re-generate the environment.

Finally, once you re-generated the environment, you should probably restart the platform to take into account the new configuration:

tutor local stop
tutor local start -d

If there are new operations that you should run, such as database creation/migration, then you should run them:

tutor local databases

All this process is handled transparently by tutor local quickstart, so in case of doubt, run quickstart :)

To come back to your specific problem of mail server configuration: once again, you should not modify lms.auth.json yourself! Instead, you should modify these configuration values in config.yml: https://docs.tutor.overhang.io/configuration.html#smtp

ACTIVATE_SMTP: false
SMTP_HOST: smtp.qq.com
SMTP_PORT: 25
SMTP_USERNAME: 1172443266@qq.com
SMTP_PASSWORD: xxx

by the way, if this is your real password you may want to remove it from this publicly visible github issue :)

Then, restart the platform:

tutor local stop
tutor local start -d
@kikoShen

This comment has been minimized.

Copy link
Author

commented May 13, 2019

First of all, thanks for pointing out my misunderstanding. This is really really important information to me!
Finally,I figured out this problem by turn off vpn. If vpn is on, then the email can't be reached.
by the way, could you use xxx instead of my stmp_password? thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.