mirego / accent

The first developer-oriented translation tool. True asynchronous flow between translators and your team.
https://www.accent.reviews
BSD 3-Clause "New" or "Revised" License
1.3k stars 98 forks source link

Heroku deployment error #240

Closed r2omm-kevin closed 3 years ago

r2omm-kevin commented 3 years ago

I got this when I run accent after deployment.

2021-03-16T05:55:18.915157+00:00 app[web.1]: Running migrations for accent…
2021-03-16T05:55:19.062006+00:00 app[web.1]: 05:55:19.059 [error] Postgrex.Protocol (#PID<0.139.0>) failed to connect: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) no pg_hba.conf entry for host "34.243.200.120", user "uenghmkdpeuvdv", database "d2hvl1kq17j2np", SSL off
2021-03-16T05:55:19.062012+00:00 app[web.1]: 05:55:19.059 [error] Postgrex.Protocol (#PID<0.138.0>) failed to connect: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) no pg_hba.conf entry for host "34.243.200.120", user "uenghmkdpeuvdv", database "d2hvl1kq17j2np", SSL off
2021-03-16T05:55:20.143592+00:00 app[web.1]: 05:55:20.143 [error] Postgrex.Protocol (#PID<0.138.0>) failed to connect: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) no pg_hba.conf entry for host "34.243.200.120", user "uenghmkdpeuvdv", database "d2hvl1kq17j2np", SSL off
2021-03-16T05:55:20.870305+00:00 app[web.1]: 05:55:20.870 [error] Postgrex.Protocol (#PID<0.139.0>) failed to connect: ** (Postgrex.Error) FATAL 28000 (invalid_authorization_specification) no pg_hba.conf entry for host "34.243.200.120", user "uenghmkdpeuvdv", database "d2hvl1kq17j2np", SSL off
2021-03-16T05:55:22.037089+00:00 app[web.1]: 05:55:22.036 [error] Could not create schema migrations table. This error usually happens due to the following:
drj17 commented 3 years ago

Just got this one as well

remi commented 3 years ago

Postgrex.Protocol (#PID<0.139.0>) failed to connect

Are you able to connect to the database using the same credentials outside of Accent?

drj17 commented 3 years ago

Postgrex.Protocol (#PID<0.139.0>) failed to connect

Are you able to connect to the database using the same credentials outside of Accent?

I was able to, yes.

drj17 commented 3 years ago

This seems to be the issue https://devcenter.heroku.com/changelog-items/2035, "All Heroku Postgres client connections require SSL"

remi commented 3 years ago

I think you’re right.

@simonprev I don’t think Accent supports the DATABASE_SSL environment variables like we do in our boilerplate project, does it?

remi commented 3 years ago

For the time being, you might be able to add ?ssl=true to your DATABASE_URL to force Ecto to use SSL when connecting to the Heroku PostgreSQL database.

drj17 commented 3 years ago

Just tried that, unfortunately I get this error now: SSL connection can not be established because:sslapplication is not started

remi commented 3 years ago

Yeah, we have to enable start_apps_before_migration: [:ssl] in the repo configuration.

Let me try to whip up a quick pull request for that 😄

remi commented 3 years ago

@drj17 @r2omm-kevin mirego/accent:1.7.2 should not have this problem anymore! 🎉