How do I resolve getaddrinfo(host='collect.observeinc.com', err=12): Timeout while contacting DNS servers on Windows when using Fluent Bit?

Users running Fluent Bit on Windows environments (such as Azure VMs) may encounter DNS resolution failures, when Fluent Bit attempts to connect to remote endpoints (e.g., collect.observeinc.com). This issue can manifest as the following error:

getaddrinfo(host='collect.observeinc.com', err=12): Timeout while contacting DNS servers

Root Cause

By default, Fluent Bit uses an asynchronous DNS resolver (net.dns.resolver ASYNC) for non-blocking performance. However, in certain environments, this resolver fails due to networking or DNS stack compatibility issues.

Common factors include:

  • Custom DNS configurations

  • Azure virtual network (VNet) settings

  • Security policies that affect low-level network behavior

  • Incompatible or non-standard DNS resolver behavior on Windows

These conditions may cause getaddrinfo() calls made by Fluent Bit to time out, even when typical DNS tools like nslookup or ping work successfully.

Resolution

Update the [OUTPUT] to set net.dns.resolver to LEGACY and restart Fluent Bit.

[OUTPUT]   net.dns.resolver LEGACY

References:

err 12 timeout while contacting dns servers

Guide to Debugging Fluent Bit issues