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

Migration from kafka-node(Apache Kafka 0.9) to kafka.js(Apache Kafka 0.11) #630

Closed
0xslipk opened this issue Jan 13, 2020 · 4 comments
Closed

Comments

@0xslipk
Copy link

0xslipk commented Jan 13, 2020

Hi Guys,

I current migrating an application from kafka-node to kafka.js, using rolling update and get this error:

2020-01-10T13:38:14.764Z INFO 5 (LogCreator.js:27) INFO [Consumer] Starting: {"timestamp":"2020-01-10T13:38:14.764Z","logger":"kafkajs","groupId":"service-group"}
2020-01-10T13:38:14.770Z INFO 5 (LogCreator.js:27) INFO [Consumer] Starting: {"timestamp":"2020-01-10T13:38:14.770Z","logger":"kafkajs","groupId":"contigo-group"}
2020-01-10T13:38:14.775Z ERROR 5 (LogCreator.js:27:LogCreator) ERROR [Connection] Response JoinGroup(key: 11, version: 2): {"timestamp":"2020-01-10T13:38:14.775Z","logger":"kafkajs","broker":"127.0.0.1:9092","clientId":"kafka.consumer-group.client.contigo.5.4dc02032-8926-4e1f-a293-8b8aa8dd1200","error":"The group member's supported protocols are incompatible with those of existing members","correlationId":0,"size":24} CallStack:    at LogCreator (/usr/src/app/node_modules/utils/kafka/libraries/kafka.js/LogCreator.js:27:36)
    at /usr/src/app/node_modules/kafkajs/src/loggers/index.js:16:3
    at Connection.logError (/usr/src/app/node_modules/kafkajs/src/network/connection.js:85:7)
    at Connection.send (/usr/src/app/node_modules/kafkajs/src/network/connection.js:317:14)
2020-01-10T13:38:14.776Z ERROR 5 (LogCreator.js:27:LogCreator) ERROR [Consumer] Crash: KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members: {"timestamp":"2020-01-10T13:38:14.776Z","logger":"kafkajs","groupId":"service-group","stack":"KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members\n    at createErrorFromCode (/usr/src/app/node_modules/kafkajs/src/protocol/error.js:536:10)\n    at Object.parse (/usr/src/app/node_modules/kafkajs/src/protocol/requests/joinGroup/v0/response.js:37:11)\n    at Connection.send (/usr/src/app/node_modules/kafkajs/src/network/connection.js:306:35)"} CallStack:    at LogCreator (/usr/src/app/node_modules/utils/kafka/libraries/kafka.js/LogCreator.js:27:36)
    at Object.error (/usr/src/app/node_modules/kafkajs/src/loggers/index.js:16:3)
    at Runner.onCrash (/usr/src/app/node_modules/kafkajs/src/consumer/index.js:244:14)
    at Runner.start (/usr/src/app/node_modules/kafkajs/src/consumer/runner.js:108:12)
2020-01-10T13:38:14.776Z INFO 5 (LogCreator.js:27) INFO [Consumer] Stopped: {"timestamp":"2020-01-10T13:38:14.776Z","logger":"kafkajs","groupId":"service-group"}
2020-01-10T13:38:14.778Z INFO 5 (KafkaConsumerHandler.js:80) Consumer closed for topic: voc.sc
2020-01-10T13:38:14.779Z ERROR 5 (KafkaConsumerHandler.js:63:KafkaConsumerHandler.consumerGroup.on) Error with consumerGroup service-group isStandby false topic voc.sc: {"message":"The group member's supported protocols are incompatible with those of existing members","stack":"KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members\n    at createErrorFromCode (/usr/src/app/node_modules/kafkajs/src/protocol/error.js:536:10)\n    at Object.parse (/usr/src/app/node_modules/kafkajs/src/protocol/requests/joinGroup/v0/response.js:37:11)\n    at Connection.send (/usr/src/app/node_modules/kafkajs/src/network/connection.js:306:35)","type":"INCONSISTENT_GROUP_PROTOCOL","name":"KafkaJSProtocolError"} CallStack:    at KafkaConsumerHandler.consumerGroup.on (/usr/src/app/node_modules/utils/kafka/libraries/kafka.js/KafkaConsumerHandler.js:63:14)
    at EventEmitter.instrumentationEmitter.addListener.event (/usr/src/app/node_modules/kafkajs/src/consumer/index.js:284:23)
    at EventEmitter.emit (events.js:193:13)
    at EventEmitter.emit (domain.js:481:20)
    at InstrumentationEventEmitter.emit (/usr/src/app/node_modules/kafkajs/src/instrumentation/emitter.js:24:20)
    at Runner.onCrash (/usr/src/app/node_modules/kafkajs/src/consumer/index.js:252:30)
2020-01-10T13:38:14.781Z ERROR 5 (LogCreator.js:27:LogCreator) ERROR [Connection] Response JoinGroup(key: 11, version: 2): {"timestamp":"2020-01-10T13:38:14.781Z","logger":"kafkajs","broker":"10.180.110.56:9092","clientId":"kafka.consumer-group.client.contigo.5.8181f876-8f5f-4b57-b10d-ae5aec9029d5","error":"The group member's supported protocols are incompatible with those of existing members","correlationId":0,"size":24} CallStack:    at LogCreator (/usr/src/app/node_modules/utils/kafka/libraries/kafka.js/LogCreator.js:27:36)
    at /usr/src/app/node_modules/kafkajs/src/loggers/index.js:16:3
    at Connection.logError (/usr/src/app/node_modules/kafkajs/src/network/connection.js:85:7)
    at Connection.send (/usr/src/app/node_modules/kafkajs/src/network/connection.js:317:14)
2020-01-10T13:38:14.785Z ERROR 5 (LogCreator.js:27:LogCreator) ERROR [Consumer] Crash: KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members: {"timestamp":"2020-01-10T13:38:14.785Z","logger":"kafkajs","groupId":"contigo-group","stack":"KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members\n    at createErrorFromCode (/usr/src/app/node_modules/kafkajs/src/protocol/error.js:536:10)\n    at Object.parse (/usr/src/app/node_modules/kafkajs/src/protocol/requests/joinGroup/v0/response.js:37:11)\n    at Connection.send (/usr/src/app/node_modules/kafkajs/src/network/connection.js:306:35)"} CallStack:    at LogCreator (/usr/src/app/node_modules/utils/kafka/libraries/kafka.js/LogCreator.js:27:36)
    at Object.error (/usr/src/app/node_modules/kafkajs/src/loggers/index.js:16:3)
    at Runner.onCrash (/usr/src/app/node_modules/kafkajs/src/consumer/index.js:244:14)
    at Runner.start (/usr/src/app/node_modules/kafkajs/src/consumer/runner.js:108:12)
2020-01-10T13:38:14.786Z INFO 5 (LogCreator.js:27) INFO [Consumer] Stopped: {"timestamp":"2020-01-10T13:38:14.785Z","logger":"kafkajs","groupId":"contigo-group"}
2020-01-10T13:38:14.786Z INFO 5 (KafkaConsumerHandler.js:80) Consumer closed for topic: intentions.voc
2020-01-10T13:38:14.787Z ERROR 5 (KafkaConsumerHandler.js:63:KafkaConsumerHandler.consumerGroup.on) Error with consumerGroup contigo-group isStandby false topic intentions.voc: {"message":"The group member's supported protocols are incompatible with those of existing members","stack":"KafkaJSProtocolError: The group member's supported protocols are incompatible with those of existing members\n    at createErrorFromCode (/usr/src/app/node_modules/kafkajs/src/protocol/error.js:536:10)\n    at Object.parse (/usr/src/app/node_modules/kafkajs/src/protocol/requests/joinGroup/v0/response.js:37:11)\n    at Connection.send (/usr/src/app/node_modules/kafkajs/src/network/connection.js:306:35)","type":"INCONSISTENT_GROUP_PROTOCOL","name":"KafkaJSProtocolError"} CallStack:    at KafkaConsumerHandler.consumerGroup.on (/usr/src/app/node_modules/utils/kafka/libraries/kafka.js/KafkaConsumerHandler.js:63:14)
    at EventEmitter.instrumentationEmitter.addListener.event (/usr/src/app/node_modules/kafkajs/src/consumer/index.js:284:23)
    at EventEmitter.emit (events.js:193:13)
    at EventEmitter.emit (domain.js:481:20)
    at InstrumentationEventEmitter.emit (/usr/src/app/node_modules/kafkajs/src/instrumentation/emitter.js:24:20)
    at Runner.onCrash (/usr/src/app/node_modules/kafkajs/src/consumer/index.js:252:30)

Is any way to setup the retry for group join?

@ankon
Copy link
Contributor

ankon commented Jan 13, 2020

KafkaJS uses a different group assignment protocol than kafka-node, so while you're updating your consumers and have both kafka-node and KafkaJS consumers you will see these.

As soon as all consumers are upgraded the protocols should be compatible again, and these messages will go away.

From our experience with switching protocols: It might be advisable to do another rolling update, to ensure that the leaders do see the correct state. See #545 for a potentially related issue.

@WaleedAshraf
Copy link
Contributor

Hi @jarcodallo,

I'm also trying out to switch from Blizzard/node-rdkafka to kafka-node OR KafkaJS.
Can you tell why are you switching from kafka-node to KafkaJS? Any issues? Procs Cons?

Thanks,

@Nevon
Copy link
Collaborator

Nevon commented Mar 14, 2020

I'm closing this issue, as it's not an issue with KafkaJS, and Ankon has already explained the behavior.

@Nevon Nevon closed this as completed Mar 14, 2020
@0xslipk
Copy link
Author

0xslipk commented Mar 14, 2020

Sure, thanks for you help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants