【问题分类】数据导入导出

【关键字】数据同步,kettle,数据迁移,pg_hba.conf

【问题描述】使用 kettle 同步 postgresql 至崖山数据库时提示以下报错信息:
信息: New Caching Service registered

2024/10/10 17:00:21 - Pan - 开始运行.

2024/10/10 17:00:21 - public.T1 - 为了转换解除补丁开始 [public.T1]

log4j:ERROR No output stream or file set for the appender named [pdi-execution-appender].

2024/10/10 17:00:21 - source.public.T1.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : An error occurred, processing will be stopped:

2024/10/10 17:00:21 - source.public.T1.0 - Error occurred while trying to connect to the database

2024/10/10 17:00:21 - source.public.T1.0 - 致命错误: 没有用于主机 "10.9.7.54", 用户 "postgres", 数据库 "dev", no encryption 的 pg_hba.conf 记录

2024/10/10 17:00:21 - source.public.T1.0 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : 错误初始化步骤[source.public.T1]

2024/10/10 17:00:21 - target.public.T1.0 - Connected to database [yashandb176] (commit=1000)

2024/10/10 17:00:21 - public.T1 - ERROR (version 8.3.0.0-371, build 8.3.0.0-371 from 2019-06-11 11.09.08 by buildguy) : 步骤 [source.public.T1.0] 初始化失败!

2024/10/10 17:00:21 - source.public.T1.0 - Finished reading query, closing connection.

不能准备和初始化这个转换

【问题原因分析】pg_hba.conf 文件中没有正确配置允许从 IP 地址 连接到数据库的规则。pg_hba.conf 文件是 PostgreSQL 中用于控制客户端认证的配置文件,它定义了哪些主机、哪些用户以及通过何种认证方式可以连接到数据库服务器。

【解决/规避方法】配置 pg_hba.conf 文件并重启 pg 服务生效
$ echo "host all all 10.9.7.54/32 md5" >> pg_hba.conf

$ pg_ctl -D /home/postgres/pgdata restart
【影响范围】所有版本

【修复版本】-


qiaoyikefu
1 声望0 粉丝