eclipse-vertx/vert.x · error · io.netty.handler.codec.DecoderException
Could not convert address ${data} to InetAddress.
Error message
Could not convert address ${data} to InetAddress. What it means
Decoding error for A/AAAA DNS records: after the byte length matched, converting the record's ByteBuf content to an InetAddress failed. The message includes the raw buffer data; this indicates the server returned syntactically sized but invalid address bytes.
Source
Thrown at vertx-core/src/main/java/io/vertx/core/dns/impl/RecordDecoder.java:153
return null;
}
};
static Function<DnsRecord, String> address(DnsRecordType type, int octets) {
return record -> {
if (record.type() == type) {
ByteBuf data = ((DnsRawRecord)record).content();
int size = data.readableBytes();
if (size != octets) {
throw new DecoderException("Invalid content length, or reader index when decoding address [index: "
+ data.readerIndex() + ", expected length: " + octets + ", actual: " + size + "].");
}
byte[] address = new byte[octets];
data.getBytes(data.readerIndex(), address);
try {
return InetAddress.getByAddress(address).getHostAddress();
} catch (UnknownHostException e) {
throw new DecoderException("Could not convert address "
+ data.toString(data.readerIndex(), size, CharsetUtil.UTF_8) + " to InetAddress.");
}
} else {
return null;
}
};
}
/**
* Retrieves a domain name given a buffer containing a DNS packet. If the
* name contains a pointer, the position of the buffer will be set to
* directly after the pointer's index after the name has been read.
*
* @param buf the byte buffer containing the DNS packet
* @return the domain name for an entry
*/
static String readName(ByteBuf buf) {
int position = -1;View on GitHub (pinned to fb308bd8c3)
Solutions
- Retry resolution against a different DNS server
- Capture the reported buffer content to diagnose the non-rfc compliant response
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at vertx-core/src/main/java/io/vertx/core/dns/impl/RecordDecoder.java:153 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/d736dd9ccffc3056.
Report an issue: GitHub.