Forums work for admin but not normal user

I have a weird error. I registered for my own site (which is hosted on the AWS AMI with production setup) as a non-admin, and when I try to navigate to the Discussions tab, I get:

There has been an error on the MyOrg servers

We're sorry, this module is temporarily unavailable. Our staff is working to fix it as soon as possible.

Or if I navigate to a Unit which has a Discussion Component embedded on it, I get

Error
This discussion could not be loaded. Refresh the page and try again.

If I go to the page as an admin, and set the view to Staff or Learner or even Specific Learner, I get no problems. It’s only if I log in as my test user that I get those errors. I checked other posts and tried “tutor local quickstart” and “tutor local init” but that didn’t help.

The output of
docker ps | grep forum
is
76f780ee2287 overhangio/openedx-forum:11.0.0 "docker-entrypoint.s…" 2 months ago Up 6 days 4567/tcp tutor_local_forum_1

The output of
tutor local logs --tail=100 forum
is

docker-compose -f /home/tutor/.local/share/tutor/env/local/docker-compose.yml -f /home/tutor/.local/share/tutor/env/local/docker-compose.prod.yml --project-name tutor_local logs --tail 100 forum
Attaching to tutor_local_forum_1
forum_1          | I, [2021-04-12T14:03:23.937496 #31]  INFO -- : source=rack-timeout id=df6e0fa58e82c7cfab1875bb27f83f9a timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:03:23.945987 #31]  INFO -- : source=rack-timeout id=df6e0fa58e82c7cfab1875bb27f83f9a timeout=20000ms service=9ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:23 +0000] "GET /api/v1/users/78?complete=True&request_id=e97fdea9-b215-4a0d-8ff8-2e4984287d84 HTTP/1.1" 200 218 0.0102
forum_1          | I, [2021-04-12T14:03:24.577995 #22]  INFO -- : source=rack-timeout id=4acc084d0fff283f6784d1f252fa042d timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:03:24.590108 #22]  INFO -- : source=rack-timeout id=4acc084d0fff283f6784d1f252fa042d timeout=20000ms service=12ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:24 +0000] "GET /api/v1/threads?page=1&per_page=20&course_id=course-v1%3AMyOrg%2BMyClass1%2B1&sort_key=date&user_id=78&context=course&request_id=139e210c-cda6-42d8-89bd-a1a75e0b0a6b HTTP/1.1" 200 6350 0.0134
forum_1          | I, [2021-04-12T14:03:24.647269 #22]  INFO -- : source=rack-timeout id=53bd5879c155435f4cba196950568842 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:03:24.653056 #22]  INFO -- : source=rack-timeout id=53bd5879c155435f4cba196950568842 timeout=20000ms service=6ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:24 +0000] "GET /api/v1/users/78?complete=True&request_id=031e28f5-e1c3-42e8-90ef-76d8b54e2990 HTTP/1.1" 200 218 0.0067
forum_1          | I, [2021-04-12T14:03:36.590331 #31]  INFO -- : source=rack-timeout id=4b8de9cfa81748e7da5ec882d6775ae4 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:03:36.599836 #31]  INFO -- : source=rack-timeout id=4b8de9cfa81748e7da5ec882d6775ae4 timeout=20000ms service=10ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:36 +0000] "GET /api/v1/users/78/subscribed_threads?course_id=course-v1%3AMyOrg%2BMyClass1%2B1&page=1&per_page=20&sort_key=activity&request_id=bf20a6de-485b-48d6-8dd5-827396d6f255 HTTP/1.1" 200 57 0.0104
forum_1          | I, [2021-04-12T14:03:36.605668 #28]  INFO -- : source=rack-timeout id=4899d0db73a632fac102413feb304d8e timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:03:36.615910 #28]  INFO -- : source=rack-timeout id=4899d0db73a632fac102413feb304d8e timeout=20000ms service=10ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:36 +0000] "GET /api/v1/users/78?complete=True&request_id=65f39794-e93a-404d-b780-f8f1fcaaabaf HTTP/1.1" 200 218 0.0115
forum_1          | I, [2021-04-12T14:03:43.830178 #22]  INFO -- : source=rack-timeout id=fdb97ff87d89d853375d8f9f14883dd6 timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:03:43.830605 #22] DEBUG -- : source=rack-timeout id=fdb97ff87d89d853375d8f9f14883dd6 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-04-12T14:03:43.838719 #22]  INFO -- : source=rack-timeout id=fdb97ff87d89d853375d8f9f14883dd6 timeout=20000ms service=9ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:43 +0000] "GET /api/v1/users/78?complete=True&request_id=56a703c3-d331-41fb-b949-b1f8aea00da8 HTTP/1.1" 200 218 0.0094
forum_1          | I, [2021-04-12T14:03:43.852579 #31]  INFO -- : source=rack-timeout id=552f963190f122064313736fd79b6ab5 timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:03:43.853039 #31] DEBUG -- : source=rack-timeout id=552f963190f122064313736fd79b6ab5 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-04-12T14:03:43.860698 #31]  INFO -- : source=rack-timeout id=552f963190f122064313736fd79b6ab5 timeout=20000ms service=8ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:43 +0000] "PUT /api/v1/users/78?request_id=99b82704-f0da-4516-9221-363f6cb8b239 HTTP/1.1" 200 44 0.0103
forum_1          | I, [2021-04-12T14:03:43.867207 #31]  INFO -- : source=rack-timeout id=3abbf5d290b8edff9e81e415c9291f2a timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:03:43.873854 #31]  INFO -- : source=rack-timeout id=3abbf5d290b8edff9e81e415c9291f2a timeout=20000ms service=7ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:43 +0000] "GET /api/v1/threads?page=1&per_page=20&course_id=course-v1%3AMyOrg%2BMyClass1%2B1&sort_key=activity&user_id=78&context=course&commentable_ids=c29e60cfb821e7843f2163193e04051e4eeb4e07%2Ce4ccc424cbcb7b17a88a0f3ef71a5e63371a2572%2Cad3e42e10b1a423e0ea8a8175de115f13285ea6e%2Cd66a4fcf9294bef570575693c5978136e3341b76&request_id=d837b925-30f7-403f-b1c9-99c0763f9142 HTTP/1.1" 200 57 0.0075
forum_1          | I, [2021-04-12T14:03:53.504049 #31]  INFO -- : source=rack-timeout id=0b55085f2e9b000b27830598de05d9cd timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:03:53.524868 #31]  INFO -- : source=rack-timeout id=0b55085f2e9b000b27830598de05d9cd timeout=20000ms service=21ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:53 +0000] "GET /api/v1/users/78?complete=True&request_id=25f2cb71-2d7b-4846-a3c1-bc6927f462f4 HTTP/1.1" 200 222 0.0218
forum_1          | I, [2021-04-12T14:03:53.539076 #25]  INFO -- : source=rack-timeout id=3bd5ea0b7923616e83fd52f8f5fbc45d timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:03:53.559745 #25]  INFO -- : source=rack-timeout id=3bd5ea0b7923616e83fd52f8f5fbc45d timeout=20000ms service=21ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:03:53 +0000] "GET /api/v1/course/threads?page=1&per_page=20&course_id=course-v1%3AMyOrg%2BMyClass1%2B1&sort_key=activity&user_id=78&context=course&commentable_ids=course&request_id=e4743858-28ba-4b00-8394-5be993c8274e HTTP/1.1" 200 57 0.0219
forum_1          | I, [2021-04-12T14:08:09.649870 #31]  INFO -- : source=rack-timeout id=4870425cabe681878a929a62afebeb20 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:08:09.674403 #31]  INFO -- : source=rack-timeout id=4870425cabe681878a929a62afebeb20 timeout=20000ms service=25ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:08:09 +0000] "GET /api/v1/users/32?complete=True&request_id=bd58836a-8ebd-4f32-8ca7-ac60b8a8b15c HTTP/1.1" 200 268 0.0255
forum_1          | I, [2021-04-12T14:08:09.689945 #28]  INFO -- : source=rack-timeout id=4129a085363fce33b6560f9b5ea8afcb timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:08:09.705716 #28]  INFO -- : source=rack-timeout id=4129a085363fce33b6560f9b5ea8afcb timeout=20000ms service=16ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:08:09 +0000] "GET /api/v1/90fc685dda6526c6ed392255bac7f1c1636eb255/threads?page=1&per_page=20&course_id=course-v1%3AMyOrg%2BMyClass1%2B1&sort_key=activity&user_id=32&context=course&request_id=b79cb365-3cc6-4158-93fe-6ea7a8c46fb1 HTTP/1.1" 200 860 0.0170
forum_1          | I, [2021-04-12T14:08:13.181064 #31]  INFO -- : source=rack-timeout id=1e6f11e959fb76234688582625709d2c timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:08:13.181254 #31] DEBUG -- : source=rack-timeout id=1e6f11e959fb76234688582625709d2c timeout=20000ms service=0ms state=active
forum_1          | I, [2021-04-12T14:08:13.187867 #31]  INFO -- : source=rack-timeout id=1e6f11e959fb76234688582625709d2c timeout=20000ms service=7ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:08:13 +0000] "GET /api/v1/users/32?complete=True&request_id=b4e900b8-ae99-49df-b032-47100cf0f8db HTTP/1.1" 200 268 0.0077
forum_1          | I, [2021-04-12T14:08:13.202715 #25]  INFO -- : source=rack-timeout id=176eaa001ca80dc630b43cfc77936c90 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:08:13.227014 #25]  INFO -- : source=rack-timeout id=176eaa001ca80dc630b43cfc77936c90 timeout=20000ms service=24ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:08:13 +0000] "GET /api/v1/threads/6074355981aef700193d9096?recursive=True&with_responses=True&user_id=32&mark_as_read=True&resp_skip=0&resp_limit=25&request_id=9e7188d3-4473-45f0-8cbb-8fb227596236 HTTP/1.1" 200 1653 0.0253
forum_1          | I, [2021-04-12T14:20:51.486764 #28]  INFO -- : source=rack-timeout id=fb94dc1b86e7840d7b7546db00fdbf71 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:20:51.489347 #28]  INFO -- : source=rack-timeout id=fb94dc1b86e7840d7b7546db00fdbf71 timeout=20000ms service=3ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:20:51 +0000] "GET /api/v1/users/25?complete=True&request_id=78ee763d-d7cd-4eca-8eea-87335b6265fe HTTP/1.1" 404 - 0.0034
forum_1          | I, [2021-04-12T14:20:51.493492 #28]  INFO -- : source=rack-timeout id=24b601ef74b058bf7571d40cde739c92 timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:20:51.493712 #28] DEBUG -- : source=rack-timeout id=24b601ef74b058bf7571d40cde739c92 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-04-12T14:20:51.503408 #28]  INFO -- : source=rack-timeout id=24b601ef74b058bf7571d40cde739c92 timeout=20000ms service=10ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:20:51 +0000] "PUT /api/v1/users/25?request_id=0ce68d85-676b-43a4-b897-b473b4c0a272 HTTP/1.1" 400 29 0.0108
forum_1          | I, [2021-04-12T14:29:54.801143 #28]  INFO -- : source=rack-timeout id=847b9cd5ea5a974dca5fd5e30cab43d3 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:29:54.804208 #28]  INFO -- : source=rack-timeout id=847b9cd5ea5a974dca5fd5e30cab43d3 timeout=20000ms service=3ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:29:54 +0000] "GET /api/v1/users/25?complete=True&request_id=120387d9-5dd9-4a15-ae56-56886ec14cc4 HTTP/1.1" 404 - 0.0045
forum_1          | I, [2021-04-12T14:29:54.809396 #28]  INFO -- : source=rack-timeout id=1b8fb36dd961a281548d3948f84faef4 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:29:54.823254 #28]  INFO -- : source=rack-timeout id=1b8fb36dd961a281548d3948f84faef4 timeout=20000ms service=14ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:29:54 +0000] "PUT /api/v1/users/25?request_id=03058310-b515-4b8c-9262-3afa47690703 HTTP/1.1" 400 29 0.0147
forum_1          | I, [2021-04-12T14:30:18.767911 #28]  INFO -- : source=rack-timeout id=bb63ab1857d2b825e97ff191419c974d timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:30:18.770749 #28]  INFO -- : source=rack-timeout id=bb63ab1857d2b825e97ff191419c974d timeout=20000ms service=3ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:30:18 +0000] "GET /api/v1/users/25?complete=True&request_id=059f92d2-04de-4c80-9abd-e9d28a2497db HTTP/1.1" 404 - 0.0037
forum_1          | I, [2021-04-12T14:30:18.775296 #31]  INFO -- : source=rack-timeout id=b89a8978c7c7894b5d0265478c126dce timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:30:18.775886 #31] DEBUG -- : source=rack-timeout id=b89a8978c7c7894b5d0265478c126dce timeout=20000ms service=1ms state=active
forum_1          | I, [2021-04-12T14:30:18.786674 #31]  INFO -- : source=rack-timeout id=b89a8978c7c7894b5d0265478c126dce timeout=20000ms service=11ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:30:18 +0000] "PUT /api/v1/users/25?request_id=1679c77a-5e7b-4c9f-ad0b-6590ea40a6e3 HTTP/1.1" 400 29 0.0124
forum_1          | I, [2021-04-12T14:34:29.524765 #22]  INFO -- : source=rack-timeout id=889f3c7f68fae067e2df6b12ff88a38d timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:34:29.528876 #22]  INFO -- : source=rack-timeout id=889f3c7f68fae067e2df6b12ff88a38d timeout=20000ms service=4ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:34:29 +0000] "GET /api/v1/users/25?complete=True&request_id=6548a4d7-4da8-441a-b310-a87ea25bd603 HTTP/1.1" 404 - 0.0053
forum_1          | I, [2021-04-12T14:34:29.535125 #25]  INFO -- : source=rack-timeout id=3c3f5a7cf35a1c7259f74b56b04d4435 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:34:29.548626 #25]  INFO -- : source=rack-timeout id=3c3f5a7cf35a1c7259f74b56b04d4435 timeout=20000ms service=14ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:34:29 +0000] "PUT /api/v1/users/25?request_id=ec51c29b-f6fb-4072-94ec-8bb2c6c41550 HTTP/1.1" 400 29 0.0149
forum_1          | I, [2021-04-12T14:35:36.069631 #22]  INFO -- : source=rack-timeout id=22d59ca77e560e71b46b5b3054d9bf08 timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:35:36.070393 #22] DEBUG -- : source=rack-timeout id=22d59ca77e560e71b46b5b3054d9bf08 timeout=20000ms service=1ms state=active
forum_1          | I, [2021-04-12T14:35:36.073479 #22]  INFO -- : source=rack-timeout id=22d59ca77e560e71b46b5b3054d9bf08 timeout=20000ms service=4ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:35:36 +0000] "GET /api/v1/users/25?complete=True&request_id=f6fc9e72-e818-4dc0-abd0-b96739ed4114 HTTP/1.1" 404 - 0.0048
forum_1          | I, [2021-04-12T14:35:36.080879 #22]  INFO -- : source=rack-timeout id=c36ba52588fbafa7e0c69d7d2ff770a5 timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:35:36.081270 #22] DEBUG -- : source=rack-timeout id=c36ba52588fbafa7e0c69d7d2ff770a5 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-04-12T14:35:36.097719 #22]  INFO -- : source=rack-timeout id=c36ba52588fbafa7e0c69d7d2ff770a5 timeout=20000ms service=17ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:35:36 +0000] "PUT /api/v1/users/25?request_id=18d3d53f-57d0-4643-8372-68c2afb71332 HTTP/1.1" 400 29 0.0184
forum_1          | I, [2021-04-12T14:35:37.924388 #22]  INFO -- : source=rack-timeout id=c38daf7520e05214e91f2a28dffaa246 timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:35:37.924592 #22] DEBUG -- : source=rack-timeout id=c38daf7520e05214e91f2a28dffaa246 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-04-12T14:35:37.927946 #22]  INFO -- : source=rack-timeout id=c38daf7520e05214e91f2a28dffaa246 timeout=20000ms service=4ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:35:37 +0000] "GET /api/v1/users/25?complete=True&request_id=22562bc0-ffd2-4eef-a2a6-fb1c9edc2aa4 HTTP/1.1" 404 - 0.0050
forum_1          | I, [2021-04-12T14:35:37.934367 #22]  INFO -- : source=rack-timeout id=85237207ab453c9202e30894e70877c9 timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:35:37.934668 #22] DEBUG -- : source=rack-timeout id=85237207ab453c9202e30894e70877c9 timeout=20000ms service=0ms state=active
forum_1          | I, [2021-04-12T14:35:37.948645 #22]  INFO -- : source=rack-timeout id=85237207ab453c9202e30894e70877c9 timeout=20000ms service=14ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:35:37 +0000] "PUT /api/v1/users/25?request_id=9e4fd45a-13ec-48f5-92fd-fff10cd813db HTTP/1.1" 400 29 0.0156
forum_1          | I, [2021-04-12T14:37:09.908713 #25]  INFO -- : source=rack-timeout id=90a496bfeb185b9667103b28b0b5611d timeout=20000ms state=ready
forum_1          | D, [2021-04-12T14:37:09.909838 #25] DEBUG -- : source=rack-timeout id=90a496bfeb185b9667103b28b0b5611d timeout=20000ms service=1ms state=active
forum_1          | I, [2021-04-12T14:37:09.913817 #25]  INFO -- : source=rack-timeout id=90a496bfeb185b9667103b28b0b5611d timeout=20000ms service=5ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:37:09 +0000] "GET /api/v1/users/25?complete=True&request_id=a9e5bfcd-7cec-4458-bb71-20a889d555f0 HTTP/1.1" 404 - 0.0066
forum_1          | I, [2021-04-12T14:37:09.919223 #31]  INFO -- : source=rack-timeout id=28f9db5f3ca5747fd7ceb5476d1e84d8 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:37:09.933899 #31]  INFO -- : source=rack-timeout id=28f9db5f3ca5747fd7ceb5476d1e84d8 timeout=20000ms service=15ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:37:09 +0000] "PUT /api/v1/users/25?request_id=be80d411-8390-4760-aab8-99529e6ab99c HTTP/1.1" 400 29 0.0167
forum_1          | I, [2021-04-12T14:47:35.724036 #22]  INFO -- : source=rack-timeout id=7343d20be0c33035e008de659bb826b3 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:47:35.727110 #22]  INFO -- : source=rack-timeout id=7343d20be0c33035e008de659bb826b3 timeout=20000ms service=3ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:47:35 +0000] "GET /api/v1/users/25?complete=True&request_id=4766292e-8f78-4eba-b6c4-e1b10c393670 HTTP/1.1" 404 - 0.0041
forum_1          | I, [2021-04-12T14:47:35.732545 #28]  INFO -- : source=rack-timeout id=e87155cfd9df81b19f0fe80f9823bcf1 timeout=20000ms state=ready
forum_1          | I, [2021-04-12T14:47:35.743981 #28]  INFO -- : source=rack-timeout id=e87155cfd9df81b19f0fe80f9823bcf1 timeout=20000ms service=11ms state=completed
forum_1          | 172.18.0.10 - - [12/Apr/2021:14:47:35 +0000] "PUT /api/v1/users/25?request_id=67c3c045-37dc-431e-8962-4f0f07d7216f HTTP/1.1" 400 29 0.0131

So it really seems like somehow it’s only broken for my test user(s, I actually have tried with two separate accounts.) Any thoughts?

Oh, and on a hunch from another thread, I checked the LMS log and I see this interesting error:

lms_1            | Traceback (most recent call last):
lms_1            |   File "./openedx/core/djangoapps/django_comment_common/comment_client/user.py", line 154, in _retrieve
lms_1            |     response = utils.perform_request(
lms_1            |   File "./openedx/core/djangoapps/django_comment_common/comment_client/utils.py", line 83, in perform_request
lms_1            |     raise CommentClientRequestError(response.text, response.status_code)
lms_1            | openedx.core.djangoapps.django_comment_common.comment_client.utils.CommentClientRequestError
lms_1            | 
lms_1            | During handling of the above exception, another exception occurred:
lms_1            | 
lms_1            | Traceback (most recent call last):
lms_1            |   File "./lms/djangoapps/courseware/views/views.py", line 617, in get
lms_1            |     return super(CourseTabView, self).get(request, course=course, page_context=page_context, **kwargs)
lms_1            |   File "/openedx/venv/lib/python3.8/site-packages/web_fragments/views.py", line 25, in get
lms_1            |     fragment = self.render_to_fragment(request, **kwargs)
lms_1            |   File "./lms/djangoapps/courseware/views/views.py", line 768, in render_to_fragment
lms_1            |     return tab.render_to_fragment(request, course, **kwargs)
lms_1            |   File "/openedx/edx-platform/common/lib/xmodule/xmodule/tabs.py", line 293, in render_to_fragment
lms_1            |     return self.fragment_view.render_to_fragment(request, course_id=six.text_type(course.id), **kwargs)
lms_1            |   File "./lms/djangoapps/discussion/views.py", line 724, in render_to_fragment
lms_1            |     base_context = _create_base_discussion_view_context(request, course_key)
lms_1            |   File "./lms/djangoapps/discussion/views.py", line 425, in _create_base_discussion_view_context
lms_1            |     user_info = cc_user.to_dict()
lms_1            |   File "./openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 62, in to_dict
lms_1            |     self.retrieve()
lms_1            |   File "./openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 67, in retrieve
lms_1            |     self._retrieve(*args, **kwargs)
lms_1            |   File "./openedx/core/djangoapps/django_comment_common/comment_client/user.py", line 165, in _retrieve
lms_1            |     self.save()
lms_1            |   File "./openedx/core/djangoapps/django_comment_common/comment_client/models.py", line 139, in save
lms_1            |     response = perform_request(
lms_1            |   File "./openedx/core/djangoapps/django_comment_common/comment_client/utils.py", line 83, in perform_request
lms_1            |     raise CommentClientRequestError(response.text, response.status_code)
lms_1            | openedx.core.djangoapps.django_comment_common.comment_client.utils.CommentClientRequestError: ["Username is already taken"]

Is it possible my test accounts somehow got the same username as someone else’s but it still allowed registration?

OK, well I don’t know what the root cause is here, and why my first 2 users were broken, but I registered a 3rd non-admin user, and everything worked fine. :open_mouth:

1 Like

Let me just say that I love it when users post very detailed, documented questions and then provide the solution themselves (all within less than 15 minutes).

Well, I mean it’s not really a solution, since we have no idea what happened or why… but it’s certainly a workaround which might help googlers

@regis I’m still seeing this behavior for each account I delete and try to recreate for testing. I delete accounts with:

tutor local run lms ./manage.py lms manage_user --remove username email

So I think there’s something about that command which is not fully cleaning up the system. I’m on 11.3.0 but the behavior is still there. I don’t want to have to keep creating new accounts to work around this issue (I’m up to test account #5 at this point.)

I just confirmed this is 100% reproducible. I just used the above “manage_user --remove” command to remove my 5th testing account, then I re-registered it, enrolled it in a beta class, and it could go to the class fine, but no longer see the forums due to the “Username is already taken” error.

And this may or may not be related, but just out of curiosity I tried to self-delete the ee account from it’s own account profile page, and got the following error:

lms_1            | 2021-06-11 13:50:57,287 INFO 7 [tracking] [user 220] [ip 1.2.3.4] logger.py:42 - {"name": "/api/user/v1/accounts/deactivate_logout/", "context": {"user_id": 220, "path": "/api/user/v1/accounts/deactivate_logout/", "course_id": "", "org_id": ""}, "username": "ee", "session": "03070d48b9031f5d5a95f6d6d83e1c68", "ip": "1.2.3.4", "agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0", "host": "test.knoise.net", "referer": "https://test.knoise.net/account/settings", "accept_language": "en-US,en;q=0.5", "event": "{\"GET\": {}, \"POST\": {\"password\": \"********\"}}", "time": "2021-06-11T13:50:57.287490+00:00", "event_type": "/api/user/v1/accounts/deactivate_logout/", "event_source": "server", "page": null}
lms_1            | 2021-06-11 13:50:57,302 INFO 7 [edx_rest_framework_extensions.auth.jwt.middleware] [user 220] [ip 1.2.3.4] middleware.py:70 - ('The view DeactivateLogoutView allows Jwt Authentication. The required permission class, NotJwtRestrictedApplication,', ' was automatically added.')
lms_1            | 2021-06-11 13:50:57,389 ERROR 7 [openedx.core.djangoapps.user_api.accounts.views] [user 220] [ip 1.2.3.4] views.py:478 - 500 error deactivating account Default state does not exist! Populate retirement states to retire users.
lms_1            | Traceback (most recent call last):
lms_1            |   File "./openedx/core/djangoapps/user_api/models.py", line 338, in create_retirement
lms_1            |     pending = RetirementState.objects.all().order_by('state_execution_order')[0]
lms_1            |   File "/openedx/venv/lib/python3.8/site-packages/django/db/models/query.py", line 309, in __getitem__
lms_1            |     return qs._result_cache[0]
lms_1            | IndexError: list index out of range
lms_1            | 
lms_1            | During handling of the above exception, another exception occurred:
lms_1            | 
lms_1            | Traceback (most recent call last):
lms_1            |   File "./openedx/core/djangoapps/user_api/accounts/views.py", line 429, in post
lms_1            |     UserRetirementStatus.create_retirement(request.user)
lms_1            |   File "./openedx/core/djangoapps/user_api/models.py", line 340, in create_retirement
lms_1            |     raise RetirementStateError('Default state does not exist! Populate retirement states to retire users.')
lms_1            | openedx.core.djangoapps.user_api.models.RetirementStateError: Default state does not exist! Populate retirement states to retire users.
lms_1            | 2021-06-11 13:50:57,400 ERROR 7 [django.request] [user None] [ip None] log.py:222 - Internal Server Error: /api/user/v1/accounts/deactivate_logout/
lms_1            | [pid: 7|app: 0|req: 13321/37970] 172.18.0.12 () {54 vars in 2590 bytes} [Fri Jun 11 13:50:57 2021] POST /api/user/v1/accounts/deactivate_logout/ => generated 75 bytes in 232 msecs (HTTP/1.0 500) 8 headers in 393 bytes (1 switches on core 0)

I wouldn’t necessarily expect it to work while the account is in a messed up state, but it’s just an FYI for another place something might be broken.

If you try to delete user id from mongo database cs_comments

Bump on this @regis. If you’re taking over as the default recommended install method (congrats on that btw, well-deserved), the deletion of a user probably shouldn’t have tutor-tools-specific errors.

I’m not sure what I can add to your analysis. When a user is deleted from the LMS/CMS with ./manage.py lms manage_user --remove it looks like it is not deleted from the forum database – which is separate from the LMS/CMS. As far as I understand, this problem is not specific to Tutor but will also happen in the native installation. Admittedly, this could be considered as a bug, but I don’t see why I should be responsible for fixing it.

You will want to delete the users from the forum database. I don’t know exactly how to do so, but I think you could look at “retiring” users from the forums. You should git grep retired_username in the edx-platform and the cs_comments_service code base.

If you would like to report this issue, I suggest you describe your problem (and link to this conversation) in the build/test/release working group board: Issues · openedx/build-test-release-wg · GitHub

We also ran into this problem. It is easy to fix if you know the commands.

  1. Enter the mongo shell (use docker ps to find the running container if different).

     docker exec -it tutor_local_mongodb_1 mongo
    
  2. Find the problem user that still exists in cs_comments_service (i.e. ‘jimbo’).

    use cs_comments_service
    db.users.find({"username":"jimbo"})
    
  3. Remove the user from cs_comments_service.

    # use the same query from find()
    db.users.remove({"username": "jimbo"})
    
  4. Verify that the user has been deleted.

    db.users.find({"username":"jimbo"})
    
  5. That’s it! Forum access is restored.

Reference sites:

1 Like