heroku의 postgres 데이터베이스와 함께 작동하도록 jhipster를 구성하려고합니다. 자격 증명이 수정 된 데이터베이스 매개 변수는 다음과 같습니다.
spring:
profiles: dev
datasource:
dataSourceClassName: org.postgresql.ds.PGSimpleDataSource
url:
databaseName: xxxx
serverName: ec2-54-225-182-133.compute-1.amazonaws.com
username: xxxx
password: xxxx
SSL을 활성화해야하기 때문에이 오류가 발생합니다.
[DEBUG] com.john_g_shultz.site.config.DatabaseConfiguration - Configuring Datasource
[ERROR] com.zaxxer.hikari.HikariPool - Maximum connection creation retries exceeded: FATAL: no pg_hba.conf entry for host "72.69.103.36", user "xxxxxx", database "xxxxxx", SSL off
heroku에 따르면 원격 데이터베이스 연결에는 두 개의 SSL 매개 변수가있는 JDBC 연결 URL이 필요합니다. 이 URL을 성공적으로 구성 할 수 없습니다.
원격으로 데이터베이스에 연결
Heroku Postgres 데이터베이스를 사용하는 경우 유지 관리 및 디버깅을 위해 원격으로 연결할 수 있습니다. 그러나 이렇게하려면 SSL 연결을 사용해야합니다. JDBC 연결 URL은 다음을 포함해야합니다. ssl = true & sslfactory = org.postgresql.ssl.NonValidatingFactory
원격 postgres 연결을위한 자격 증명을 포맷하는 방법을 알아 냈습니다.
spring:
profiles: dev
datasource:
dataSourceClassName: org.postgresql.ds.PGSimpleDataSource
url: jdbc:postgresql://HOSTNAME/DATABASENAME?user=xxxx&password=xxxx&ssl=true&sslfactory=org.postgresql.ssl.NonValidatingFactory
databaseName:
serverName:
username: xxxx
password: xxxx
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다