apache / doris-flink-connector

Flink Connector for Apache Doris
https://doris.apache.org/
Apache License 2.0
328 stars 226 forks source link

[Bug] It is not possible to connect to FE via HTTPS #493

Open vlada-dudr opened 1 month ago

vlada-dudr commented 1 month ago

Search before asking

Version

flink-doris-connector-1.20-24.0.0

What's Wrong?

When I just specify fenodes I get

Failed to get response from Doris  http://some-fe:8030/api/FLINKUSER/TABLE1/_schema, http code is 303

In case I specify some-fe:8050 (the https port), I obviously get:

Failed to connect to host:http://some-fe:8050 java.net.SocketException: Unexpected end of file from server

If I try set fenodes to https://some-fe:8050:

Failed to connect to host:http://https://some-fe:8050 java.net.UnknownHostException: https

There are several places in code, where plain http is hardcoded, e.g.: https://github.com/apache/doris-flink-connector/blob/c61342f9651829c72f7828480c831dba52ad8ef3/flink-doris-connector/src/main/java/org/apache/doris/flink/rest/RestService.java#L362

What You Expected?

Support for https FE, either via explicit protocol specification via https://some-fe:port or by following redirect issued by FE.

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

JNSimba commented 1 month ago

The format of fenodes is ip:port. https needs to configure the fe certificate https://doris.apache.org/zh-CN/docs/dev/admin-manual/auth/fe-certificate/. Currently, be does not support https

vlada-dudr commented 1 month ago

@JNSimba thank you. I opened merge request #494 to enable https connection to fe.