humankindof

humankindof

[warning] Description: 'Authenticity is not established by certificate path validation' Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'

Hey Community,

New Install Phoenix Elixir 1.14.2 OTP 25
attempting connection with Digital Ocean managed Postgres

with DigitalOcean, the issue I am running into starts with configuring TLS correctly

I have the cacertfile in the root of the project and have tried a variety of syntax variations on this. but to no avail

essentially at this point:

`[warning] Description: 'Authenticity is not established by certificate path validation'

Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing`
[error] Postgrex.Protocol (#PID<0.1566.0>) failed to connect: ** 

(Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "test1-db" does not exist'

so of course I add these as such:

  username: "postgres",
  password: "postgres",
  hostname: "remotehost.com",
  database: "remote_db",
  port: "25060",
  ssl: true,
  ssl_opts: [verify: verify_peer, cacertfile: 'ca-certificate.crt'],
  stacktrace: true,
  show_sensitive_data_on_connection_error: true,
  pool_size: 10

Once I add the ssl_opts, I get this:

warning: variable "verify_peer" does not exist and is being expanded to "verify_peer()", please use parentheses to remove the ambiguity or change the variable name
  config/dev.exs:25

** (CompileError) config/dev.exs:25: undefined function verify_peer/0 (there is no such import)

    /Users/ER/Library/CloudStorage/OneDrive-Personal/Dev/Phoenix/you_earth/config/config.exs:148: (file)

Any insights would be very much appreciated

Thanks

Most Liked

dwark

dwark

verify_peer should an atom as in :verify_peer.

Where Next?

Popular in Questions Top

Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
Werner
Hi, I’m using Ubuntu 18.04 and after updating to OTP-24.0 yesterday i have this warning when I run “mix local.hex”: 14:57:30.512 [warn] ...
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
Exadra37
Sometimes I want to check if the input into a function is not a blank string. My first approach: defmodule Example do def do_stuff(s...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

Other popular topics Top

lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
script
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this "1000" What is the ...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

We're in Beta

About us Mission Statement