You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ddebowczyk92 (via GitHub)" <gi...@apache.org> on 2026/03/24 15:09:44 UTC
[PR] [FLINK-39316][runtime] Fix BlobServer address resolution failing with VPN networking [flink]
ddebowczyk92 opened a new pull request, #27820:
URL: https://github.com/apache/flink/pull/27820
… VPN networking
<!--
*Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
*Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
- Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
- Each pull request should address only one issue, not mix up code from multiple issues.
- Each commit in the pull request has a meaningful commit message (including the JIRA id)
- Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
## What is the purpose of the change
`BlobServer.getAddress()` falls back to I`netAddress.getLocalHost()` when bound to the wildcard address (0.0.0.0). On machines where the hostname resolves to a non-local IP (e.g. VPN), this returns an unreachable address, causing blob uploads to fail with Connection reset during job submission. This was introduced by FLINK-38109.
## Brief change log
- Changed `BlobServer.getAddress()` to use `InetAddress.getLoopbackAddress()` instead of `InetAddress.getLocalHost()` when bound to the wildcard address
## Verifying this change
Please make sure both new and modified tests in this PR follow [the conventions for tests defined in our code quality guide](https://flink.apache.org/how-to-contribute/code-style-and-quality-common/#7-testing).
This change is already covered by existing tests, such as `FunctionITCase#testUsingAddJar`.
## Does this pull request potentially affect one of the following parts:
- Dependencies (does it add or upgrade a dependency): (no)
- The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
- The serializers: (no)
- The runtime per-record code paths (performance sensitive): (no)
- Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
- The S3 file system connector: (no)
## Documentation
- Does this pull request introduce a new feature? (no)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39316][runtime] Fix BlobServer address resolution failing with VPN networking [flink]
Posted by "gaborgsomogyi (via GitHub)" <gi...@apache.org>.
gaborgsomogyi commented on PR #27820:
URL: https://github.com/apache/flink/pull/27820#issuecomment-4119650628
`config.set(JobManagerOptions.BIND_HOST, loopbackAddress);` is not working?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39316][runtime] Fix BlobServer address resolution failing with VPN networking [flink]
Posted by "ryanvanhuuksloot (via GitHub)" <gi...@apache.org>.
ryanvanhuuksloot commented on PR #27820:
URL: https://github.com/apache/flink/pull/27820#issuecomment-4361810351
I was looking at the JobManager RPC Service IPs.
If you don't set a jobmanager.rpc.address and bind-host then you use `localhost` for the WebFrontend but the loopback address for the rpc service
It is kind of a mess - in theory I don't mind the loopback address. But in production systems, if you don't set the bind host you could end up in some hot water. Next question would be - why aren't you setting the bind-host.
I still think that `localhost -> loopback` is the safest change though.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39316][runtime] Fix BlobServer address resolution failing with VPN networking [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27820:
URL: https://github.com/apache/flink/pull/27820#issuecomment-4119111197
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "f9ad4621dac2a40724fb501d932abf647e064ea3",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "f9ad4621dac2a40724fb501d932abf647e064ea3",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f9ad4621dac2a40724fb501d932abf647e064ea3 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39316][runtime] Fix BlobServer address resolution failing with VPN networking [flink]
Posted by "ddebowczyk92 (via GitHub)" <gi...@apache.org>.
ddebowczyk92 commented on PR #27820:
URL: https://github.com/apache/flink/pull/27820#issuecomment-4126264550
@gaborgsomogyi Hey, thanks for your input. The thing with that suggestion is that I'm not sure where I would apply this configuration. BlobServer starts immediately after `MiniClusterExtension` is spun up, so if I tried to apply this config in StreamingTestBase.before` like below:
```
@throws(classOf[Exception])
@BeforeEach
def before(): Unit = {
this.env = StreamExecutionEnvironment.getExecutionEnvironment
env.setParallelism(4)
if (enableObjectReuse) {
this.env.getConfig.enableObjectReuse()
}
val setting = EnvironmentSettings.newInstance().inStreamingMode().build()
this.tEnv = StreamTableEnvironment.create(env, setting)
this.tEnv.getConfig.set(JobManagerOptions.BIND_HOST, "127.0.0.1")
}
```
it would definitely be too late. Anyway, I think we're drifting a bit from the purpose of this change. As I described in more detail in the JIRA ticket [FLINK-39316](https://issues.apache.org/jira/browse/FLINK-39316), the problem I'm trying to solve occurs under certain circumstances. When I was trying to run `FunctionITCase` in my IDE, multiple test cases turned red with the same error:
```
Caused by: java.io.IOException: PUT operation failed: Connection reset
at org.apache.flink.runtime.blob.BlobClient.putInputStream(BlobClient.java:496)
at org.apache.flink.runtime.blob.BlobClient.uploadFile(BlobClient.java:545)
at org.apache.flink.runtime.client.ClientUtils.uploadUserJars(ClientUtils.java:115)
at org.apache.flink.runtime.client.ClientUtils.uploadAndSetUserJars(ClientUtils.java:107)
at org.apache.flink.runtime.client.ClientUtils.uploadExecutionPlanFiles(ClientUtils.java:85)
... 80 more
Caused by: java.net.SocketException: Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:328)
at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:355)
at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:808)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
at java.base/java.net.Socket$SocketInputStream.read(Socket.java:961)
at org.apache.flink.runtime.blob.BlobOutputStream.receiveAndCheckPutResponse(BlobOutputStream.java:175)
at org.apache.flink.runtime.blob.BlobOutputStream.finish(BlobOutputStream.java:119)
at org.apache.flink.runtime.blob.BlobClient.putInputStream(BlobClient.java:493)
```
It took me a non-trivial amount of time to figure out what was actually going on and how to prevent it. I believe this small change would prevent many headaches for developers who work behind corporate VPNs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39316][runtime] Fix BlobServer address resolution failing with VPN networking [flink]
Posted by "ryanvanhuuksloot (via GitHub)" <gi...@apache.org>.
ryanvanhuuksloot commented on PR #27820:
URL: https://github.com/apache/flink/pull/27820#issuecomment-4361750130
In general though, I think we should force the bind-host. Having the default be 0.0.0.0 but actually having it fallback to localhost is strange.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-39316][runtime] Fix BlobServer address resolution failing with VPN networking [flink]
Posted by "ddebowczyk92 (via GitHub)" <gi...@apache.org>.
ddebowczyk92 commented on PR #27820:
URL: https://github.com/apache/flink/pull/27820#issuecomment-4325977249
@gaborgsomogyi gentle bump
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org