Kafka Trigger Error

Describe the issue/error/question

I receive the below error when I use kafka trigger. I tried with two different kafka clusters including a remote one and local one via this docker-compose. But I cannot fix the error I always get the same error, could you please help me to identify what’s wrong. This happens when I listen for a test event or start the flow.

version: "2"

services:
  zookeeper:
    image: docker.io/bitnami/zookeeper:3.8
    ports:
      - "2181:2181"
    volumes:
      - "zookeeper_data:/bitnami"
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
  kafka:
    image: docker.io/bitnami/kafka:3.2
    ports:
      - "9092:9092"
    volumes:
      - "kafka_data:/bitnami"
    environment:
      - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
      - ALLOW_PLAINTEXT_LISTENER=yes
    depends_on:
      - zookeeper

volumes:
  zookeeper_data:
    driver: local
  kafka_data:
    driver: local

What is the error message (if any)?

{“level”:“ERROR”,“timestamp”:“2022-09-04T21:23:59.297Z”,“logger”:“kafkajs”,“message”:“[BrokerPool] Closed connection”,“retryCount”:0,“retryTime”:321}

{“level”:“ERROR”,“timestamp”:“2022-09-04T21:25:33.436Z”,“logger”:“kafkajs”,“message”:“[BrokerPool] Closed connection”,“retryCount”:0,“retryTime”:329}

Please share the workflow

(Sorry I cannot share whole flow as it has business logic)

Share the output returned by the last node

N/A

Information on your n8n setup

  • 0.193.3
  • **Database you’re using (default: SQLite):SQLite
  • **Running n8n with the execution process [own(default), main]:own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm and docker

Hey @Tolga_Kavukcu,

Welcome to the community :tada:

As a quick test can you try setting Max Number of Requests to 1 or use an expression and put {{null}} in there to see if that helps?

I am aware of an issue with the Kafka trigger so I want to check if you are seeing the same problem or if this is possibly just a networking issue. Have you also tried sending a message to the Kafka queue?

1 Like

Hi @Jon

Thanks for your response

I tried setting Max Number of Requests to 1 and {{null}}, this actually worked. My question would be what should be the value for the prod execution ? What should I configure for consuming messages continuously

Regards

Hey @Tolga_Kavukcu,

The request number would depend on your environment but I would say if you use {{null}} which “should” be the default it will just work it out itself.

Luckily this is an issue we are aware of and I have a quick change to test this morning and if all is good it should end up merged and included in the next release.

Thanks @Jon , got it. I will do the research on my side. I will check the new release when it’s available and share my test too.

Cheers!

1 Like