akraut
Debugging Ecto connections to remote Postgres servers in Mix tasks
Hey folks, I’m trying to use Ecto with Neon’s hosted Postgres service. Notably, this necessitates the use of SNI to connect to the right server.
My config.exs looks like this:
import Config
config :friends, Friends.Repo,
url: "postgres://application:nunyabidn355@ep-still-thunder-16014280.us-west-2.aws.neon.tech/friends?options=project%3Dep-still-thunder-16014280",
# database: "friends",
# username: "application",
# password: "nunyabidn355",
# hostname: "ep-still-thunder-16014280.us-west-2.aws.neon.tech",
# port: 5432,
ssl: true,
ssl_opts: [
server_name_indication: 'ep-still-thunder-16014280.us-west-2.aws.neon.tech',
verify: :verify_none
]
config :friends, ecto_repos: [Friends.Repo]
mix ecto.create reports a cryptic ** (Mix) The database for Friends.Repo couldn't be created: killed and mix ecto.migrate simply reports ** (EXIT from #PID<0.99.0>) shutdown.
So, the real question I have is, how do I coerce mix into giving me some debug output so I can see what’s actually going on? In other words, I’m not interested in the answer to what’s happening here; instead I’m interested in how I might arrive at that answer myself.
First Post!
mars
Did you discover a solution to debugging this? I seem to be in the same situation.
Current vibe: xkcd: Wisdom of the Ancients
0
Last Post!
mars
Popular in Questions
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
I have VueJS GUIs with the project generated using Webpack.
I have Elixir modules that will need to be used by the VueJS GUIs.
I forese...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
Hi!
Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
Other popular topics
Hi!
In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir?
Searched the docs for ip address and the web, no good results.
Thanks!
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
If I have a post route which an argument:
post /my_post_route/:my_param1, MyController.my_post_handler
How would get the post params ...
New
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something…
Haskell reminds me of Java, and e...
New
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar.
I p...
New
I am trying to run a deploy with docker and I successfully runned with this command:
docker build -t romenigld/blog-prod .
but when I t...
New
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
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









