小编Pra*_*aga的帖子

找不到 root.crt postgresql

我有一个我正在使用的 postgres docker 映像,并且我正在其上启用 SSL。我希望它验证完整,因为我有一个 root.crt 并且想要确保所有可以使用 SSL 的证书都经过验证。因此,在我的 docker-compose 文件中,我已将 server.crt 和 server.key 挂载到 /var/ssl,将 root.crt 挂载到 /root/.postgresql。

卷: - ~/server_certs:/var/ssl - ~/root_certs:/root/.postgresql

我得到的错误是

ERROR [2018-07-10 20:28:24,355] org.apache.tomcat.jdbc.pool.ConnectionPool: Unable to create initial connections of pool.
! java.io.FileNotFoundException: /root/.postgresql/root.crt (No such file or directory)
! at java.io.FileInputStream.open0(Native Method)
! at java.io.FileInputStream.open(FileInputStream.java:195)
! at java.io.FileInputStream.<init>(FileInputStream.java:138)
! at java.io.FileInputStream.<init>(FileInputStream.java:93)
! at org.postgresql.ssl.jdbc4.LibPQFactory.<init>(LibPQFactory.java:124)
! ... 32 common frames omitted
! Causing: org.postgresql.util.PSQLException: Could not open SSL root certificate file /root/.postgresql/root.crt.
Run Code Online (Sandbox Code Playgroud)

任何有关让 postgres 找到 …

linux docker postgresql-10

6
推荐指数
1
解决办法
8579
查看次数

标签 统计

docker ×1

linux ×1

postgresql-10 ×1