I had a local setup working yesterday, but today my setup is not working.
I am getting
An error occurred running Get-SFMeshNetwork.
Exit Code: 1
Connect-SFCluster : An error occurred while sending the request.
At line:1 char:138
+ ... rosoft.ServiceFabric.Powershell.Http.psd1'; Connect-SFCluster; (Get-S ...
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ConnectionError: (:) [Connect-SFCluster], ServiceFabricRequestException
+ FullyQualifiedErrorId : ConnectClusterErrorId,Microsoft.ServiceFabric.Powershell.Http.ConnectClusterCmdlet
Get-SFMeshNetwork : Not connected to Service Fabric cluster, please connect using Connect-SFCluster cmdlet before
invoking this cmdlet.
At line:1 char:158
+ ... ic.Powershell.Http.psd1'; Connect-SFCluster; (Get-SFMeshNetwork).Name
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-SFMeshNetwork], InvalidOperationException
+ FullyQualifiedErrorId : GetMeshNetworkErrorId,Microsoft.ServiceFabric.Powershell.Http.GetMeshNetworkCmdlet
I successfully executed all instructions except for the Windows Server 2016 section because I don't have it yet. Is that the possible fix for this error?
It's just confusing because yesterday I was able to get things running locally and publish it to Azure with the same setup I currently have.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Based on the error, looks like you need to run the Connect-SFCluster command. Did you try that yet?
I haven't yet, but I did and put the results below. Couple things for additional context.
I
2>Deploying the application to the Service Fabric local cluster failed. See Service Fabric Explorer for additional details.And in the SF Explorer
No Service Fabric local cluster is running. Use the Service Fabric Local Cluster Manager tool in the Notification Area to start the local cluster.
As a result, I got my tray to show so I could stop and restart the local cluster. I stopped and restarted it, then tried to run the code again, and it outputted the same error.
When I tried to execute the Connect-SFCluster command, it says
The term 'Connect-SFCluster' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
So I searched and found Connect-ServiceFabricCluster which Connect-SFCluster seems like an alias of. I ran that and it outputted True with JSON info.
So I tried to run Connect-ServiceFabricCluster <nodeAddress>:1900
I looked at documentation for it here https://docs.microsoft.com/en-us/powershell/module/servicefabric/connect-servicefabriccluster?view=azureservicefabricps
And ran Connect-ServiceFabricCluster -ConnectionEndpoint "ServiceFabric01.ContosoCloudApp.net:19000" but placing in my nodeAddress gotten from the JSON data from the Connect-ServiceFabricCluster with no tags/parameters.
I got this after trying that
No cluster endpoint is reachable, please check if there is connectivity/firewall/DNS issue.
Should I set that alias and hope the powershell script picks it up or should I look at a different path?
What is the status of your local cluster? Does it show running with no errors? You can check in the Service Fabric Cluster Manager.
It has an x for error next to the 'Cluster' heading which is caused by an x next to the 'Applications' sub-header. When I click down onto the 'Application' sub-header, I can see
fabric:/GatewayProxyFor_HostingAtttempt2Gateway GatewayProxyApplicationType 1.0 Error Ready
When I click into it, the last thing it says is
'System.Hosting' reported Error for property 'CodePackageActivation:GatewayProxyService.Code:EntryPoint:132152082391718273'.
There was an error during CodePackage activation.Service host failed to activate. Error:FABRIC_E_INVALID_OPERATION
The info above it says a deployed service package is unhealthy in addition to the deployed application being unhealthy.
So looks like the cluster is essentially toast. Can you remove the cluster and deploy a fresh one? You can do this via the SF icon tray.
I removed the local cluster and then setup 1 Mesh Node.
I checked the state of the cluster after setting up the Mesh node and everything is green with 1 node, 2 applications, 2 services, 2 partitions, and 2 replicas. All green.
I opened VS as an admin and deployed to the local Service Fabric Cluster.
'System.FM' reported Error for property 'State'.
Partition is below target replica or instance count.
fabric:/Application2/Web1 1 1 <id> N/P InBuild _Node_0 <id>
I opened VS normally and deployed to the local Service Fabric Cluster and got
Partition is below target replica or instance count.
fabric:/Application2/Web1 1 1 <id>
I looked at this page https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-understand-and-troubleshoot-with-system-health-reports and saw something like "So, in this case, two replicas can't be placed, because the target number of replicas is higher than the number of nodes available" that touches on the setup.
The partition I have has a Target Replicate Set Size of 1 and a Min Replica Set Size of 1. On my main dashboard, it says I have 5 replicas with 1 being a warning. (This is all after the program has stopped)
I found issue #15 that talks about storage space being the cause, but my drive has a good amount of space on it (well above 10Gb).
https://github.com/Azure/service-fabric-issues/issues/15
Will close as we are working offline :)
Most helpful comment
So looks like the cluster is essentially toast. Can you remove the cluster and deploy a fresh one? You can do this via the SF icon tray.