Closed cion-yatindra closed 1 year ago
{"level":"ERROR","timestamp":"2023-08-11T13:24:37.575Z","logger":"kafkajs","message":"[Consumer] Crash: KafkaJSNonRetriableError: Cannot change principals during re-authentication from IAM.arn:aws:sts::020260453790:assumed-role/msk-full-iam/aws-sdk-js-session-1691756680572: IAM.arn:aws:sts::020260453790:assumed-role/msk-full-iam/aws-sdk-js-session-1691760272714","groupId":"group","stack":"KafkaJSNonRetriableError: Cannot change principals during re-authentication from IAM.arn:aws:sts::020260453790:assumed-role/msk-full-iam/aws-sdk-js-session-1691756680572: IAM.arn:aws:sts::020260453790:assumed-role/msk-full-iam/aws-sdk-js-session-1691760272714\n at /home/node/app/node_modules/kafkajs/src/retry/index.js:55:18\n at runMicrotasks ()\n at processTicksAndRejections (node:internal/process/task_queues:96:5)"}
same issue, does anyone as a retriable configuration ?
Closing this issue as setting AWS_ROLE_SESSION_NAME
in environment variable to any static value resolves the error.
Closing this issue as setting
AWS_ROLE_SESSION_NAME
in environment variable to any static value resolves the error.
Is there any detailed explanation why it solves the issue?
Describe the bug I have a consumer running on EKS on aws and have set up MSK for kafka, both of them in same VPC. I have used
@jm18457/kafkajs-msk-iam-authentication-mechanism
library for authentication using IAM roles. I was able to consume messages on EKS, but out of nowhere I gotCrash: KafkaJSNonRetriableError: Cannot change principals during re-authentication from IAM.arn:aws:sts::<AppID>:assumed-role/CionEKSPodRole/aws-sdk-js-session-<SessionID1>: IAM.arn:aws:sts::<AppID>:assumed-role/CionEKSPodRole/aws-sdk-js-session-<SessionID2>
Error and consumer stopped listening messages, while i am still able to produce messages on other end.To Reproduce
Code snippet for cosumer:
Expected behavior Consumer shouldn't crash or retry connecting to the broker.
Observed behavior
Crash: KafkaJSNonRetriableError: Cannot change principals during re-authentication from IAM.arn:aws:sts::<AppID>:assumed-role/CionEKSPodRole/aws-sdk-js-session-<SessionID1>: IAM.arn:aws:sts::<AppID>:assumed-role/CionEKSPodRole/aws-sdk-js-session-<SessionID2>
Environment: