In DNS, I have a database server referenced by D.domain and X.domain names.
DNS has A records for X.domain device that qualifies both eth0 and wlan0 interfaces which are different IPs, an IP specific to each network type, i.e. eth0 and wlan0. DNS has an A record for D.domain as well, that is identical to X.domain eth0 interface ip. This was done so NR, mysql node, is abstracted from X.domain and the actual IPs, so that I can change them at anytime with NR not caring.
So DNS looks like this:
192.168.1.100 IN A x.domain ; eth0
192.168.1.101 IN A x.domain ; wlan0
192.168.1.100 IN A d.domain ; X.domain eth0
Thus nslookup X.domain returns 192.168.1.101 and 192.168.1.100, note the order returned is sometimes 192.168.1.100 and 192.168.1.101. Not sure why this is case, unless DNS is listening on both eth0 and wlan0, which is it configured to ONLY listen on 192.168.1.100, i.e. eth0. Whereas D.domain returns only 192.168.1.100.
The mysql node is configured to use D.domain only. But at times mysql node seems to randomly report:
"Error: getaddrinfo ENOTFOUND D.domain"
Although this is legit in DNS as noted above, in that I am not using a CNAME but an additional A record for the X.domain device to isolate the eth0 interface as D.domain. It appears the mysql node may be doing a reverse lookup? And it is getting confused by the two ip addresses returned by the additional A records for X.domain? This makes some sense to me, in that X.domain A records are before the D.domain A record in the record list order in forward zone file for DNS.
A CNAME record in DNS of X.domain as D.domain, can't be used because both ips, i.e. interfaces will be returned, and I don't want any traffic over wlan0 for the database instance. Forcing DNS configuration to only listen to eth0 interface does not seem to be working, because traffic for the DNS is moving across wlan0 and eth0. So I needed a way to force mysql node to only use D.domain, i.e. X.domain eth0 only.
What is odd is the mysql node does show CONNECTED most of the time. So, I am at a loss why the getaddrinfo ENOTFOUND error pops up.
I think this is just a case where mysql is being tricked by the returned values, given the complex configuration. To me the real issue is that DNS appears to be listening on more than eth0, which is an issue I am taking up with DNS side of things. But thought maybe someone in the NR scope, might have seen something like this happening before?