jetlinks-community启动报错 - PostgreSQL数据库连接异常及解决方法
使用:java -jar jetlinks-standalone.jar
运行项目出现如下问题:
Caused by: org.springframework.dao.PermissionDeniedDataAccessException: Open R2DBC Connection; Ident authentication failed for user "postgres"; nested exception is io.r2dbc.postgresql.ExceptionFactory$PostgresqlAuthenticationFailure: [2for user "postgres"
原因:postgresql数据库连接异常
host all all 127.0.0.1/32 peer
修改为
host all all 127.0.0.1/32 md5
这一条:host all all 0.0.0.0/0 password
主要是解决测试时候远程连接问题,任何客户端在任何ip都可以连接
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 ident
host replication all ::1/128 ident
host all all 0.0.0.0/0 password