2014-05-18 2 views
2

heroku의 postgres 데이터베이스에서 작동하도록 jhipster를 구성하려고합니다. 여기에 자격 증명을 내 데이터베이스 매개 변수 편집 됨 있습니다 : 그것은 내가 결정이 오류가 발생jointster를 원격으로 postgres에 연결

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 가능해야하기 때문에 : Heroku가에 따르면

[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 

를 원격 데이터베이스 연결은 JDBC 연결 URL이 필요합니다 두 개의 SSL 매개 변수가 있습니다. 이 URL을 성공적으로 구성 할 수 없었습니다. 데이터베이스에 연결

원격

당신이 Heroku가 포스트 그레스 데이터베이스를 사용하는 경우에는 유지 보수 및 디버깅을 위해 원격으로 에 연결할 수 있습니다. 그러나 이렇게하려면 에 SSL 연결을 사용해야합니다. 당신의 JDBC 연결 URL은 필요가 다음을 포함하는 것입니다 : SSL을 = 사실 & sslfactory = org.postgresql.ssl.NonValidatingFactory 내가 원격 포스트 그레스 연결에 대한 자격 증명을 포맷하는 방법을 알아 냈

답변

1

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 
관련 문제