Vonage Nexmo inconsistent error
I came across interesing issue while using Vonage/Nexmo + Digital Ocean. Sending sms was a hit and miss without apperent reason.
I'm using Vonage in many of my projects and I noticed much higher failure rate of https://rest.nexmo.com/sms/json endpoint recently, since (2023-06-22 10:37:21) to be precise.
The error is:
cURL error 6: Could not resolve host: rest.nexmo.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://rest.nexmo.com/sms/json
which ca mean anything but I'm 100% sure of my configuration, since it all worked before 2023-06-22 10:37:21 and projects were not being touched recently.
The whole thread can be read here: https://github.com/Vonage/vonage-laravel/issues/20
TLDR:
The issue is with default Ubuntu DNS settings and with Digital Ocean DNS server. Changing:
sudo /etc/systemd/resolved.conf
to
[Resolve]
DNS=1.1.1.1 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
and
/etc/resolv.conf
to
nameserver 1.1.1.1
nameserver 1.0.0.1
Solved the issue.
Just in case anyone is looking for it later on.
Please or to participate in this conversation.