0

I have a hosted service on Windows Azure and I am trying to use Wasabi Azure rules to affect scaling, however my rules are not being enforced. Both my rules.xml and serviceinformation-store.xml have been uploaded to my autoscaling Azure storage container. Here is my rules.xml

<rules xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/rules" enabled="true">
  <constraintRules>
    <rule name="default" enabled="true" rank="1" description="The default constraint rule">
      <timetable startDate="2012-11-05" startTime="05:34:00" utcOffset="-07:00" duration="02:00:00">
        <daily/>
      </timetable>
      <actions>
        <range min = "4" max="4" target="myWebService"/>
      </actions>
    </rule>
    <rule name="ScaledownAtBusinessClose" enabled="true" rank="1" description="Scale down after hours">
      <timetable startDate="2012-11-02" startTime="10:25:00" utcOffset="-07:00" duration="02:00:00">
        <daily/>
      </timetable>
      <actions>
        <range min ="1" max="1" target="myWebService" />
      </actions>
    </rule>  
   </constraintRules>
  </rules>

Here is my service-information store

<serviceModel xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel">
  <subscriptions>
    <subscription name="Windows Azure MSDN - Visual Studio Ultimate" subscriptionId="<myid>" certificateThumbprint= "<mythumbprint>" certificateStoreName="My" certificateStoreLocation="CurrentUser" >
      <services>
        <service dnsPrefix="xxxxxxxxx" slot="Production" scalingMode="Scale">
          <roles>
            <role alias="myWebService" roleName="myWebService" wadStorageAccountName="<myaccount>"/>
          </roles>
        </service>
      </services>
      <storageAccounts>
        <storageAccount alias="<myaccount>" connectionString="DefaultEndpointsProtocol=https;AccountName=<acctname>;AccountKey=<accountkey>">
          <queues>           
          </queues>
        </storageAccount>
      </storageAccounts>
    </subscription>
  </subscriptions>
</serviceModel>

I start the web role with one instance but at 5:34 pm MST, the hosted service (myWebService) does not scale up to 4 instances.

In the project references I have Microsoft.WindowsAzure.Diagnostics, Microsoft.WindowsAzure.ServiceRuntime, Microsoft.WindowsAzure.StorageClient

Alex McClary
  • 107
  • 1
  • 11
  • Just checking but your certificate is accessible using that path? – cillierscharl Nov 06 '12 at 17:46
  • @f0x, So all I did was create an x.509 v3 cert using makecert and uploaded it to my management certs in the windows azure portal. Is there anything else I need to do? – Alex McClary Nov 06 '12 at 19:58
  • well what you could do is try to use the rest api to get perhaps the list of hosted services to see that it is actually accepting that cert. next you would need to make sure that the web role responsible for this scaling actually has access to that cert. feel free to drop me a mail if you need more help. – cillierscharl Nov 06 '12 at 20:28
  • @f0x, so I tried adding the certificate information in my web role in visual studio (so it can have access to the cert), but when I try to update the service it fails saying certificate with thumbprint xxxxxxxxxxxx cannot be found. – Alex McClary Nov 06 '12 at 21:21
  • @f0x I tried using the api, but I am getting a 400 error each time. – Alex McClary Nov 06 '12 at 21:21
  • did you try and read the inner exception? it usually eludes to the issue at hand. You need to know if its the certificate at fault because then there is no way your scaling solution would work. – cillierscharl Nov 06 '12 at 21:22
  • Just going through your config, if you do manage to get the api to return something with that cert, try remoting into that role and adding the certificate manually to its private store. – cillierscharl Nov 06 '12 at 21:28
  • @the inner exception is Proxy Authentication Required (Access is denied) – Alex McClary Nov 06 '12 at 21:32
  • erm... are you sitting behind your companies firewall? – cillierscharl Nov 06 '12 at 21:38
  • Yes I am but I do not see where to set the proxy settings for this api. – Alex McClary Nov 06 '12 at 21:40
  • You wouldn't set it on the API, you would set it on the HTTPRequest. Can you try over 3G or something? – cillierscharl Nov 06 '12 at 21:40
  • @f0x, I included the enterprise autoscaler libraries... but now my roles are crashing every time. – Alex McClary Nov 07 '12 at 21:15
  • @f0x, do you have any idea why the autoscaler crashes the worker role when started? – Alex McClary Nov 08 '12 at 21:47
  • I have no idea, you would need to do some diagnostic tracing and see whats causing the issues. – cillierscharl Nov 09 '12 at 08:15

0 Answers0