Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Service Fabric .Net Framework 4.5.1 and 4.6

After changing the target framework from 4.5.1 to 4.6 the service in Auzure Fail, the local deployment is working.

Do I need to add .Net 4.6 support ? - I'm unable to find where I can see the frameworks available in my cluster in azure.

Thank you

ApplicationName : fabric:/Lending20.Service.IdentityManagement AggregatedHealthState
: Error UnhealthyEvaluations : Unhealthy services: 100% (1/1), ServiceType='IdentityManagementServiceType', MaxPercentUnhealthyServices=0%.

Unhealthy service: ServiceName='fabric:/Lending20.Service.IdentityManagement/Identity ManagementService', AggregatedHealthState='Error'.

Unhealthy partitions: 100% (1/1), MaxPercentUnhealthyPartitionsPerService=0%.

Unhealthy partition: PartitionId='7c68b397-fda3-491d-9e17-921cd24217ca', AggregatedHealthState='Error'.

Error event: SourceId='System.FM', Property='State'.

ServiceHealthStates : ServiceName : fabric:/Lending20.Service.IdentityManagement/IdentityManagementService AggregatedHealthState : Error

DeployedApplicationHealthStates : ApplicationName : fabric:/Lending20.Service.IdentityManagement NodeName : _lending1 AggregatedHealthState : Ok

HealthEvents : SourceId : System.CM Property : State HealthState : Ok SequenceNumber : 3464 SentAt : 11/21/2015 12:38:08 PM ReceivedAt : 11/21/2015 12:38:08 PM TTL : Infinite Description : Application has been created. RemoveWhenExpired : False IsExpired : False Transitions : Warning->Ok = 11/21/2015 12:38:08 PM, LastError = 1/1/0001 12:00:00 AM

like image 559
Yusbel Garcia Avatar asked Nov 21 '15 23:11

Yusbel Garcia


2 Answers

You can use the following ARM template to install .NET 4.6.1. Note that it's dependent on this script (used by Service Profiler). You also can replace it with any other PowerShell script.

The parameter is the base name of the node. So if you have VM0,.. VM5 in your cluster, you should set vmName = 'VM'. The vmExtensionLoop is set to 5 nodes; you can also change that of course.

If you use an ARM template to deploy your cluster, you can include this as part of it. Note it can slow down the deployment of the scale set, since it requires a restart.

{
  "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "vmName": {
      "type": "string",
      "metadata": {
        "description": "Virtual machine name."
      },
    }
  },
  "resources": [
    {
      "apiVersion": "2015-05-01-preview",
      "type": "Microsoft.Compute/virtualMachines/extensions",
      "name": "[concat(parameters('vmName'),copyIndex(0), '/CustomScriptExtensionInstallNet461')]",
      "location": "[variables('location')]",
      "tags": {
        "displayName": "CustomScriptExtensionInstallNet461"
      },
      "properties": {
        "publisher": "Microsoft.Compute",
        "type": "CustomScriptExtension",
        "typeHandlerVersion": "1.4",
        "autoUpgradeMinorVersion": true,
        "settings": {
          "fileUris": [ "https://gist.githubusercontent.com/aelij/7ea90dda4a187a482584/raw/a3e0f946d4a22b0af803edb503d0a30a263fba2c/InstallNetFx461.ps1" ],
          "commandToExecute": "powershell.exe -ExecutionPolicy Unrestricted -File InstallNetFx461.ps1"
        }
      },
      "copy": {
        "name": "vmExtensionLoop",
        "count": 5
      }
    }
  ]
}
like image 105
Eli Arbel Avatar answered Sep 27 '22 02:09

Eli Arbel


.NET 4.6 is not yet available in the default Windows Server 2012 image used in Azure. At this point, your only option is to log into each VM and install it.

like image 32
Sean McKenna Avatar answered Sep 24 '22 02:09

Sean McKenna