I am trying to run the barebones windows server core ltsc2019 on Fargate but I am getting the following error.
I have tested this with and with multiple variants of the same image but they both seem to fail with the same error.
I have also tried to set the OS platform to "WINDOWS_SERVER_2019_FULL" and "WINDOWS_SERVER_2019_CORE" but this also made no difference.
Stopped | CannotStartContainerError: CannotStartContainerError: hcs::System::CreateProcess: C:ServiceMonitor.exe w3svc 69da9324ad914d8dbb35bdd2e91bd132-690230031: The user name or password is incorrect.: unknown
Task Definition:
{
"taskDefinitionArn": "arn:aws:ecs:eu-west-1:347454123191:task-definition/TH-TeamCity-WIN-Agents-TCLXAgentTaskDefinition-vfqY9KUS25jX:1",
"containerDefinitions": [
{
"name": "teamcity-agent",
"image": "mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019",
"cpu": 0,
"links": [],
"portMappings": [],
"essential": true,
"entryPoint": [],
"command": [],
"environment": [],
"environmentFiles": [],
"mountPoints": [],
"volumesFrom": [],
"secrets": [],
"user": "root",
"dnsServers": [],
"dnsSearchDomains": [],
"extraHosts": [],
"dockerSecurityOptions": [],
"dockerLabels": {},
"ulimits": [],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "TH-TeamCity-WIN-Agents-ECSLogGroup-QRfQsjAva3sk",
"awslogs-region": "eu-west-1",
"awslogs-stream-prefix": "aws/ecs/teamcity-agent"
},
"secretOptions": []
},
"systemControls": []
}
],
"family": "TH-TeamCity-WIN-Agents-TCLXAgentTaskDefinition-vfqY9KUS25jX",
"executionRoleArn": "redacted",
"networkMode": "awsvpc",
"revision": 1,
"volumes": [],
"status": "ACTIVE",
"requiresAttributes": [
{
"name": "com.amazonaws.ecs.capability.logging-driver.awslogs"
},
{
"name": "ecs.capability.execution-role-awslogs"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.19"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.17"
},
{
"name": "com.amazonaws.ecs.capability.docker-remote-api.1.18"
},
{
"name": "ecs.capability.task-eni"
}
],
"placementConstraints": [],
"compatibilities": [
"EC2",
"FARGATE"
],
"requiresCompatibilities": [
"FARGATE"
],
"cpu": "4096",
"memory": "8192",
"runtimePlatform": {
"operatingSystemFamily": "WINDOWS_SERVER_2019_FULL"
},
"registeredAt": "2022-07-21T12:08:08.292Z",
"registeredBy": "redacted",
"tags": [
]
}
2
Answers
One of the reasons might be environment variables that must be passed to the container.
Can u check with the docker image which variables it needs to run the image.
U can pass the variables in task definitions.
Thanks.
That’s because the image doesn’t have a user named
root
and the task definition asks for the userroot
. I had the same issue just now. Removing theuser
setting fixed it.You can probably create the user with something like the following, but I haven’t tried that.