質問

I'm running into this exception using Azure auto-scaling WASABi.

Could not retrieve the instance count for hosted service with DNS prefix 'DNS Prefix'. Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClientException: The service configuration could not be retrieved from Windows Azure for hosted service with DNS prefix 'DNS Prefix' in subscription id 'Subscription ID' and deployment slot 'Staging'.

System.ServiceModel.Security.SecurityNegotiationException: Could not establish secure channel for SSL/TLS with authority 'management.core.windows.net'. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace ---

I have set my service configuration as follow:

<?xml version="1.0" encoding="utf-8" ?>
<serviceModel xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel">
  <subscriptions>
    <subscription name="3-Month Free Trial"
                  certificateThumbprint="<Thumbprint>"
                  subscriptionId="<Subscription ID>"
                  certificateStoreLocation="LocalMachine" certificateStoreName="My">
      <services>
        <service dnsPrefix="<DNS Prefix>" slot="Staging">
          <roles>
            <role alias="<Role Name>" roleName="<Role Name>" wadStorageAccountName="wad-control-container"/>
          </roles>
        </service>
      </services>
      <storageAccounts>
        <storageAccount alias="wad-control-container"
                        connectionString="DefaultEndpointsProtocol=https;AccountName=<Account Name>;AccountKey=<Account Key>">
        </storageAccount>
      </storageAccounts>
    </subscription>
  </subscriptions>
  <stabilizer scaleUpCooldown="00:01:00"
            scaleDownCooldown="00:01:00"
            scaleUpOnlyInFirstMinutesOfHour="0"
            scaleDownOnlyInLastMinutesOfHour="0" />
</serviceModel>

To add on, the auto-scaling role is a single Worker Role. The deployment is having 2 Web Role for the website and this auto-scaling Worker Role together.

The web role is using the same certificate and is working fine, could anyone shed some light on what I can look into to solve this issue?

Thanks and Cheers.

役に立ちましたか?

解決

I got it to work.

  1. Create a new certificate
  2. Upload to the Subscription - Certificate
  3. Upload to Settings - Management Certificate
  4. Add certificate thumbprint to both web and worker roles in VS Studio
  5. Set certificateStoreLocation to CurrentUser in service xml and service definition
  6. Redeploy

Hope this help anyone who had this issue.

Cheers.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top