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

Intermittent error on multi-tenancy: "Error: 16 UNAUTHENTICATED: Expected Identity to provide authorized tenants, see cause for details" #53

Closed
pierre-yves-monnet opened this issue Dec 14, 2023 · 4 comments
Assignees
Labels
backlog Low priority. May need additional support to get done. zeebe-client

Comments

@pierre-yves-monnet
Copy link

Expected Behavior

No error should pop up

Current Behavior

A cluster is created, multi-tenancy enabled. 2 tenants are created, blue and green.

A script is created:

  • deploying the same simple process on both tenants. This process contains a service task
  • Starting a worker, with a filter on each tenant (so two workers are started)
  • Every 5 seconds, a new process instance is created on the green tenant
  • every 20 seconds, a new process instance is created on the red tenant

Process instances are created, and workers execute jobs, but from time to time, an Error: 16 UNAUTHENTICATED: is visible in the log. Even so
, all service tasks are completed.

Possible Solution

No solution

Steps to Reproduce

Create a cluster, with two tenants red and green
create a client ID / Client Secret
Run the script

Context (Environment)

Multi-tenancy usage

Detailed Description

Log visible:

 ##### Started/Job RED: 0/0, GREEN: 1/2
------  Green process instance started: [2251799813686010]
>>>> Execute GreenJob PI=[2251799813686010] tenant=[green]
15:42:07.412 | zeebe |  [service-task] ERROR: Grpc Stream Error: 16 UNAUTHENTICATED: Expected Identity to provide authorized tenants, see cause for details


 ##### Started/Job RED: 0/0, GREEN: 2/3
------  Green process instance started: [4503599627371180]
>>>> Execute GreenJob PI=[4503599627371180] tenant=[green]
15:42:12.524 | zeebe |  [service-task] ERROR: Grpc Stream Error: 16 UNAUTHENTICATED: Expected Identity to provide authorized tenants, see cause for details


 ##### Started/Job RED: 0/0, GREEN: 3/4
(node:226) UnhandledPromiseRejectionWarning: Error: 16 UNAUTHENTICATED: Expected Identity to provide authorized tenants, see cause for details
    at callErrorFromStatus (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
    at Object.onReceiveStatus (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/client.js:192:76)
    at listener.onReceiveStatus.processedStatus (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/call-interface.js:78:35)
    at Object.onReceiveStatus (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/zeebe-node/dist/lib/GrpcClient.js:97:36)
    at InterceptingListenerImpl.onReceiveStatus (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/call-interface.js:73:23)
    at Object.onReceiveStatus (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
    at Object.onReceiveStatus (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
    at process.nextTick (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/resolving-call.js:99:78)
    at process._tickCallback (internal/process/next_tick.js:61:11)
for call at
    at ServiceClientImpl.makeUnaryRequest (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/client.js:160:32)
    at ServiceClientImpl.<anonymous> (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
    at Promise (/mnt/d/pym/CamundaDrive/Support & Consulting/S-19554 Avertra NodeJS/avertra-test/node_modules/zeebe-node/dist/lib/GrpcClient.js:272:47)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:226) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:226) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
--

Possible Implementation

red-green.txt
simple-bpmn.txt

@jwulf jwulf transferred this issue from camunda-community-hub/zeebe-client-node-js Mar 11, 2024
@jwulf jwulf self-assigned this Mar 11, 2024
@jwulf jwulf added zeebe-client backlog Low priority. May need additional support to get done. labels Mar 11, 2024
@jwulf jwulf changed the title Authentication error during execution on multi-tenancy, but still works Intermittent error on multi-tenancy: "Error: 16 UNAUTHENTICATED: Expected Identity to provide authorized tenants, see cause for details" May 21, 2024
@jwulf
Copy link
Member

jwulf commented May 21, 2024

This is likely caused by resource starvation in the Zeebe gateway or Identity. Allocating more resources to them should mitigate this.

@pierre-yves-monnet what resources did you allocate for the cluster?

Do you have a cluster that I can test against?

@jwulf
Copy link
Member

jwulf commented May 22, 2024

See this issue in Zeebe-land: camunda/camunda#18697

That's an attempt to mitigate this on the gateway.

Package 8.5.4 and 8.6.6 have a fix for #163 in it that may solve this.

@jwulf jwulf closed this as completed Jun 6, 2024
@github-project-automation github-project-automation bot moved this from 🆕 Inbox to ✅ Done in Developer Experience Jun 6, 2024
@jwulf
Copy link
Member

jwulf commented Jun 20, 2024

"to work around the problem, please increase the maximum allowed number of threads via zeebe.gateway.threads.grpcMaxThreads. The default value is 2*numberOfCores"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Low priority. May need additional support to get done. zeebe-client
Projects
Archived in project
Development

No branches or pull requests

2 participants