debezium无法使用带有默认插件pgoutput的postgres 11访问文件“ decoderbufs”

时间:2020-01-30 02:14:46

标签: apache-kafka debezium

我是kafka的新手,我正在尝试使用debezium postgres连接器。 但是即使将postgres版本11与标准插件一起使用,我也会收到此错误: org.apache.kafka.connect.errors.ConnectException:org.postgresql.util.PSQLException:错误:无法访问文件“ decoderbufs”:没有这样的文件或目录

要运行kafka / debezium,我使用的是fast-data-dev docker的镜像,如下图所示

  # this is our kafka cluster.
  kafka-cluster:
    image: landoop/fast-data-dev:latest
    environment:
      ADV_HOST: 127.0.0.1         # Change to 192.168.99.100 if using Docker Toolbox
      RUNTESTS: 0                 # Disable Running tests so the cluster starts faster
    ports:
      - 2181:2181                 # Zookeeper
      - 3030:3030                 # Landoop UI
      - 8081-8083:8081-8083       # REST Proxy, Schema Registry, Kafka Connect ports
      - 9581-9585:9581-9585       # JMX Ports
      - 9092:9092                 # Kafka Broker

运行后,我可以打开本地主机:3030以选择debezium连接器,我以这种方式配置它:

enter image description here

,我在版本11.5中使用AWS Postgres rds 我看到了几个使用wal2json的教程,但是我在rds.extensions中找不到它,也没有找到添加它的方法。无论如何,从版本10开始,debezium可以使用pgoutput,而且显然不需要配置。

rds.logical_replication属性设置为1 执行SHOW wal_level时;在终端中,我看到它返回逻辑 在文档中说必须设置max_wal_senders = 1和max_replication_slots = 1 将is 5, so I left the default that的最小值设为10

我没有定义角色REPLICATION,因为据我所知rds无法实现

在此图像中,您可以看到使用的版本是11.5

enter image description here

但是我收到下面显示的错误

enter image description here

2 个答案:

答案 0 :(得分:6)

您尚未在Debezium中将 “ plugin.name” 属性设置为 “ pgoutput” {3}}您已经知道了。但是,此答案适用于其他人,这些人不知道在哪里设置此选项,并且更加清楚。

在以下连接器属性中:

connector properties

由于您尚未设置 plugin.name 选项,因此它采用的默认值为 decoderbufs ,这就是为什么出现以下错误的原因:

enter image description here

“ plugin.name” 明确设置为“ pgoutput” 应该可以解决此问题。

{ 
  "connector.class": "io.debezium.connector.postgresql.PostgresConnector", 
  "database.user": "postgres",
  "database.dbname": "xxxxx",
  "tasks.max": "1", 
  "database.hostname": "xxxx.rds.amazonaws.com", 
  "database.password": "xxxx", 
  "database.server.name": "database-1",
  "database.port": "5432",
  "plugin.name": "pgoutput" --> this property
}

答案 1 :(得分:0)

谢谢人们,问题是我错过了“ plugin.name”选项,并将其设置为pgoutput 谢谢

相关问题