Overview
If a QuickServer log shows getaddrinfo EAI_AGAIN <hostname>, the gateway tried to resolve a host name and the DNS lookup failed or timed out. In practice, this usually means the QuickServer does not have a working path to a DNS server or cannot reach the named host from its own network position.
This is commonly seen when the QuickServer is connecting to an internet-hosted service or to an OPC UA endpoint configured with a domain name instead of a direct IP address.
[!NOTE]
EAI_AGAINis a name-resolution problem. It usually points to DNS, default gateway, routing, or hostname accuracy rather than to the protocol mapping itself.
Example Error
The error may appear in logs like this:
2018-10-31 02:48:01.998 [ INFO] - 68ms (opcuaDriver) opcuaClient: GetClient: connecting to: opc.tcp://opcua.demo-this.com:51210/UA/SampleServer
09:48:02.905Z :verify :49 [NODE-OPCUA-W06] The certificate subjectAltName does not match the client applicationUri
... Please regenerate a specific certificate that matches your client applicationUri
... certificate subjectAltName = urn:PA2:NodeOPCUA-Client
... client applicationUri = urn:2E2C:NodeOPCUA-Client
... certificateFile = /fst/documents/opcuaDriver/certificates/PKI/own/certs/client_certificate.pem
2018-10-31 02:48:28.901 [ERROR] - 26903ms (opcuaDriver) opcuaClient: GetClient: connection error: Error: The connection may have been rejected by server,
Err = (getaddrinfo EAI_AGAIN opcua.demo-this.com)
In this example, the important part is getaddrinfo EAI_AGAIN opcua.demo-this.com. The QuickServer could not reliably resolve opcua.demo-this.com.
[!WARNING] If the same log also shows certificate warnings, treat them as separate issues. Fix the hostname resolution problem first. After that, address any remaining certificate or endpoint-identity errors.
What Usually Causes It
| Symptom | Likely Cause | Action |
|---|---|---|
getaddrinfo EAI_AGAIN <hostname> appears immediately when the driver starts | DNS server is missing, wrong, or unreachable | Verify DNS1, DNS2, subnet mask, and default gateway on the QuickServer |
| The hostname works from a laptop but not from the QuickServer | The laptop is on a different network path or has different DNS access | Test from the same subnet or VLAN as the QuickServer, not from an unrelated engineering PC |
| The site uses DHCP and the error is intermittent | DHCP handed out a bad gateway or unusable DNS server | Review the leased network settings and correct DHCP scope or use valid static DNS values |
| The gateway has valid IP settings but still cannot resolve the host | The domain name is wrong or the upstream network blocks access to it | Recheck the exact hostname and confirm the site firewall or router allows the QuickServer to reach it |
| The job uses an internet-hosted endpoint | The QuickServer has no internet path from that site network | Provide the QuickServer with internet access or expose the target through a host name the QuickServer can resolve internally |
Diagnostic Flow
- Confirm the configured hostname exactly matches the intended endpoint. A simple spelling error can produce
EAI_AGAIN. - Review the QuickServer network settings: IP address, subnet mask, default gateway,
DNS1, andDNS2. - If the unit uses DHCP, check what gateway and DNS server were actually leased.
- Verify the same hostname can be resolved from another device on the same network segment as the QuickServer.
- Confirm the QuickServer network is allowed to reach that domain. If the endpoint is on the internet, the site must provide outbound access.
- Reload the configuration or restart the affected service and watch for the error to clear.
Resolution
The fix is usually one of these:
- Correct the QuickServer default gateway.
- Correct the QuickServer DNS server addresses.
- Restore real network or internet access to the QuickServer.
- Correct the configured host name if it was entered incorrectly.
- Make the configured domain reachable from the QuickServer network.
If the integration allows a direct IP address, testing with an IP can help prove the problem is DNS-related.
[!WARNING] For secure OPC UA connections, replacing a hostname with an IP address can create a separate certificate or endpoint-identity mismatch. Only keep the IP-based change if the server configuration and certificate model support it.
Validation
After the fix:
- The log should stop showing
getaddrinfo EAI_AGAIN. - The QuickServer should reach the configured endpoint without a hostname-resolution error.
- The downstream protocol session should move on to the next real step, such as successful connection, browse, or data exchange.
- If certificate or application URI warnings remain in an OPC UA project, troubleshoot those separately after DNS is working.