Worker - Docker MTU value


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 [] 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

Are there any workarounds or solutions to do that?

1 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.

Please sign in to leave a comment.