英文:
java.util.concurrent.ExecutionException: org.apache.kafka.connect.errors.ConnectException: java.nio.file.NoSuchFileException: \tmp\connect.offsets
问题
我在Windows本地运行Kafka和Debezium PostgreSQL连接器。一切都很好,主题也已存储。只是出现了这个错误:
java.util.concurrent.ExecutionException: org.apache.kafka.connect.errors.ConnectException: java.nio.file.NoSuchFileException: \tmp\connect.offsets
我遵循的所有步骤:
运行Zookeeper:
.\kafka\bin\windows\zookeeper-server-start.bat .\kafka\config\zookeeper.properties
运行Kafka:
.\kafka\bin\windows\kafka-server-start.bat .\kafka\config\server.properties
使用postgres-connector.properties文件运行连接器:
.\kafka\bin\windows\connect-standalone.bat .\kafka\config\connect-standalone.properties .\kafka\postgres-connector.properties
postgres-connector.properties文件:
name=my-postgres-connector
connector.class=io.debezium.connector.postgresql.PostgresConnector
database.hostname=localhost
database.port=5432
database.user=postgres
database.password=1524
database.dbname=MartenDB
database.server.name=postgres
table.include.list=public.student
plugin.name=pgoutput
topic.prefix=sid
slot.name=connector1_replication_slot
英文:
I am running kafka and debezium PostgreSQL connector locally on Windows. everything else is good, topics are also stored. just getting this error:
java.util.concurrent.ExecutionException: org.apache.kafka.connect.errors.ConnectException: java.nio.file.NoSuchFileException: \tmp\connect.offsets
All the steps I followed:
Running Zookeeper:
.\kafka\bin\windows\zookeeper-server-start.bat .\kafka\config\zookeeper.properties
Running Kafka:
.\kafka\bin\windows\kafka-server-start.bat .\kafka\config\server.properties
Running Connector With postgres-connector.properties file:
.\kafka\bin\windows\connect-standalone.bat .\kafka\config\connect-standalone.properties .\kafka\postgres-connector.properties
postgres-connector.properties file
name=my-postgres-connector
connector.class=io.debezium.connector.postgresql.PostgresConnector
database.hostname=localhost
database.port=5432
database.user=postgres
database.password=1524
database.dbname=MartenDB
database.server.name=postgres
table.include.list=public.student
plugin.name=pgoutput
topic.prefix=sid
slot.name=connector1_replication_slot
答案1
得分: 1
你需要编辑 connect-standalone.properties
,以使用适当的 Windows 文件路径,而不是 /tmp
用于偏移文件。
你还应该使用 connect-distributed.sh
,它将使用 Kafka 主题而不是文件来存储偏移量。
英文:
You need to edit the connect-standalone.properties
to use proper Windows filepaths, not /tmp
for the offsets file.
You should also use connect-distributed.sh
instead, which will use Kafka topics, not files for offset storage.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论