0

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

Dale K
  • 25,246
  • 15
  • 42
  • 71
user2873833
  • 263
  • 1
  • 2
  • 6
  • Do you get any error messages when starting the container? Try running with -it to get more info. – Mikkel Mørk Hegnhøj Aug 20 '18 at 06:55
  • Yeah did try running container in interactive mode, I found that .net core dependencies were missing. So I added below tag false with which container is running fine now. However when deployed on cluster using service fabric. It still fails. – user2873833 Aug 20 '18 at 19:31

1 Answers1

1

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

Community
  • 1
  • 1
LoekD
  • 11,402
  • 17
  • 27