waseigo

waseigo

NXDOMAIN for AAAA record with Req: no match of right hand side value: {:error, %Req.TransportError{reason: :nxdomain}}

Hello,

I have been working on an app that uses Req to access a REST API at an AAAA domain record. The domain record is resolvable globally, and also present in /etc/hosts. Everything had been working correctly.

A week ago I reinstalled everything due to an SSD failure. I still use the same versions of Elixir and Erlang installed with asdf:

elixir          1.18.2-otp-27
erlang          27.2.2

The dependencies of my project in mix.exs have not changed.

However, I now get this:

** (MatchError) no match of right hand side value: {:error, %Req.TransportError{reason: :nxdomain}}

Why would Req suddenly stop resolving the AAAA domain record? Has anyone seen this happen? Any ideas what I can do to fix this?

Edit: I can resolve the domain just fine with dig AAAA, and ping it. Also, If I hardcode the IPv6 in the URL of the REST API used by Req, it works – so it’s clear that it’s not an issue caused by IPv6 connectivity, but by AAAA domain resolution.

Marked As Solved

ruslandoga

ruslandoga

[…] first attempt to resolve the domain as A, if not successful then as AAAA, and then add the option accordingly?

Mint’s inet6: true would attempt that automatically, but in the opposite order: mint/lib/mint/core/transport/tcp.ex at 8a9b8173220372279a07c7606d70790bf10c5523 · elixir-mint/mint · GitHub

Where Next?

Popular in Questions Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
makeitrein
Hey all, just started picking up Elixir last week and am writing a scraper as a learning project. Baby step #1 is extracting the number ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
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
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
wernerlaude
In AR this is so simple @articles = current_user.articles How to do in Ecto? def index(conn, _params) do current_user = conn.assig...
New

Other popular topics Top

_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 35421 110
New
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
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

We're in Beta

About us Mission Statement