连接器配置无效并包含以下 1 个错误:Postgres 服务器 wal_level 属性必须为“逻辑”但是是:复制品 你可以

发布于 2025-01-09 01:41:30 字数 4939 浏览 0 评论 0原文

我正在尝试使用 Debezium Postgres Connector 使用以下命令启动 Kafka Connect 服务:

bin/connect-standalone.sh config/connect-standalone.properties config/connect-debezium-postgres.properties

运行该命令后,我收到此错误:

[2022-02-22 20:36:06,177] ERROR Postgres server wal_level property must be "logical" but is: replica (io.debezium.connector.postgresql.PostgresConnector:101)
[2022-02-22 20:36:06,293] INFO Connection gracefully closed (io.debezium.jdbc.JdbcConnection:965)
[2022-02-22 20:36:06,305] INFO AbstractConfig values: 
 (org.apache.kafka.common.config.AbstractConfig:376)
[2022-02-22 20:36:06,561] ERROR Failed to create job for config/connect-debezium-postgres.properties (org.apache.kafka.connect.cli.ConnectStandalone:107)
[2022-02-22 20:36:06,576] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:117)
java.util.concurrent.ExecutionException: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 1 error(s):        
Postgres server wal_level property must be "logical" but is: replica
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`
        at org.apache.kafka.connect.util.ConvertingFutureCallback.result(ConvertingFutureCallback.java:115)
        at org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:99)
        at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:114)    
Caused by: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 1 error(s):
Postgres server wal_level property must be "logical" but is: replica
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`
        at org.apache.kafka.connect.runtime.AbstractHerder.maybeAddConfigErrors(AbstractHerder.java:691)
        at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:207)
        at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.lambda$null$0(StandaloneHerder.java:193)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)    
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)    
        at java.lang.Thread.run(Thread.java:750)
[2022-02-22 20:36:06,611] INFO Kafka Connect stopping (org.apache.kafka.connect.runtime.Connect:67)
[2022-02-22 20:36:06,612] INFO Stopping REST server (org.apache.kafka.connect.runtime.rest.RestServer:311)
[2022-02-22 20:36:06,673] INFO Stopped http_8083@26be6ca7{HTTP/1.1, (http/1.1)}{0.0.0.0:8083} (org.eclipse.jetty.server.AbstractConnector:381)
[2022-02-22 20:36:06,674] INFO node0 Stopped scavenging (org.eclipse.jetty.server.session:149)
[2022-02-22 20:36:06,710] INFO REST server stopped (org.apache.kafka.connect.runtime.rest.RestServer:328)
[2022-02-22 20:36:06,711] INFO Herder stopping (org.apache.kafka.connect.runtime.standalone.StandaloneHerder:106)
[2022-02-22 20:36:06,733] INFO Worker stopping (org.apache.kafka.connect.runtime.Worker:199)  
[2022-02-22 20:36:06,734] INFO Stopped FileOffsetBackingStore (org.apache.kafka.connect.storage.FileOffsetBackingStore:66)
[2022-02-22 20:36:06,737] INFO Metrics scheduler closed (org.apache.kafka.common.metrics.Metrics:659)
[2022-02-22 20:36:06,739] INFO Closing reporter org.apache.kafka.common.metrics.JmxReporter (org.apache.kafka.common.metrics.Metrics:663)
[2022-02-22 20:36:06,740] INFO Metrics reporters closed (org.apache.kafka.common.metrics.Metrics:669)
[2022-02-22 20:36:06,741] INFO App info kafka.connect for 10.0.2.15:8083 unregistered (org.apache.kafka.common.utils.AppInfoParser:83)
[2022-02-22 20:36:06,752] INFO Worker stopped (org.apache.kafka.connect.runtime.Worker:220)   
[2022-02-22 20:36:06,819] INFO Herder stopped (org.apache.kafka.connect.runtime.standalone.StandaloneHerder:124)
[2022-02-22 20:36:06,820] INFO Kafka Connect stopped (org.apache.kafka.connect.runtime.Connect:72)

问题是我已经将 postgresql.conf 上的 wal_level 更新为“逻辑”并重新启动以生效命令:

postgres=# SELECT pg_reload_conf();
 pg_reload_conf 
----------------
 t
(1 row)

尝试使用“pg_ctl reload”命令,但面临一个问题:

postgres=# pg_ctl reload;
ERROR:  syntax error at or near "pg_ctl"
LINE 1: pg_ctl reload;
        ^

这是在更改“postgresql.conf”文件后重新加载 Postgres 服务器的正确方法吗?还有其他方法可以解决此错误吗?

I am trying to start Kafka Connect service with Debezium Postgres Connector with this command:

bin/connect-standalone.sh config/connect-standalone.properties config/connect-debezium-postgres.properties

After running the command I'm getting this error:

[2022-02-22 20:36:06,177] ERROR Postgres server wal_level property must be "logical" but is: replica (io.debezium.connector.postgresql.PostgresConnector:101)
[2022-02-22 20:36:06,293] INFO Connection gracefully closed (io.debezium.jdbc.JdbcConnection:965)
[2022-02-22 20:36:06,305] INFO AbstractConfig values: 
 (org.apache.kafka.common.config.AbstractConfig:376)
[2022-02-22 20:36:06,561] ERROR Failed to create job for config/connect-debezium-postgres.properties (org.apache.kafka.connect.cli.ConnectStandalone:107)
[2022-02-22 20:36:06,576] ERROR Stopping after connector error (org.apache.kafka.connect.cli.ConnectStandalone:117)
java.util.concurrent.ExecutionException: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 1 error(s):        
Postgres server wal_level property must be "logical" but is: replica
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`
        at org.apache.kafka.connect.util.ConvertingFutureCallback.result(ConvertingFutureCallback.java:115)
        at org.apache.kafka.connect.util.ConvertingFutureCallback.get(ConvertingFutureCallback.java:99)
        at org.apache.kafka.connect.cli.ConnectStandalone.main(ConnectStandalone.java:114)    
Caused by: org.apache.kafka.connect.runtime.rest.errors.BadRequestException: Connector configuration is invalid and contains the following 1 error(s):
Postgres server wal_level property must be "logical" but is: replica
You can also find the above list of errors at the endpoint `/connector-plugins/{connectorType}/config/validate`
        at org.apache.kafka.connect.runtime.AbstractHerder.maybeAddConfigErrors(AbstractHerder.java:691)
        at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.putConnectorConfig(StandaloneHerder.java:207)
        at org.apache.kafka.connect.runtime.standalone.StandaloneHerder.lambda$null$0(StandaloneHerder.java:193)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)    
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)    
        at java.lang.Thread.run(Thread.java:750)
[2022-02-22 20:36:06,611] INFO Kafka Connect stopping (org.apache.kafka.connect.runtime.Connect:67)
[2022-02-22 20:36:06,612] INFO Stopping REST server (org.apache.kafka.connect.runtime.rest.RestServer:311)
[2022-02-22 20:36:06,673] INFO Stopped http_8083@26be6ca7{HTTP/1.1, (http/1.1)}{0.0.0.0:8083} (org.eclipse.jetty.server.AbstractConnector:381)
[2022-02-22 20:36:06,674] INFO node0 Stopped scavenging (org.eclipse.jetty.server.session:149)
[2022-02-22 20:36:06,710] INFO REST server stopped (org.apache.kafka.connect.runtime.rest.RestServer:328)
[2022-02-22 20:36:06,711] INFO Herder stopping (org.apache.kafka.connect.runtime.standalone.StandaloneHerder:106)
[2022-02-22 20:36:06,733] INFO Worker stopping (org.apache.kafka.connect.runtime.Worker:199)  
[2022-02-22 20:36:06,734] INFO Stopped FileOffsetBackingStore (org.apache.kafka.connect.storage.FileOffsetBackingStore:66)
[2022-02-22 20:36:06,737] INFO Metrics scheduler closed (org.apache.kafka.common.metrics.Metrics:659)
[2022-02-22 20:36:06,739] INFO Closing reporter org.apache.kafka.common.metrics.JmxReporter (org.apache.kafka.common.metrics.Metrics:663)
[2022-02-22 20:36:06,740] INFO Metrics reporters closed (org.apache.kafka.common.metrics.Metrics:669)
[2022-02-22 20:36:06,741] INFO App info kafka.connect for 10.0.2.15:8083 unregistered (org.apache.kafka.common.utils.AppInfoParser:83)
[2022-02-22 20:36:06,752] INFO Worker stopped (org.apache.kafka.connect.runtime.Worker:220)   
[2022-02-22 20:36:06,819] INFO Herder stopped (org.apache.kafka.connect.runtime.standalone.StandaloneHerder:124)
[2022-02-22 20:36:06,820] INFO Kafka Connect stopped (org.apache.kafka.connect.runtime.Connect:72)

The thing is I have already updated wal_level to 'logical' on postgresql.conf and restart to take effect with this command:

postgres=# SELECT pg_reload_conf();
 pg_reload_conf 
----------------
 t
(1 row)

Try using the 'pg_ctl reload' command but facing an issue:

postgres=# pg_ctl reload;
ERROR:  syntax error at or near "pg_ctl"
LINE 1: pg_ctl reload;
        ^

Is this the correct way to reload the Postgres server after making changes to 'postgresql.conf' file? Is there any other way to resolve this error?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文