Skip to main content
Question

How to solve this error when i use KafkaExport

  • Mar 16, 2021 12:59 AM UTC
  • 2 replies
  • 12 views

HyeontaeJu
Forum|alt.badge.img+2

I wanna use KafkaExport function,, but when i was test the KafkaExport function I encounter this message.. what's wrong??..
my query

SELECT
     KafkaExport(null, product_id::VARCHAR, product_id
         USING PARAMETERS brokers = 'localhost:9092', 
   topic='vertica_test') OVER (PARTITION BEST)
FROM
     products;

error message

SQL Error [5861] [VP001]: [Vertica][VJDBC](5861) ERROR: Error calling processPartition() in User Function KafkaExport at [src/KafkaExport.cpp:215], error code: 0, message: Error connecting to brokers localhost:9092: Local: Broker transport failure

2 replies

SergeB
Forum|alt.badge.img
  • Participating Frequently
  • Mar 16, 2021 3:20 PM UTC

Do you have a local Kafka broker running on port 9092? If so, can you test with kafkacat or KafkaCheckbrokers
/opt/vertica/packages/kafka/bin/kafkacat -L -b localhost:9092
or
select KafkaCheckBrokers(using parameters brokers='localhost:9092') over ();


HyeontaeJu
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • Mar 17, 2021 12:56 AM UTC

@SergeB Thank you very mush. I set the test environment using docker.
i resolved this issue's problem that Vertica's KafkaExtract function cannot connect to kafka topic by resetting the docker network environment.

thank you so much comment by this issue.