java.util.concurrent.ExecutionException: org.apache.kafka.connect.errors.ConnectException: java.nio.file.NoSuchFileException: \tmp\connect.offsets

huangapple go评论70阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年7月27日 21:59:06
  • 转载请务必保留本文链接:https://go.coder-hub.com/76780523.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定