Search code examples
apache-kafkaconfluence-rest-api

Why Kafka REST proxy running on port 443 warns about Illegal character 0x16?


I modified config of kafka.rest.properties by setting listeners=http://0.0.0.0:443. Now on executing sudo bin/kafka-rest-start ./etc/kafka-rest/kafka-rest.properties I am getting this error repeatedly

[2017-02-01 07:31:43,727] WARN Illegal character 0x16 in state=START for buffer HeapByteBuffer@19545026[p=1,l=244,c=16384,r=243]={\x16<<<\x03\x03\x00\xEf\x01\x00\x00\xEb\x03\x03X\x91\x8e\xDf:\xDaq...\x01\x04\x02\x03\x03\x03\x01\x03\x02\x02\x03\x02\x01\x02\x02>>>\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00} (org.eclipse.jetty.http.HttpParser:1719) [2017-02-01 07:31:43,727] WARN badMessage: 400 Illegal character 0x16 for HttpChannelOverHttp@177884e9{r=0,c=false,a=IDLE,uri=-} (org.eclipse.jetty.http.HttpParser:1344)



I tried several other port no but it happens only on 443.


Solution

  • http://0.0.0.0:443

    You are listening for HTTP on an HTTPS port.

    I guess your client software will look at the port and send HTTPS. Or maybe Kafka will look at the port and expect HTTPS (the error message looks like the former).

    Or maybe you have a typo in the connection url protocol configuration.

    Make sure client and server agree on the protocol.

    Or even better, don't use HTTP on the HTTPS port. That is just confusing.