- 0 minutes to read

FAQ - DNS Resolution Errors

Resolve DNS hostname resolution errors when testing Nodinite Alarm Plugins. This guide helps you diagnose and fix SMTP server DNS lookup failures.

Understanding the DNS Resolution Error

When testing an Alarm Plugin, you may encounter the following error:

500 Internal Server Error
Execute Test Alarm, Error from Monitoring Service

Internal Server Error : An error occurred while testing the Alarm Plugin [Error] [Test] 
Failed to distribute e-mail to e-mail address: user@example.com". Error: The requested 
name is valid, but no data of the requested type was found., InnerException: 
'The requested name is valid, but no data of the requested type was found.'

Technical Details

This error originates from the MailKit SMTP library used by the Email Plugin:

  • Nodinite.Libraries.Plugins/Core/EmailPlugin/EmailPlugin.cs connects using MailKit.Net.Smtp.SmtpClient.ConnectAsync(server, port, …) before any other operations
  • The Windows DNS error WSANO_DATA ("The requested name is valid, but no data of the requested type was found") is thrown when MailKit cannot resolve the SMTP server hostname configured in SettingsModel.Server
  • The exception occurs during ConnectAsync, before authentication or message content processing, indicating a DNS resolution failure for the SMTP server hostname
  • The SMTP host name in the "Email with options" settings either has no A/AAAA DNS record, or the Monitoring Service cannot reach the DNS zone containing the record

Root Cause

This error occurs when Nodinite cannot resolve the SMTP server hostname configured in the Alarm Plugin settings. The MailKit library attempts to connect to the SMTP server but fails during DNS resolution. Common causes include:

  • DNS resolution failure - The Nodinite Monitoring Service cannot resolve the SMTP server hostname to an IP address
  • Missing A/AAAA records - The SMTP server hostname has no DNS A or AAAA records
  • Firewall blocking DNS - Outbound DNS queries (UDP/TCP port 53) are blocked
  • Incorrect DNS server configuration - The server is using DNS servers that cannot resolve the SMTP hostname
  • Typo in SMTP server hostname - The server name is misspelled (e.g., smtp.example.com vs smtp.example.net)
  • Internal DNS zone not accessible - SMTP server uses internal DNS that the Monitoring Service cannot query

Solution Steps

Step 1: Verify DNS Resolution

Test DNS resolution from the Nodinite Application Server:

# Test if the SMTP server hostname can be resolved
nslookup smtp.example.com

# Check for A records specifically
nslookup -type=A smtp.example.com

# Alternative: Use Resolve-DnsName (PowerShell)
Resolve-DnsName -Name smtp.example.com -Type A

Expected Output (DNS records found)

Server:  dns-server.example.com
Address:  192.168.1.1

Name:    smtp.example.com
Address:  203.0.113.10

Error Output (DNS resolution fails)

Server:  dns-server.example.com
Address:  192.168.1.1

*** smtp.example.com can't find smtp.example.com: Non-existent domain

Step 2: Check Firewall and DNS Server Access

Ensure the Nodinite Application Server has outbound access to DNS servers:

  • DNS Port 53 (UDP and TCP) must be allowed in firewall rules
  • DNS Server Configuration - Verify the server is using valid DNS servers:
# Check current DNS server configuration
Get-DnsClientServerAddress -AddressFamily IPv4
  • Public DNS Access - If using internal DNS servers, ensure they can forward queries to public DNS (or use public DNS like 8.8.8.8 or 1.1.1.1 for testing)

Test DNS Connectivity

# Test if DNS port 53 is accessible
Test-NetConnection -ComputerName 8.8.8.8 -Port 53

# Temporarily test with Google DNS
Resolve-DnsName -Name smtp.example.com -Server 8.8.8.8

Step 3: Verify the SMTP Server Hostname

  • Check SMTP server spelling - Ensure the SMTP server hostname in Email with Options settings is spelled correctly (e.g., smtp.example.com vs smtp.example.net)
  • Verify DNS records exist - Use online DNS lookup tools like MXToolbox or DNS Checker to verify the SMTP server has valid A or AAAA records
  • Test with IP address - Temporarily configure the SMTP server using its IP address instead of hostname to confirm connectivity (if DNS resolution is the issue, this will bypass it)

Find SMTP Server IP Address

# Resolve the SMTP hostname to IP address
$smtpHost = "smtp.example.com"
$result = Resolve-DnsName $smtpHost -Type A
Write-Host "SMTP Server IP: $($result.IPAddress)"

Step 4: Configure Windows Firewall for DNS

If DNS queries are blocked by Windows Firewall:

# Allow outbound DNS (UDP port 53)
New-NetFirewallRule -DisplayName "Allow DNS UDP" -Direction Outbound -Protocol UDP -RemotePort 53 -Action Allow

# Allow outbound DNS (TCP port 53)
New-NetFirewallRule -DisplayName "Allow DNS TCP" -Direction Outbound -Protocol TCP -RemotePort 53 -Action Allow

Step 5: Test Email Delivery

Once DNS resolution is working, re-test the Alarm Plugin:

  • Navigate to Administration > Settings > Alarm Plugins
  • Select your email Alarm Plugin
  • Click Test to verify email delivery

Additional Troubleshooting

DNS Resolution Works but Test Still Fails

If DNS resolution works but the test still fails:

  • Check SMTP port access - Ensure outbound TCP port 25, 587, or 465 is allowed (depending on your SMTP provider)
  • Verify email credentials - Ensure the SMTP username and password are correct
  • Review Monitoring Service logs - Check the Monitoring Service log files for detailed error messages

Internal DNS Zones

If your SMTP server is on an internal DNS zone:

  • Verify DNS zone accessibility - Ensure the Nodinite server can query the internal DNS zone
  • Check DNS suffix search list - Add the internal domain to the DNS suffix search list:
# View current DNS suffix search list
Get-DnsClientGlobalSetting | Select-Object -ExpandProperty SuffixSearchList

# Add internal domain to search list (example)
Set-DnsClientGlobalSetting -SuffixSearchList @("example.com", "internal.example.com")

Proxy and DNS

If using a proxy server:

  • DNS over proxy - Some proxies intercept DNS queries; verify DNS bypass is configured
  • Direct DNS required - Ensure Nodinite server can make direct DNS queries to DNS servers

Common Error Patterns

"Non-existent domain"

Cause: SMTP hostname does not exist in DNS
Solution: Verify spelling, check with network team, use IP address temporarily

"DNS request timed out"

Cause: Firewall blocking DNS port 53 or DNS server unreachable
Solution: Allow UDP/TCP port 53, verify DNS server configuration

"No such host is known"

Cause: DNS server cannot resolve the hostname
Solution: Check internal DNS configuration, verify hostname exists in DNS zone

Next Step