Nezteb
When starting Elixir application, I get the “errors” screenshotted below. This is a basic Phoenix application that has been working fine for me up until recently.
Elixir: 1.14.1-otp-25
Erlang: 25.1.1
Postgres: postgis/postgis:13-3.1
The redacted part is just an app-specific environment variable; MIX_ENV is set to dev. As far as I know SSL shouldn’t be used; I don’t have any special config options set anywhere, neither in the mix project nor Postgres itself.
The most relevant Google result for this error message is this GitHub issue: SSL not available · Issue #387 · elixir-ecto/postgrex · GitHub
Things I’ve tried:
- Running
:ssl.startin aniexsession returns:okas suggested in the GitHub issue. - Adding an explicit
ssl: falseconfig to my repo. - Adding
:sslto the Mix project’sextra_applicationslist.
So far nothing seem to work. The only other relevant thing I can think to mention is that I’m on an M2 macOS laptop; I’ve tried running Postgres with both Docker Desktop and locally using Postgres.app, but both give me the same errors.
Any ideas would be greatly appreciated! ![]()
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #ai
- #phoenix_html
- #elixirconf-us
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
whatyouhide
Where you say it “clearly works” in the screenshot, that’s not really true: your application starts, but the Postgrex processes log some errors. The application can run even if the Postgrex processes are down, which is normal if you’re following a sort of standard setup, with your
Ecto.Repoas a child of the application supervision tree.As for the SSL, it’s hard to debug this without seeing any of the configuration you’re using. What address are you using to connect to Postgres?
al2o3cr
As one of the replies on that issue calls out, the message isn’t related to the Elixir SSL machinery: it’s caused by the Postgres server replying
Nto an SSLRequest message. The Postgrex implementation:https://github.com/elixir-ecto/postgrex/blob/d888ae474cfcf2ac2a4cb353af45df65cdb8b7e5/lib/postgrex/protocol.ex#L722-L743
I would expect that setting
ssl: falsein the configuration would avoid this, though.Nezteb
Address:
postgres://postgres:postgres@localhost:5432/my_app_devAs far as config, there’s a lot of application-specific config, but here is the repo config:
The reason I say the app “clearly works” (which I realize I didn’t mention) is because
mix ecto.setup/mix ecto.resetworks. Migrations run just fine, myseeds.exssuccessfully seeds data (I can see the seed data in the database tables themselves). Most of the tests (many of which use the database) also pass. Some tests do fail though, with:But then after waiting a bit and running
mix test --failed, those same tests pass.Nezteb
Turns out I misunderstood some of the application I’m working on!
It has a config for an AWS Redshift repo, but it was supposedly disabled when running locally. Despite that, the
application.exfile will still try to start up the Redshift connection regardless of the value in the config file.So now I’ve added a helper in the application children list like so:
Sooooooo disregard this entire thread.
Thanks for all of the help!