Closed boppbo closed 5 years ago
Service Fabric 6.4.617.9590 Service Fabric SDK 3.3.617.9590 Service Fabric Mesh SDK 3.3.617.9590
Hadn't had the problem with the previous version of service fabric
Did you try Connect-ServiceFabricCluster
?
PS C:\Users\b.bopp> import-module 'C:\Program Files\Microsoft SDKs\Service Fabric\Tools\Mesh\S
cripts\PSModule\Microsoft.ServiceFabric.Powershell.Http.psd1';
PS C:\Users\b.bopp> Connect-ServiceFabricCluster
True
ConnectionEndpoint :
FabricClientSettings : {
ClientFriendlyName :
PowerShell-f5afcf94-e742-41b5-adbc-0f69d58e245b
PartitionLocationCacheLimit : 100000
PartitionLocationCacheBucketCount : 1024
ServiceChangePollInterval : 00:02:00
ConnectionInitializationTimeout : 00:00:02
KeepAliveInterval : 00:00:20
ConnectionIdleTimeout : 00:00:00
HealthOperationTimeout : 00:02:00
HealthReportSendInterval : 00:00:00
HealthReportRetrySendInterval : 00:00:30
NotificationGatewayConnectionTimeout : 00:00:30
NotificationCacheUpdateTimeout : 00:00:30
AuthTokenBufferSize : 4096
}
GatewayInformation : {
NodeAddress :
<my-hostname>:19000
NodeId :
bf865279ba277deb864a976fbf4c200e
NodeInstanceId : 131888351416735393
NodeName : _Node_0
}
PS C:\Users\b.bopp> Connect-SFCluster
Connect-SFCluster : Value cannot be null.
Parameter name: source
At line:1 char:1
+ Connect-SFCluster
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Connect-SFCluster], ArgumentNullExceptio
n
+ FullyQualifiedErrorId : ConnectClusterErrorId,Microsoft.ServiceFabric.Powershell.Http.
ConnectClusterCmdlet
Are you running the VS from a different account then the context in which the cluster was brought up? We create a file at the following location %appdata%\ServiceFabricLocalClusterConnectionParams.json when the mesh cluster is brought up however seems like when running the VS task, this file cant be found as it is running under a different user context. While we understand your scenario and see how to fix it, as a mitigation, you can try copying that file to the user's appdata under which VS task is running.
Yes, I have to use another account, as my logged in user (under which VS runs), doesn't have sufficient rights to start SF.
Thank you. Copying the file worked for me.
@boppbo If the account under which VS is running doesnt have admin access, then how do you intend to use VS app/container debugging ? That wont work in a non admin account.
Debugging docker / docker compose targets works for me without administrator rights. The account is in the "docker-users" and both local servicefabric groups. I don't know if that makes a difference.
In my opinion running VS with admin rights isn't the optimal solution. Besides the security perspective its a bad user experience if you have to run it as another user as it will run with a different user profile / all default settings for that user.
Edit: Additional, running VS as administrator I'm not able to add my non-elevated user account, that is associated with my azure subscription.
After removing "[parameters('Web1_cpu')]" from service.yaml (and reinstalling sf several times) I'm currently able to debug locally. VS runs under my non-elevated user account. Only SF local cluster got started as a administrator account.
With the reference to a parameter in service.yaml Edit: I was affected by #265, I wasn't able to deploy locally (without any significant error message. Just a note to look in sf-explorer, where I couldn't find anything)
The VS build task fails trying to connect to the local cluster. I tried the command in powershell to get more information. The same command as User of Group "Administrators" succeeds. The non-elevated account is member of ServiceFabricAdministrators and ServiceFabricAllowedUsers