AzureでホストされているLinux(Preview)でService Fabric ClusterにLinuxコンテナを配備しようとしています。エラーと相関しているようだいくつかのメッセージを、私は、ログ・ファイルを調べてきましたコンテナイメージのインポートに失敗しました。エラーfabric_e_invalid_operation
Error event: SourceId='System.Hosting', Property='Download:1.0:1.0'. There was an error during download.Failed to download container image
とが見つかりました::
私は次のエラーで1つのNginx
サービスと私のサービスファブリックアプリケーションを実行できないという問題が生じています
2017-07-05 08:20:23.833,Info,29803,30481,Hosting.ProcessActivationManager,Processing Ipc message with action DownloadContainerImages
2017-07-05 08:20:23.834,Info,29803,30481,Hosting.DockerProcessManager,Starting dockerprocessmanager processName /usr/bin/docker, args daemon -H localhost:2375 -H unix:///var/run/docker.sock
2017-07-05 08:20:23.834,Info,30547,30481,Common.ProcessWait,completed 0 waiters
2017-07-05 08:20:23.837,Info,29803,30481,Hosting.DockerProcessManager,Docker process has started. 29806
2017-07-05 08:20:23.850,Warning,30492,30481,Hosting.ContainerImageDownloader,Failed to get history for Image, error Failed to connect to any resolved endpoint
2017-07-05 08:20:23.850,Info,30492,30481,Hosting.ContainerImageDownloader,CheckDecrement count 0
2017-07-05 08:20:23.850,Warning,30492,30481,Hosting.ContainerActivator,Failed to import docker image error FABRIC_E_INVALID_OPERATION.
2017-07-05 08:20:23.850,Info,30492,30481,Transport.En[email protected],9aff2afa-8f9e-a34e-9d67-4bf57c605eb8:120476 true 125B @ qsize 0/0B
2017-07-05 08:20:23.850,Warning,30492,30481,Hosting.ProcessActivationManager,DownloadContainerImages returned FABRIC_E_INVALID_OPERATION
2017-07-05 08:20:23.855,Info,29705,30566,[email protected],9aff2afa-8f9e-a34e-9d67-4bf57c605eb8:120476 true 1 125B
2017-07-05 08:20:23.855,Warning,29583,30566,[email protected]:131437078006900280,Failed to import container images error FABRIC_E_INVALID_OPERATION.
2017-07-05 08:20:23.855,Info,29583,30566,[email protected]:131437078006900280,Download container images count 1 for activationcontext error FABRIC_E_INVALID_OPERATION.
2017-07-05 08:20:23.855,Warning,29583,30566,[email protected]:131437078006900280,Download: Download:LinuxContainerServiceFabricApplicationType_App1:NginxGuestContainerPkg:1.0:1.0, ErrorCode=FABRIC_E_INVALID_OPERATION, RetryCount=7
しかし、理由は何か分かりませんFailed to get history for Image, error Failed to connect to any resolved endpoint
。ここに私のServiceManifest
次のとおりです。
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="NginxGuestContainerPkg"
Version="1.0.0"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ServiceTypes>
<!-- This is the name of your ServiceType.
The UseImplicitHost attribute indicates this is a guest service. -->
<StatelessServiceType ServiceTypeName="NginxGuestContainerType" UseImplicitHost="true" />
</ServiceTypes>
<!-- Code package is your service executable. -->
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<!-- Follow this link for more information about deploying Windows containers to Service Fabric: https://aka.ms/sfguestcontainers -->
<ContainerHost>
<ImageName>library/nginx:1.13.0-alpine-perl</ImageName>
</ContainerHost>
</EntryPoint>
<!-- Pass environment variables to your container: -->
<!--
<EnvironmentVariables>
<EnvironmentVariable Name="VariableName" Value="VariableValue"/>
</EnvironmentVariables>
-->
</CodePackage>
<!-- Config package is the contents of the Config directoy under PackageRoot that contains an
independently-updateable and versioned set of custom configuration settings for your service. -->
<ConfigPackage Name="Config" Version="1.0.0" />
<Resources>
<Endpoints>
<!-- This endpoint is used by the communication listener to obtain the port on which to
listen. Please note that if your service is partitioned, this port is shared with
replicas of different partitions that are placed in your code. -->
<Endpoint Name="NginxGuestContainerTypeEndpoint" Protocol="http" UriScheme="http" Port="80" />
</Endpoints>
</Resources>
</ServiceManifest>
そして、私のApplicationManifest
:
<?xml version="1.0" encoding="utf-8"?>
<ApplicationManifest ApplicationTypeName="LinuxContainerServiceFabricApplicationType"
ApplicationTypeVersion="1.0.0"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters>
<Parameter Name="NginxGuestContainer_InstanceCount" DefaultValue="-1" />
</Parameters>
<!-- Import the ServiceManifest from the ServicePackage. The ServiceManifestName and ServiceManifestVersion
should match the Name and Version attributes of the ServiceManifest element defined in the
ServiceManifest.xml file. -->
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="NginxGuestContainerPkg" ServiceManifestVersion="1.0.0" />
<ConfigOverrides />
<Policies>
<ResourceGovernancePolicy CodePackageRef="Code" CpuShares="500" MemoryInMB="1024" MemorySwapInMB="4084" MemoryReservationInMB="1024" />
<ContainerHostPolicies CodePackageRef="Code">
<RepositoryCredentials AccountName="someusername" Password="" PasswordEncrypted="false"/>
<PortBinding ContainerPort="80" EndpointRef="NginxGuestContainerTypeEndpoint"/>
</ContainerHostPolicies>
</Policies>
</ServiceManifestImport>
<DefaultServices>
<!-- The section below creates instances of service types, when an instance of this
application type is created. You can also create one or more instances of service type using the
ServiceFabric PowerShell module.
The attribute ServiceTypeName below must match the name defined in the imported ServiceManifest.xml file. -->
<Service Name="NginxGuestContainer">
<StatelessService ServiceTypeName="NginxGuestContainerType" InstanceCount="[NginxGuestContainer_InstanceCount]">
<SingletonPartition />
</StatelessService>
</Service>
</DefaultServices>
</ApplicationManifest>
あなたは私が私がここで間違ってやっているものを指摘助けることができますか?ありがとうございました。
更新
私は、これが問題を引き起こしているかどうかわからないが、私はSFノードのいずれかにSSHをするとき、私はドッカーサービスがstopped
であることを発見しました。私がそれを起動してマニュアルpull
をしようとすると、1分後に自動的に停止します。ここでsystemctl
からログです:
Jul 05 09:25:51 default000000 dockerd[41096]: time="2017-07-05T09:25:51.835329455Z" level=info msg="Loading containers: done."
Jul 05 09:25:51 default000000 dockerd[41096]: time="2017-07-05T09:25:51.946744849Z" level=info msg="Daemon has completed initialization"
Jul 05 09:25:51 default000000 dockerd[41096]: time="2017-07-05T09:25:51.946809649Z" level=info msg="Docker daemon" commit=02c1d87 graphdriver=aufs version=17.06.0-ce
Jul 05 09:25:51 default000000 dockerd[41096]: time="2017-07-05T09:25:51.961652188Z" level=info msg="API listen on /var/run/docker.sock"
Jul 05 09:25:51 default000000 systemd[1]: Started Docker Application Container Engine.
Jul 05 09:26:53 default000000 systemd[1]: Stopping Docker Application Container Engine...
Jul 05 09:26:53 default000000 dockerd[41096]: time="2017-07-05T09:26:53.919115662Z" level=info msg="Processing signal 'terminated'"
Jul 05 09:26:53 default000000 dockerd[41096]: time="2017-07-05T09:26:53.954315756Z" level=info msg="stopping containerd after receiving terminated"
Jul 05 09:26:54 default000000 systemd[1]: Stopped Docker Application Container Engine.
Jul 05 09:26:55 default000000 systemd[1]: Stopped Docker Application Container Engine.
はいCLIから 'library/nginx:1.13.0-alpine-perl'イメージを取得できます。 – Hendry