Using Flink 1.20.3, starting sql-client.sh throws 'Failed to start th…#61070
Open
Cocoyamsweetsnow wants to merge 1 commit intoapache:masterfrom
Open
Using Flink 1.20.3, starting sql-client.sh throws 'Failed to start th…#61070Cocoyamsweetsnow wants to merge 1 commit intoapache:masterfrom
Cocoyamsweetsnow wants to merge 1 commit intoapache:masterfrom
Conversation
…e embedded sql-gateway' error
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
morningman
approved these changes
Mar 5, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…e embedded sql-gateway' error
What problem does this PR solve?
Issue Number: close #60983
Related PR: None
Problem Summary:
在 Flink 1.20+ 中,
sql-client.sh的行为发生了重大变更:不再直接连接 JobManager的 REST 端点,而是在本地启动一个嵌入式 SQL Gateway。该嵌入式网关在未显式配置
sql-gateway.endpoint.rest.port时,会继承全局的rest.bind-port(默认 8081)作为自己的 REST 端口。
由于 JobManager 的 REST 端点已经占用了 8081,嵌入式 SQL Gateway 尝试绑定同一端口时
就会抛出以下异常:
java.net.BindException: Could not start rest endpoint on any port in port range 8081 at org.apache.flink.runtime.rest.RestServerEndpoint.start at org.apache.flink.table.gateway.SqlGateway.start
修复方案:
在
samples/datalake/iceberg_and_paimon/data/flink-conf/flink-conf.yaml中新增sql-gateway.endpoint.rest.port: 9091,为嵌入式 SQL Gateway 指定一个独立端口,使其与 JobManager REST 端口(8081)隔离,避免端口冲突。
Release note
When using Flink 1.20+ with
sql-client.sh, addsql-gateway.endpoint.rest.portconfiguration to avoid port conflict with JobManager's REST endpoint.
Check List (For Author)
Check List (For Reviewer who merge this PR)