无法通过ActorServiceProxy将端点解析为actor

时间:2018-10-25 12:33:17

标签: .net-core azure-service-fabric service-fabric-stateful service-fabric-actor

我在本地servicefabric群集上有一个actor,从无状态服务完成作业后,我尝试将其删除。我使用RemotingListenerVersion.V2。

  var actor = ActorServiceProxy.Create(new Uri($"{_applicationName}/{_actorServiceName}"), actorId);
              await actor.DeleteActorAsync(actorId, CancellationToken.None);

然后我收到一个例外:

  在地址中找不到

{“ NamedEndpoint'V2Listener'   '{\“ Endpoints \”:{\“ \”:\“ my-localhost.pl:30004 + ea7448c4-2a32-4c48-8ac9-cb23b6bd6269-131849397597858002-a68d72c7-2387-4390-8170-49b38127c0d1 \”}}}'   分区'xxxx-xxx-xxxx-8ac9-cb23b6bd6269'“}

我的演员清单:

<StatefulServiceType ServiceTypeName="ActorServiceActorServiceType" HasPersistedState="true">
      <Extensions>
        <Extension Name="__GeneratedServiceType__" GeneratedId="c0c20ebd-xxx-xxx-xxx-ebaa99dce8ed|Persisted">
          <GeneratedNames xmlns="http://schemas.microsoft.com/2015/03/fabact-no-schema">
            <DefaultService Name="xxxActorService" />
            <ReplicatorEndpoint Name="xxxxActorServiceActorServiceReplicatorEndpoint" />
            <ReplicatorConfigSection Name="xxxxActorServiceReplicatorConfig" />
            <ReplicatorSecurityConfigSection Name="xxxxxActorServiceActorServiceReplicatorSecurityConfig" />
            <StoreConfigSection Name="xxxxxActorServiceActorServiceLocalStoreConfig" />
            <ServiceEndpointV2 Name="xxxxxActorServiceActorServiceEndpointV2" />
            <ServiceEndpointV2 Name="ServiceEndpointV2" />
            <Endpoint Name="ServiceEndpointV2" />
          </GeneratedNames>
        </Extension>
      </Extensions>
    </StatefulServiceType>
    <CodePackage Name="Code" Version="1.0.0">
    <EntryPoint>
      <ExeHost>
        <Program>xxxxxxx.exe</Program>
      </ExeHost>
    </EntryPoint>
  </CodePackage>
  <ConfigPackage Name="Config" Version="1.0.0" />
  <Resources>
    <Endpoints>
      <Endpoint Name="xxxxxxxEndpointV2" />
      <Endpoint Name="xxxxxxxEndpoint" />
      <Endpoint Name="ServiceEndpointV2"   />
    </Endpoints>
  </Resources>
  <!-- The content will be generated during build -->
</ServiceManifest>

我做错了什么?为什么参与者端点名称为空(值正确)?

1 个答案:

答案 0 :(得分:0)

我检查了CreateServiceInstanceListeners方法

class Form:, class Div: ...

我注意到我错过了设置“名称”参数的过程。当我设置它时,一切都会顺利进行。 解决了。