Service fabric not able to access file on network

Category: azure service fabric

Question

GCore on Tue, 10 Sep 2019 12:50:52


My service fabric App is not able to access a network file location (in same lan \\) in spite of running it under a valid AD user account. The AD user account does have the access to that location

The stateless ServiceFabric Service which implements WebListenerCommunicationListener is deployed on On premise service fabric cluster  (not using docker)

I have added below thing in application manifext

    <Policies>
      <RunAsPolicy CodePackageRef="ReceptorService" UserRef="AdUser" />
      <SecurityAccessPolicy ResourceRef="ServiceEndpoint" PrincipalRef="ExternalAdUser" GrantRights="Full" />
    </Policies>
  </ServiceManifestImport>

  <Principals>
    <Users>
      <User Name="AdUser" AccountType="DomainUser" AccountName="Domain\ServiceAccountName" Password="PlainTextPassword" PasswordEncrypted="false" />
    </Users>
  </Principals>
</ApplicationManifest>
Can you let me know what else i am missing so that my service should be able to access the file. Right now its says file does not exists even though the file does existing on the location.


Replies

Micah McKittrick on Tue, 10 Sep 2019 17:07:39


Have you logged into the physical nodes and manually set the folder sharing options? 

GCore on Wed, 11 Sep 2019 11:25:25


Yes, I have logged in to physical nodes & have shared the folder with everyone

Micah McKittrick on Wed, 11 Sep 2019 15:00:24


Thanks for that. If you login to the VM, are you able to access the file that is shared? or does that also fail? I am curious to see if it is just the app that is struggling to access the folder or if something is just not setup correctly and the sharing does not work all up. 

GCore on Thu, 12 Sep 2019 14:35:47


I am able to access the file after login to the VM Cluster server directly but :( not via service.. Can you suggest any other network setting in manifest or any where for Service Fabric to access such network share

Any Idea .. I am new to this service fabric word :)



Micah McKittrick on Thu, 12 Sep 2019 19:43:06


You appear to have it configured properly. I am going to reach out to some of the Service Fabric Engineer groups internally to see if we are missing something. I will update once I hear back. 

Micah McKittrick on Thu, 19 Sep 2019 18:44:44


The product team agrees that if the were permission issues you would get a denied error rather than that the app can't find the file. 

Can you share the exact error the app throws? 

I would also check that the machine name/ IP is correct in your app settings. I assume it is but something simple could cause the error. I personally fat finger things at times so figured worth a check :)