Tracing runtime warnings

I’m having the following warning when booting my Phoenix app with mix phx.server:

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

It’s not obvious to me what’s triggering it, and I can’t find a way to trace runtime warnings with Elixir/Erlang.

Is there an equivalent of node --trace-warnings that would show the call stack that triggered each warning so I can debug it? I couldn’t find anything like this so far and I believe there must be a smarter way than to compile my own fork of Erlang where I throw an exception in otp/ssl.erl at 896510977b6cf1f2f4ac817394f3d5c9061f92cf · erlang/otp · GitHub instead of logging a warning.

Thanks a lot!

As it is log message all you can get is file and line where it was fired which will tell you nothing, as it will be somewhere in ssl module.

1 Like