Mender-connect terminal fails to connect

Sessions fail to establish, without producing any logs on device. The only relevant output is the following from the deviceconnect service:

time="2021-08-30T14:36:08Z" level=info byteswritten=152 clientip=10.42.0.72 file=middleware_gin.go func=accesslog.Middleware.func1 line=131 method=GET path=/api/management/v1/deviceconnect/devices/f14ef979-a0f2-4ef5-8253-f6c98e5ff6ff qs= request_id=020670d3-5fa6-45db-8244-6bc696b79293 responsetime=429us status=200 ts="2021-08-30T14:36:08Z" type=HTTP/1.1 user_id=f661e2f8-9223-440a-b78d-b980a2ec4a54 useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 Edg/92.0.902.84"
time="2021-08-30T14:36:09Z" level=error msg="websocket closed with error: failed to submit audit log: workflows: Context lacking tenant identity" file=management.go func=http.writerFinalizer line=326 request_id=2aa1685f-f03e-45e1-80c5-0ec5bcd9a000 user_id=f661e2f8-9223-440a-b78d-b980a2ec4a54
time="2021-08-30T14:36:09Z" level=warning msg="failed to free session: store: session not found" file=management.go func=http.ManagementController.Connect.func1 line=173 request_id=2aa1685f-f03e-45e1-80c5-0ec5bcd9a000 user_id=f661e2f8-9223-440a-b78d-b980a2ec4a54
time="2021-08-30T14:36:09Z" level=info byteswritten=0 clientip=10.42.0.72 file=middleware_gin.go func=accesslog.Middleware.func1 line=131 method=GET path=/api/management/v1/deviceconnect/devices/f14ef979-a0f2-4ef5-8253-f6c98e5ff6ff/connect qs= request_id=2aa1685f-f03e-45e1-80c5-0ec5bcd9a000 responsetime=44465us status=200 ts="2021-08-30T14:36:09Z" type=HTTP/1.1 user_id=f661e2f8-9223-440a-b78d-b980a2ec4a54 useragent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36 Edg/92.0.902.84"

How is your server hosted? Are you using hosted Mender or did you install it yourself?
It may be a server mis-configuration so if you can share the edition and versions you are using (client and server), it may help.

Take a look here, it looks like the same issue: Remote terminal failing on mender 3.0 server - #8 by tranchitella