Remote terminal failing on mender 3.0 server

I just created a mender 3.0 server with kubernetes. The device is registered and the remote terminal option is available. But when I connect it immediately disconnects. The error in the deviceconnect pod indicates there is no context tenant identity. I am running the open source version so I didn’t think we needed any tenant setup.

On the device the mender-connect version is 1.2.0

Here is the log from deviceconnect on the server.

time=“2021-08-04T15:28:43Z” 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=643f8d10-18b2-45c6-8499-ed32aaa08dbc user_id=0abc2d71-d6e8-4d66-b720-6da83b98e6a1
time=“2021-08-04T15:28:43Z” level=warning msg=“failed to free session: store: session not found” file=management.go func=http.ManagementController.Connect.func1 line=173 request_id=643f8d10-18b2-45c6-8499-ed32aaa08dbc user_id=0abc2d71-d6e8-4d66-b720-6da83b98e6a1

Same error here, deployed via the official mender helm chart with global.enterprise=false and auditlogs.enabled=false

@wisse-cp and @dkieswetter, can you please share your values.yaml file, removing all the sensitive information?

Can you try setting global.auditlogs to false?

Thanks @tranchitella I added global.auditlogs to false and this seemed to resolve the issue.

Thanks for confirming @dkieswetter, I’m updating the docs adding this flag.

The helm templates seem to use two different checks in different places:
{{- if and .Values.auditlogs.enabled }} and {{- if }}

Wouldn’t it be a good idea to replace the latter with {{- if and }} and/or get rid of the duplicate values alltogether?

@wisse-cp yes, PR is in progress to improve it.