Worker - Docker MTU value
Hi!
We're using the Default Worker for job automation inside our Kubernetes env.
We have issues with connection timeouts inside containers. Here is an example job definition:
container(displayName = "Run mvn", image = "maven:latest") {
env["HUB_USERNAME"] = Params("xyz")
env["HUB_PASSWORD"] = Secrets("xyz")
shellScript {
content = """
set -e -x -u
mvn clean install package -X -s settings.xml -DhubUsername=${'$'}HUB_USERNAME -DhubPassword=${'$'}HUB_PASSWORD
"""
}
}
And this is the error:
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to repo.maven.apache.org:443 [repo.maven.apache.org/146.75.120.215] failed: Read timed out
We have debugged this and its related due lower MTU settings on the host machines (1350).
One solution could be to add a parameter for passing extra arguments (in our case --network=host) to the "docker run" command.
Another one to pass a MTU value to the network creation process: --opt com.docker.network.driver.mtu=xyz
Are there any workarounds or solutions to do that?
Please sign in to leave a comment.
Could you please let us know what Kubernetes distribution you use?
Additional information about the network for Kubernetes and your Default Worker is also very appreciated.