{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/Batch/issues/4","repository_url":"https://api.github.com/repos/Azure/Batch","labels_url":"https://api.github.com/repos/Azure/Batch/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Azure/Batch/issues/4/comments","events_url":"https://api.github.com/repos/Azure/Batch/issues/4/events","html_url":"https://github.com/Azure/Batch/issues/4","id":338620855,"node_id":"MDU6SXNzdWUzMzg2MjA4NTU=","number":4,"title":"Batch failure: ContainerInvalidSettings","user":{"login":"marcelvb","id":3067763,"node_id":"MDQ6VXNlcjMwNjc3NjM=","avatar_url":"https://avatars2.githubusercontent.com/u/3067763?v=4","gravatar_id":"","url":"https://api.github.com/users/marcelvb","html_url":"https://github.com/marcelvb","followers_url":"https://api.github.com/users/marcelvb/followers","following_url":"https://api.github.com/users/marcelvb/following{/other_user}","gists_url":"https://api.github.com/users/marcelvb/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelvb/subscriptions","organizations_url":"https://api.github.com/users/marcelvb/orgs","repos_url":"https://api.github.com/users/marcelvb/repos","events_url":"https://api.github.com/users/marcelvb/events{/privacy}","received_events_url":"https://api.github.com/users/marcelvb/received_events","type":"User","site_admin":false},"labels":[{"id":949844888,"node_id":"MDU6TGFiZWw5NDk4NDQ4ODg=","url":"https://api.github.com/repos/Azure/Batch/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-07-05T15:23:16Z","updated_at":"2018-08-24T16:42:56Z","closed_at":"2018-08-22T18:30:07Z","author_association":"NONE","body":"I have started using the container features of Azure Batch using the Azure Batch .NET SDK (Azure.Batch 8.1.2). I notice that every first task that runs on a node fails with the following error:\r\n\r\n```\r\n  \"executionInfo\": {\r\n    \"startTime\": \"2018-07-05T09:13:05.244Z\",\r\n    \"endTime\": \"2018-07-05T09:24:25.698Z\",\r\n    \"failureInfo\": {\r\n      \"category\": \"UserError\",\r\n      \"code\": \"ContainerInvalidSettings\",\r\n      \"message\": \"At least one value of specified task container settings is invalid\",\r\n      \"details\": [\r\n        {\r\n          \"name\": \"Message\",\r\n          \"value\": \"UnixHTTPConnectionPool(host='localhost', port=None): Read timed out. (read timeout=60)\"\r\n        }\r\n      ]\r\n    },\r\n    \"retryCount\": 0,\r\n    \"requeueCount\": 0,\r\n    \"result\": \"Failure\"\r\n  },\r\n```\r\n\r\nThe following tasks of that same job on the same node usually work.\r\n\r\nMy pool is created as follows:\r\n```\r\n      // Specify a container registry\r\n      ContainerRegistry containerRegistry = new ContainerRegistry(\r\n          registryServer: Settings.DockerRegistry,\r\n          userName: Settings.DockerRegistryUsername,\r\n          password: Settings.DockerRegistryPassword);\r\n\r\n      // Create container configuration, prefetching Docker images from the container registry\r\n      var dockerImage = $\"{Settings.DockerRegistry}/{Settings.DockerImage}\";\r\n      ContainerConfiguration containerConfig = new ContainerConfiguration\r\n      {\r\n        ContainerImageNames = new List<string> { dockerImage },\r\n        ContainerRegistries = new List<ContainerRegistry> { containerRegistry }\r\n      };\r\n\r\n      ImageReference imageReference = new ImageReference(\r\n        publisher: \"microsoft-azure-batch\",\r\n        offer: \"ubuntu-server-container\",\r\n        sku: \"16-04-lts\",\r\n        version: \"latest\");\r\n\r\n      // VM configuration\r\n      string nodeAgentSkuId = \"batch.node.ubuntu 16.04\";\r\n      VirtualMachineConfiguration virtualMachineConfiguration = new VirtualMachineConfiguration(imageReference, nodeAgentSkuId)\r\n      {\r\n        ContainerConfiguration = containerConfig\r\n      };\r\n    \r\n      // Create the unbound pool object using the VirtualMachineConfiguration\r\n      // created above\r\n      CloudPool pool = batchClient.PoolOperations.CreatePool(\r\n        poolId: poolId,\r\n        virtualMachineSize: Settings.VmSize,\r\n        virtualMachineConfiguration: virtualMachineConfiguration\r\n      );\r\n\r\n      pool.MaxTasksPerComputeNode = Settings.MaxTasksPerComputeNode;\r\n      pool.TaskSchedulingPolicy = new TaskSchedulingPolicy(ComputeNodeFillType.Pack);\r\n      pool.AutoScaleEnabled = true;\r\n      pool.AutoScaleFormula = \"$TargetDedicated = 0\"; // create pool with zero nodes (scale later)\r\n\r\n      // Commit the pool to the Batch service\r\n      pool.Commit();\r\n```\r\n\r\nThe registry is a Azure Container Registry (SKU: standard). All resources are in the same subscription and region (West Europe).\r\n\r\nBefore the SDK supported containers, I had a job start task that pulled the image from the Docker registry and the actual task would do a docker run. This was working fine, but I was afraid this might not be efficient or optimized, so I choose to use Azure Batch's container features.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Azure/Batch/issues/comments/415815219","html_url":"https://github.com/Azure/Batch/issues/4#issuecomment-415815219","issue_url":"https://api.github.com/repos/Azure/Batch/issues/4","id":415815219,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTgxNTIxOQ==","user":{"login":"xingwu1","id":10856374,"node_id":"MDQ6VXNlcjEwODU2Mzc0","avatar_url":"https://avatars2.githubusercontent.com/u/10856374?v=4","gravatar_id":"","url":"https://api.github.com/users/xingwu1","html_url":"https://github.com/xingwu1","followers_url":"https://api.github.com/users/xingwu1/followers","following_url":"https://api.github.com/users/xingwu1/following{/other_user}","gists_url":"https://api.github.com/users/xingwu1/gists{/gist_id}","starred_url":"https://api.github.com/users/xingwu1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xingwu1/subscriptions","organizations_url":"https://api.github.com/users/xingwu1/orgs","repos_url":"https://api.github.com/users/xingwu1/repos","events_url":"https://api.github.com/users/xingwu1/events{/privacy}","received_events_url":"https://api.github.com/users/xingwu1/received_events","type":"User","site_admin":false},"created_at":"2018-08-24T16:42:56Z","updated_at":"2018-08-24T16:42:56Z","author_association":"MEMBER","body":"@marcelvb Do you still see the exactly UnixHTTPConnectionPool time out error?"}}
{"actor":{"display_login":"xingwu1"}}