Does Tutor support ACE?

This thing: edX Automated Communication Engine (A.C.E.) — edx-ace 0.1.14 documentation, which is required to send notifications for forum replies.

And if so, how does one enable it? (I did only the django configuration change listed here: 4.15. Enabling Discussion Notifications — Installing, Configuring, and Running the Open edX Platform documentation but that didn’t seem to be enough)

Tutor does make use of edx-ace – there isn’t really a way around edx-ace, as it’s baked in edx-platform. According to the source code, emails should be sent provided you created the right site configuration: edx-platform/handlers.py at 90c14a2dcde36958340ef4eaf9a245b9889303b0 · edx/edx-platform · GitHub
You will have to look at the lms worker logs to figure out what is going on:

  1. Is a celery task created to send the email?
  2. Does the smtp server receive a request?

Sorry for the delay, I got side-tracked with other work.

In the below logs, I see SMTP stuff before the “this is my reply” message to a test post, and I see a “celery.app.trace” message immediately after. But no email appears to the test account. (Emails are working fine for registration and password resets.)

sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1          | 1:M 17 Mar 2021 17:49:03.624 * Ready to accept connections
redis_1          | 1:signal-handler (1616003890) Received SIGTERM scheduling shutdown...
redis_1          | 1:M 17 Mar 2021 17:58:11.040 # User requested shutdown...
redis_1          | 1:M 17 Mar 2021 17:58:11.040 # Redis is now ready to exit, bye bye...
redis_1          | 1:C 17 Mar 2021 17:58:24.680 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1          | 1:C 17 Mar 2021 17:58:24.680 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1          | 1:C 17 Mar 2021 17:58:24.680 # Configuration loaded
redis_1          | 1:M 17 Mar 2021 17:58:24.691 * Running mode=standalone, port=6379.
redis_1          | 1:M 17 Mar 2021 17:58:24.691 # Server initialized
redis_1          | 1:M 17 Mar 2021 17:58:24.691 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1          | 1:M 17 Mar 2021 17:58:24.691 * Ready to accept connections
redis_1          | 1:signal-handler (1617289695) Received SIGTERM scheduling shutdown...
redis_1          | 1:M 01 Apr 2021 15:08:15.692 # User requested shutdown...
redis_1          | 1:M 01 Apr 2021 15:08:15.692 # Redis is now ready to exit, bye bye...
redis_1          | 1:C 01 Apr 2021 15:08:30.425 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1          | 1:C 01 Apr 2021 15:08:30.425 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1          | 1:C 01 Apr 2021 15:08:30.425 # Configuration loaded
redis_1          | 1:M 01 Apr 2021 15:08:30.427 * Running mode=standalone, port=6379.
redis_1          | 1:M 01 Apr 2021 15:08:30.427 # Server initialized
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.4\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.4\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.5\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.2\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.6\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.6\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
redis_1          | 1:M 01 Apr 2021 15:08:30.427 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1          | 1:M 01 Apr 2021 15:08:30.427 * Ready to accept connections
redis_1          | 1:signal-handler (1617659280) Received SIGTERM scheduling shutdown...
redis_1          | 1:M 05 Apr 2021 21:48:00.857 # User requested shutdown...
redis_1          | 1:M 05 Apr 2021 21:48:00.857 # Redis is now ready to exit, bye bye...
redis_1          | 1:C 05 Apr 2021 21:48:15.531 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1          | 1:C 05 Apr 2021 21:48:15.531 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1          | 1:C 05 Apr 2021 21:48:15.531 # Configuration loaded
redis_1          | 1:M 05 Apr 2021 21:48:15.554 * Running mode=standalone, port=6379.
redis_1          | 1:M 05 Apr 2021 21:48:15.554 # Server initialized
redis_1          | 1:M 05 Apr 2021 21:48:15.554 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1          | 1:M 05 Apr 2021 21:48:15.554 * Ready to accept connections
redis_1          | 1:signal-handler (1618253000) Received SIGTERM scheduling shutdown...
redis_1          | 1:M 12 Apr 2021 18:43:20.483 # User requested shutdown...
redis_1          | 1:M 12 Apr 2021 18:43:20.484 # Redis is now ready to exit, bye bye...
redis_1          | 1:C 12 Apr 2021 18:43:35.642 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis_1          | 1:C 12 Apr 2021 18:43:35.642 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1, just started
redis_1          | 1:C 12 Apr 2021 18:43:35.642 # Configuration loaded
redis_1          | 1:M 12 Apr 2021 18:43:35.646 * Running mode=standalone, port=6379.
redis_1          | 1:M 12 Apr 2021 18:43:35.646 # Server initialized
redis_1          | 1:M 12 Apr 2021 18:43:35.646 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1          | 1:M 12 Apr 2021 18:43:35.646 * Ready to accept connections
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.6\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.6\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.4\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
smtp_1           | + sed -ri '
smtp_1           | 	s/^#?(dc_local_interfaces)=.*/\1='\''[0.0.0.0]:25 ; [::0]:25'\''/;
smtp_1           | 	s/^#?(dc_other_hostnames)=.*/\1='\'''\''/;
smtp_1           | 	s/^#?(dc_relay_nets)=.*/\1='\''172.18.0.4\/16'\''/;
smtp_1           | 	s/^#?(dc_eximconfig_configtype)=.*/\1='\''internet'\''/;
smtp_1           | ' /etc/exim4/update-exim4.conf.conf
smtp_1           | + update-exim4.conf -v
smtp_1           | using non-split configuration scheme from /etc/exim4/exim4.conf.template
smtp_1           |     1 LOG: MAIN
smtp_1           |     1   exim 4.92 daemon started: pid=1, -q15m, listening for SMTP on port 25 (IPv6 and IPv4)
lms_1            | [pid: 6|app: -1|req: -1/87369] 172.18.0.13 () {52 vars in 1853 bytes} [Fri May  7 12:49:57 2021] GET /static/images/wmd-buttons-transparent.c9c0490ce640.png => generated 7046 bytes in 0 msecs via sendfile() (HTTP/1.0 200) 3 headers in 112 bytes (0 switches on core 0)
nginx_1          | 172.18.0.3 - - [07/May/2021:12:49:57 +0000] http://test.knoise.net "GET /static/images/wmd-buttons-transparent.c9c0490ce640.png HTTP/1.1" 200 7046 "https://test.knoise.net/static/indigo/css/discussion/lms-discussion-bootstrap.b7e442105ae5.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36" "96.231.211.13"
lms_1            | 2021-05-07 12:49:57,107 INFO 18 [tracking] [user 3] [ip 96.231.211.13] logger.py:42 - {"name": "/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "context": {"course_id": "course-v1:KNoiseNet+AboutCharlesBabbage+1", "course_user_tags": {"view-welcome-message": "False"}, "user_id": 3, "path": "/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "org_id": "KNoiseNet"}, "username": "Admin1", "session": "0c195819a8a97d88e4f99db8b7b6678f", "ip": "96.231.211.13", "agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36", "host": "test.knoise.net", "referer": "https://test.knoise.net/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "accept_language": "en-US,en;q=0.9", "event": "{\"GET\": {\"ajax\": [\"1\"], \"resp_skip\": [\"0\"], \"resp_limit\": [\"25\"]}, \"POST\": {}}", "time": "2021-05-07T12:49:57.107529+00:00", "event_type": "/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "event_source": "server", "page": null}
forum_1          | I, [2021-05-07T12:49:57.170409 #29]  INFO -- : source=rack-timeout id=3c376964185a781f5ab02f59230a09dc timeout=20000ms state=ready
forum_1          | D, [2021-05-07T12:49:57.170667 #29] DEBUG -- : source=rack-timeout id=3c376964185a781f5ab02f59230a09dc timeout=20000ms service=0ms state=active
forum_1          | I, [2021-05-07T12:49:57.179203 #29]  INFO -- : source=rack-timeout id=3c376964185a781f5ab02f59230a09dc timeout=20000ms service=9ms state=completed
forum_1          | 172.18.0.10 - - [07/May/2021:12:49:57 +0000] "GET /api/v1/users/3?complete=True&request_id=b54564d8-520c-4a7b-85f3-4170d373ba9c HTTP/1.1" 200 240 0.0098
forum_1          | I, [2021-05-07T12:49:57.191611 #33]  INFO -- : source=rack-timeout id=5d5455ef15dbbfe91c71e27658d4c6b5 timeout=20000ms state=ready
forum_1          | I, [2021-05-07T12:49:57.206827 #33]  INFO -- : source=rack-timeout id=5d5455ef15dbbfe91c71e27658d4c6b5 timeout=20000ms service=15ms state=completed
forum_1          | 172.18.0.10 - - [07/May/2021:12:49:57 +0000] "GET /api/v1/threads/6095371e81aef70021ac54ff?recursive=True&with_responses=True&user_id=3&mark_as_read=True&resp_skip=0&resp_limit=25&request_id=f51a73b6-c3b5-4113-af7b-7466fc13b647 HTTP/1.1" 200 804 0.0161
lms_1            | 2021-05-07 12:49:57,219 INFO 18 [tracking] [user 3] [ip 96.231.211.13] logger.py:42 - {"name": "edx.forum.thread.viewed", "context": {"course_id": "course-v1:KNoiseNet+AboutCharlesBabbage+1", "course_user_tags": {"view-welcome-message": "False"}, "user_id": 3, "path": "/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "org_id": "KNoiseNet"}, "username": "Admin1", "session": "0c195819a8a97d88e4f99db8b7b6678f", "ip": "96.231.211.13", "agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36", "host": "test.knoise.net", "referer": "https://test.knoise.net/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "accept_language": "en-US,en;q=0.9", "event": {"commentable_id": "course", "target_username": "cc", "title_truncated": false, "title": "This is my first post", "id": "6095371e81aef70021ac54ff", "url": "https://test.knoise.net/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "user_forums_roles": ["Administrator", "Student"], "user_course_roles": ["instructor", "staff"]}, "time": "2021-05-07T12:49:57.218668+00:00", "event_type": "edx.forum.thread.viewed", "event_source": "server", "page": null}
nginx_1          | 172.18.0.3 - - [07/May/2021:12:49:57 +0000] http://test.knoise.net "GET /courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff?ajax=1&resp_skip=0&resp_limit=25 HTTP/1.1" 200 1080 "https://test.knoise.net/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36" "96.231.211.13"
lms_1            | [pid: 18|app: 0|req: 29156/87370] 172.18.0.13 () {56 vars in 2168 bytes} [Fri May  7 12:49:57 2021] GET /courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff?ajax=1&resp_skip=0&resp_limit=25 => generated 1080 bytes in 138 msecs (HTTP/1.0 200) 6 headers in 329 bytes (1 switches on core 0)
lms_1            | 2021-05-07 12:50:05,580 INFO 6 [tracking] [user 3] [ip 96.231.211.13] logger.py:42 - {"name": "/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/threads/6095371e81aef70021ac54ff/reply", "context": {"course_id": "course-v1:KNoiseNet+AboutCharlesBabbage+1", "course_user_tags": {"view-welcome-message": "False"}, "user_id": 3, "path": "/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/threads/6095371e81aef70021ac54ff/reply", "org_id": "KNoiseNet"}, "username": "Admin1", "session": "0c195819a8a97d88e4f99db8b7b6678f", "ip": "96.231.211.13", "agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36", "host": "test.knoise.net", "referer": "https://test.knoise.net/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "accept_language": "en-US,en;q=0.9", "event": "{\"GET\": {\"ajax\": [\"1\"]}, \"POST\": {\"body\": [\"this is my reply\"]}}", "time": "2021-05-07T12:50:05.580524+00:00", "event_type": "/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/threads/6095371e81aef70021ac54ff/reply", "event_source": "server", "page": null}
forum_1          | I, [2021-05-07T12:50:05.646881 #27]  INFO -- : source=rack-timeout id=22982f34ef6e89e3f6e2a2d41b46da52 timeout=20000ms state=ready
forum_1          | I, [2021-05-07T12:50:05.666571 #27]  INFO -- : source=rack-timeout id=22982f34ef6e89e3f6e2a2d41b46da52 timeout=20000ms service=20ms state=completed
forum_1          | 172.18.0.10 - - [07/May/2021:12:50:05 +0000] "GET /api/v1/threads/6095371e81aef70021ac54ff?with_responses=False&mark_as_read=True&request_id=f9c8f8e9-8344-43b5-8164-014a0862c7ed HTTP/1.1" 200 680 0.0219
forum_1          | I, [2021-05-07T12:50:05.833181 #24]  INFO -- : source=rack-timeout id=cf124fdc6214c1374ec00b94fbe07916 timeout=20000ms state=ready
forum_1          | D, [2021-05-07T12:50:05.833376 #24] DEBUG -- : source=rack-timeout id=cf124fdc6214c1374ec00b94fbe07916 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-05-07T12:50:05.868950 #24]  INFO -- : source=rack-timeout id=cf124fdc6214c1374ec00b94fbe07916 timeout=20000ms service=36ms state=completed
forum_1          | 172.18.0.10 - - [07/May/2021:12:50:05 +0000] "POST /api/v1/threads/6095371e81aef70021ac54ff/comments?request_id=b63a5b0b-2755-4113-9d37-aa34f9fff8df HTTP/1.1" 200 538 0.0369
forum_1          | I, [2021-05-07T12:50:05.875142 #29]  INFO -- : source=rack-timeout id=35f85aa485bfbf548a0efb28bf3211f5 timeout=20000ms state=ready
forum_1          | D, [2021-05-07T12:50:05.875448 #29] DEBUG -- : source=rack-timeout id=35f85aa485bfbf548a0efb28bf3211f5 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-05-07T12:50:05.882572 #29]  INFO -- : source=rack-timeout id=35f85aa485bfbf548a0efb28bf3211f5 timeout=20000ms service=7ms state=completed
forum_1          | 172.18.0.10 - - [07/May/2021:12:50:05 +0000] "GET /api/v1/threads/6095371e81aef70021ac54ff?with_responses=False&mark_as_read=True&request_id=9cb4e65c-2c02-45b0-ac8c-40f620907720 HTTP/1.1" 200 680 0.0085
lms-worker_1     | 2021-05-07 12:50:05,901 INFO 1 [celery.worker.strategy] [user None] [ip None] strategy.py:157 - Received task: lms.djangoapps.discussion.tasks.send_ace_message[9d7b9a35-6b41-4ece-8396-76d8ee731733]  
lms_1            | 2021-05-07 12:50:05,904 INFO 6 [celery_utils.logged_task] [user 3] [ip 96.231.211.13] logged_task.py:25 - Task lms.djangoapps.discussion.tasks.send_ace_message[9d7b9a35-6b41-4ece-8396-76d8ee731733] submitted with arguments [{'course_id': 'course-v1:KNoiseNet+AboutCharlesBabbage+1', 'comment_id': '6095377d81aef70018ac54fc', 'comment_body': 'this is my reply', 'comment_author_id': '3', 'comment_created_at': '2021-05-07T12:50:05Z', 'thread_id': '6095371e81aef70021ac54ff', 'thread_title': 'This is my first post', 'thread_author_id': '92', 'thread_created_at': '2021-05-07T12:48:30Z', 'thread_commentable_id': 'course', 'site_id': 4}], None
lms_1            | 2021-05-07 12:50:05,915 INFO 6 [tracking] [user 3] [ip 96.231.211.13] logger.py:42 - {"name": "edx.forum.response.created", "context": {"course_id": "course-v1:KNoiseNet+AboutCharlesBabbage+1", "course_user_tags": {"view-welcome-message": "False"}, "user_id": 3, "path": "/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/threads/6095371e81aef70021ac54ff/reply", "org_id": "KNoiseNet"}, "username": "Admin1", "session": "0c195819a8a97d88e4f99db8b7b6678f", "ip": "96.231.211.13", "agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36", "host": "test.knoise.net", "referer": "https://test.knoise.net/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "accept_language": "en-US,en;q=0.9", "event": {"discussion": {"id": "6095371e81aef70021ac54ff"}, "commentable_id": "course", "options": {"followed": false}, "truncated": false, "body": "this is my reply", "id": "6095377d81aef70018ac54fc", "url": "https://test.knoise.net/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff", "user_forums_roles": ["Administrator", "Student"], "user_course_roles": ["instructor", "staff"]}, "time": "2021-05-07T12:50:05.914371+00:00", "event_type": "edx.forum.response.created", "event_source": "server", "page": null}
forum_1          | I, [2021-05-07T12:50:05.915404 #27]  INFO -- : source=rack-timeout id=b47261197fff299eb3312388be9c294f timeout=20000ms state=ready
forum_1          | D, [2021-05-07T12:50:05.917698 #27] DEBUG -- : source=rack-timeout id=b47261197fff299eb3312388be9c294f timeout=20000ms service=2ms state=active
forum_1          | I, [2021-05-07T12:50:05.923582 #33]  INFO -- : source=rack-timeout id=9cd195d68d1c31125da49aa424ba2a30 timeout=20000ms state=ready
forum_1          | D, [2021-05-07T12:50:05.923928 #33] DEBUG -- : source=rack-timeout id=9cd195d68d1c31125da49aa424ba2a30 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-05-07T12:50:05.936761 #33]  INFO -- : source=rack-timeout id=9cd195d68d1c31125da49aa424ba2a30 timeout=20000ms service=13ms state=completed
forum_1          | 172.18.0.10 - - [07/May/2021:12:50:05 +0000] "GET /api/v1/users/3?complete=True&request_id=c7481503-2df4-4e65-8143-47991be340d9 HTTP/1.1" 200 240 0.0154
forum_1          | I, [2021-05-07T12:50:05.946485 #27]  INFO -- : source=rack-timeout id=b47261197fff299eb3312388be9c294f timeout=20000ms service=31ms state=completed
forum_1          | 172.18.0.11 - - [07/May/2021:12:50:05 +0000] "GET /api/v1/users/92/subscribed_threads?course_id=course-v1%3AKNoiseNet%2BAboutCharlesBabbage%2B1&request_id=57708fe1-ca9e-4ed2-9ce4-8375eb3b6c54 HTTP/1.1" 200 737 0.0326
forum_1          | I, [2021-05-07T12:50:05.952885 #29]  INFO -- : source=rack-timeout id=0728d1ca519a69edb7553cb27184f547 timeout=20000ms state=ready
nginx_1          | 172.18.0.3 - - [07/May/2021:12:50:05 +0000] http://test.knoise.net "POST /courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/threads/6095371e81aef70021ac54ff/reply?ajax=1 HTTP/1.1" 200 755 "https://test.knoise.net/courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/forum/course/threads/6095371e81aef70021ac54ff" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36" "96.231.211.13"
lms_1            | [pid: 6|app: 0|req: 29438/87371] 172.18.0.13 () {62 vars in 2262 bytes} [Fri May  7 12:50:05 2021] POST /courses/course-v1:KNoiseNet+AboutCharlesBabbage+1/discussion/threads/6095371e81aef70021ac54ff/reply?ajax=1 => generated 755 bytes in 429 msecs (HTTP/1.0 200) 7 headers in 368 bytes (1 switches on core 0)
forum_1          | I, [2021-05-07T12:50:05.963100 #29]  INFO -- : source=rack-timeout id=0728d1ca519a69edb7553cb27184f547 timeout=20000ms service=10ms state=completed
forum_1          | 172.18.0.11 - - [07/May/2021:12:50:05 +0000] "GET /api/v1/comments/6095377d81aef70018ac54fc?request_id=2da9c087-7308-4e40-b57f-e88f1995a9ea HTTP/1.1" 200 538 0.0117
forum_1          | I, [2021-05-07T12:50:05.968352 #29]  INFO -- : source=rack-timeout id=567df096cbdec238dd1f95fe652642dc timeout=20000ms state=ready
forum_1          | D, [2021-05-07T12:50:05.968691 #29] DEBUG -- : source=rack-timeout id=567df096cbdec238dd1f95fe652642dc timeout=20000ms service=0ms state=active
forum_1          | I, [2021-05-07T12:50:05.983293 #29]  INFO -- : source=rack-timeout id=567df096cbdec238dd1f95fe652642dc timeout=20000ms service=15ms state=completed
forum_1          | 172.18.0.11 - - [07/May/2021:12:50:05 +0000] "GET /api/v1/threads/6095371e81aef70021ac54ff?with_responses=True&mark_as_read=True&request_id=28a4e460-c9f2-4683-a0c0-a003acd35fd2 HTTP/1.1" 200 1358 0.0162
lms-worker_1     | 2021-05-07 12:50:05,987 INFO 129 [celery.app.trace] [user None] [ip None] trace.py:125 - Task lms.djangoapps.discussion.tasks.send_ace_message[9d7b9a35-6b41-4ece-8396-76d8ee731733] succeeded in 0.08046980109065771s: None

I think you’re right that there might be an issue here. I managed to reproduce it in development. Here are the logs:

2021-05-16 10:55:12,071 INFO 15 [tracking] [user 8] [ip 172.20.0.1] logger.py:42 - {"name": "/courses/course-v1:edX+DemoX+Demo_Course/discussion/threads/60a0f942fea2b1001e24ced3/reply", "context": {"course_id": "course-v1:edX+DemoX+Demo_Course", "course_user_tags": {}, "user_id": 8, "path": "/courses/course-v1:edX+DemoX+Demo_Course/discussion/threads/60a0f942fea2b1001e24ced3/reply", "org_id": "edX"}, "username": "test", "session": "dccbc14010674c5d4a44ab19d7c45156", "ip": "172.20.0.1", "agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0", "host": "local.overhang.io:8000", "referer": "http:/local.overhang.io:8000/courses/course-v1:edX+DemoX+Demo_Course/discussion/forum/i4x-edx-eiorguegnru-course-foobarbaz/threads/60a0f942fea2b1001e24ced3", "accpt_language": "fr,en;q=0.5", "event": "{\"GET\": {\"ajax\": [\"1\"]}, \"POST\": {\"body\": [\"This should send a notification.\"]}}", "time": "2021-05-16T10:5:12.071314+00:00", "event_type": "/courses/course-v1:edX+DemoX+Demo_Course/discussion/threads/60a0f942fea2b1001e24ced3/reply", "event_source": "server", "pae": null}
2021-05-16 10:55:13,336 INFO 15 [lms.djangoapps.discussion.tasks] [user 3] [ip 172.20.0.1] tasks.py:77 - Sending forum comment email notification with contex {'homepage_url': '/', 'dashboard_url': '/dashboard', 'template_revision': 'release', 'platform_name': 'My Open edX', 'contact_email': 'contact@behmo.com', 'ontact_mailing_address': 'SET-ME-PLEASE', 'social_media_urls': {}, 'mobile_store_urls': {}, 'logo_url': None, 'course_id': CourseLocator('edX', 'DemoX', 'Dem_Course', None, None), 'comment_id': '60a0fa10fea2b1001824ced5', 'comment_body': 'This should send a notification.', 'comment_author_id': '8', 'comment_creatd_at': datetime.datetime(2021, 5, 16, 10, 55, 12, tzinfo=tzlocal()), 'thread_id': '60a0f942fea2b1001e24ced3', 'thread_title': 'Test notification', 'thread_auhor_id': '3', 'thread_created_at': datetime.datetime(2021, 5, 16, 10, 51, 46, tzinfo=tzlocal()), 'thread_commentable_id': 'i4x-edx-eiorguegnru-course-foobarbz', 'site_id': 3, 'site': <Site: local.overhang.io:8000>, 'thread_username': 'regis', 'comment_username': 'test', 'post_link': '/courses/course-v1:edX+DemoX+emo_Course/discussion/forum/i4x-edx-eiorguegnru-course-foobarbaz/threads/60a0f942fea2b1001e24ced3'}
2021-05-16 10:55:13,379 INFO 15 [celery.app.trace] [user None] [ip None] trace.py:125 - Task lms.djangoapps.discussion.tasks.send_ace_message[d63213dc-aca2-41e-a910-146d3140dc7f] succeeded in 0.39637665200098127s: None
2021-05-16 10:55:13,379 INFO 15 [celery_utils.logged_task] [user None] [ip None] logged_task.py:25 - Task lms.djangoapps.discussion.tasks.send_ace_message[d6213dc-aca2-4b1e-a910-146d3140dc7f] submitted with arguments [{'course_id': 'course-v1:edX+DemoX+Demo_Course', 'comment_id': '60a0fa10fea2b1001824ced5', 'commnt_body': 'This should send a notification.', 'comment_author_id': '8', 'comment_created_at': '2021-05-16T10:55:12Z', 'thread_id': '60a0f942fea2b1001e24ced3' 'thread_title': 'Test notification', 'thread_author_id': '3', 'thread_created_at': '2021-05-16T10:51:46Z', 'thread_commentable_id': 'i4x-edx-eiorguegnru-couse-foobarbaz', 'site_id': 3}], None

As we can see, the task was successfuly sent and processed by Celery, but the email was not sent. In fact, it was not even received by the SMTP server (otherwise there would be logs).

Is one of the @developers interested in taking this on? At the very least we need to create a GitHub issue, and if possible a corresponding fix.

This issue is now tracked here: Discussion notification emails are not being sent · Issue #439 · overhangio/tutor · GitHub

The problem is the celery queue for ace is wrongly configured and send mail task is never consumed by any worker. I have a PR fix discussion notification not work for fixing this. @knoise You may want to have try.

1 Like

Thanks again for your PR @pcliu! Now that I had a look at the rendered ACE emails, I think we could make a few improvements quite easily:

  1. The logo in the top-left corner should be the same as the platform logo. I believe that to achieve this we simply need to set the LOGO_URL_PNG setting.
  2. The mailing address should be set to something else. I guess a good default would be the platform name.

Is someone interested in taking on these changes? As usual, at the very least we should open a GitHub issue on the Tutor repo.

I’m unclear on how I can incorporate this fix into my Tutor instance? Would this do it?

config save --set ACE_ROUTING_KEY=edx.lms.core.default
tutor local exec lms reload-uwsgi

The fix proposed by @pcliu is available in the Tutor master branch; you can either wait for us to make a release, or install Tutor from source: Install Tutor — Tutor documentation
FYI I intend to make a new release pretty soon (in the coming days).

1 Like

I’ll just wait for the next release then. Thank you

I’ve opened issue#447 and I’ll look do it in the next few days. @regis when are you looking to make a new release?

Thanks @BbrSofiane! I am currently releasing v11.3.0 with the latest set of patches. Just let me know when you need a release and I’ll create one.

Alright, I gave the forum-reply functionality a test in 11.3.0 but it doesn’t seem to work for me still.

Here’s my JSON configuration:

Tutor logs here: logs2 - Pastebin.com

The original message was from test user account “ee” (search for “target_username”: “ee”) and then I think if you follow the forum post ID of 60c35f46610f56001cddac5b you can find a mysql error which may or may not be related…

I should have replied to @regis in my 11.3.0 test, but now it’s too late to edit it…

OK, I’ve further isolated the issue slightly: It appears that emails are sent if the forum post is of type “discussion” but not if they are of type “question”. Is this expected behavior?

I believe that it should be expected that notifications be sent when replying to questions. However, I can confirm the behaviour that you observe: the forums do not send any notification when adding an answer to a question.

This is almost certainly an upstream bug that should be reported. @developers is someone interested in taking this on? I created an upstream issue with the complete result of my preliminary investigations: Answers to forum questions do not trigger any notification · Issue #86 · openedx/wg-build-test-release · GitHub

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.