user2873833
user2873833

Reputation: 313

Docker Windows container crashes with Azure Service Fabric

I am trying to run a Docker image inside a Service Fabric cluster. This image runs fine on my local machine. However, when I deploy it to either my local cluster or a cluster on Azure Service Fabric, it starts to crash.

I tried running the docker ps command on the machine. It shows a container image running, but after 5s when I run the command again, it shows an empty list.

My application is built using ASP.NET Core 2.0.7 and my container image is microsoft/aspnetcore:2.0.7-nanoserver-1709

I am using the below OS for my cluster:

Offer: WindowsServerSemiAnnual SKU:
Datacenter-Core-1709-with-Containers-smalldisk

I see the below error:

Error event: SourceId='System.Hosting',
Property='CodePackageActivation:Code:EntryPoint'.
There was an error during CodePackage activation.System.Fabric.FabricException (-2147017731)
Failed to start Container.
ContainerName=sf-2-4e0c854d-d2d9-458a-82c5-78da874dc520_6fd774de-4796-4563-ab3f-c3bbb4d49e0c, ApplicationId=ServiceFabricApplicationType_App2, ApplicationName=fabric:/ServiceFabricApplication. DockerRequest returned StatusCode=InternalServerError with ResponseBody={"message":"container fb204978704c52917704f1f6985ec9a73c9e76596e7258ff0ffce93c9c5109e0 encountered an error during CreateContainer: failure in a Windows system call

Upvotes: 0

Views: 643

Answers (1)

LoekD
LoekD

Reputation: 11470

It's very likely that you're running into this because of a mismatch between the version of Windows inside the image vs the version on the host. Check out the compatibility list here. (It specifically mentions your error message.)

To resolve this, you could:

Rebuild the container based on the version of microsoft/nanoserver or microsoft/windowsservercore

If the host is newer, use docker run --isolation=hyperv ... Run on a different host with the same Windows version

Upvotes: 1

Related Questions