Pere Urbon-Bayes created KAFKA-10231:
----------------------------------------
Summary: Broken Kafka Connect node to node communication if
invalid hostname is in place
Key: KAFKA-10231
URL: https://issues.apache.org/jira/browse/KAFKA-10231
Project: Kafka
Issue Type: Bug
Components: KafkaConnect
Affects Versions: 2.4.1, 2.5.0, 2.3.1, 2.4.0
Reporter: Pere Urbon-Bayes
As a Kafka Connect operator I would expect a more definitive error when the
internal node to node communication can't happen.
If the hostname contains an invalid character according to the [RFC1123 section
2.1|[https://tools.ietf.org/html/rfc1123#page-13]], the error raised by the
Kafka Connect worker node look like:
{quote}{{[2020-06-30 10:38:49,990] ERROR Uncaught exception in REST call to
/connectors
(org.apache.kafka.connect.runtime.rest.errors.ConnectExceptionMapper)}}{{java.lang.IllegalArgumentException:
Invalid URI host: null (authority: kafka_connect-0.cdh-dev-2:8083)}}{{
at org.eclipse.jetty.client.HttpClient.checkHost(HttpClient.java:506)}}{{
at org.eclipse.jetty.client.HttpClient.newHttpRequest(HttpClient.java:491)}}{{
at
org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:449)}}{{
at org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:438)}}{{
at
org.apache.kafka.connect.runtime.rest.RestClient.httpRequest(RestClient.java:83)}}{{
at
org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource.completeOrForwardRequest(ConnectorsResource.java:309)}}{{
at
org.apache.kafka.connect.runtime.rest.resources.ConnectorsResource.createConnector(ConnectorsResource.java:138)}}
{quote}
it would be much nicer for operators that such situations are detected in
similar, or improved, version as the JVM is doing in the [IDN
class|[https://github.com/JetBrains/jdk8u_jdk/blob/master/src/share/classes/java/net/IDN.java#L291]].
--
This message was sent by Atlassian Jira
(v8.3.4#803005)