私のherokuデータベースを趣味の開発者からStandard 0にアップグレードしています(公式の指示https://devcenter.heroku.com/articles/upgrading-heroku-postgres-databases#upgrade-with-pg-copy-defaultを使用しています)。Heroku Postgresのアップグレード後にフライウェイがdbに接続できない
私は新しいデータベースを宣伝してアプリを再起動するまでうまくいった。私は次のエラーが表示されます。
o.s.boot.SpringApplication : Application startup failed
...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource [org/springframework/boot/autoconfigure/flyway/FlywayAutoConfiguration$FlywayConfiguration.class]: Invocation of init method failed; nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
...
Caused by: org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource
...
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "54.xxx.xx.xxx", user "u94bf9vxxxxxx", database "d2mqk0b6xxxxxx", SSL off
...
もう一度古いデータベースに戻すと、すべてが再び機能します。私が変えようとしているのは、昇進したデータベースのみです。
趣味と標準データベースとの接続に違いがありますか?次のように
私application.ymlの関連部分が見えます:
spring:
datasource:
driverClassName: org.postgresql.Driver
url: ${JDBC_DATABASE_URL}
username: ${JDBC_DATABASE_USERNAME}
password: ${JDBC_DATABASE_PASSWORD}
flyway:
enabled: true
locations: classpath:db/migrations
私はこれをデバッグする方法上の任意の提案はあまりにも非常に歓迎されるでしょう。
最近私はHerokuを使ったとは言えませんが、 'pg_hba.conf'にアクセスできますか?そのような場合は、問題の分離に役立つ内容を提供してください。 – markdsievers
残念ながら、これは非表示であり、編集できません。 –