2012-10-11 42 views
1

我遇到以下情況:我的天青應用程序由5個角色組成。其中一個角色託管Enterprise Library的Autoscale塊。這個角色負責擴大和縮小其他人。Azure Autoscaling塊找不到證書

現在我按照教程,將自動縮放設置添加到app.config中,並添加了services.xml和rules.xml。

的問題是,自動縮放記錄器(工作!)在輸出該錯誤一遍又一遍:

Could not retrieve the instance count for hosted service with DNS prefix 'myCloudApp'. Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClientException: The service configuration could not be retrieved from Windows Azure for hosted service with DNS prefix 'myCloudApp' in subscription id 'xxxxxxxxxxxxxxxxxx' and deployment slot 'Production'. ---> Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Security.CertificateException: The certificate with thumbprint 'xxxxxxxxxxxxxxxxxxxxx' in store name 'My' and store location 'LocalMachine' could not be found. at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Security.CertificateHelper.FindCertificate(StoreName certificateStoreName, StoreLocation certificateStoreLocation, String certificateThumbprint, Boolean withPrivateKey, Boolean validOnly) at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClient.CreateFactory(StoreName certificateStoreName, StoreLocation certificateStoreLocation, String certificateThumbprint, Inspector inspector) at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClient.CallOperation[TResult](Func 2 call, StoreName certificateStoreName, StoreLocation certificateStoreLocation, String certificateThumbprint, String exceptionMessage, String& requestId) --- End of inner exception stack trace --- at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClient.CallOperation[TResult](Func 2 call, StoreName certificateStoreName, StoreLocation certificateStoreLocation, String certificateThumbprint, String exceptionMessage, String& requestId) at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClient.GetDeployment(String hostedServiceDnsPrefix, String subscriptionId, DeploymentSlot deploymentSlot, StoreName certificateStoreName, StoreLocation certificateStoreLocation, String certificateThumbprint) at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClientExtensions.GetDeployment(IServiceManagementClient client, HostedService hostedService) at Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.DataPointsCollection.RoleInstanceCountDataPointsCollector.Collect(DateTimeOffset collectionTime)

我更換了實際指紋和訂閱ID與XXXXX。

我不明白爲什麼它無法訪問我的雲服務。我需要爲這個證書做些什麼嗎?

非常感謝幫助!

回答

2

您是否確實上傳了管理證書的pfx(私鑰側)?此錯誤表明它無法找到機器上安裝的證書。

http://msdn.microsoft.com/en-us/library/windowsazure/gg465712.aspx

+0

證書顯示在azure管理門戶中。其實我有5個證書添加在那裏(不知道他們都來自哪裏)。我嘗試了其中的每一個,並始終得到相同的錯誤 – Christian

+1

只需要清楚一點 - 管理證書上傳(僅限pub key)與上載到VM的證書之間存在差異。你有5個管理證書在門戶中列出,或者你有5個證書上傳到虛擬機(完全不同的東西)? – dunnry

+0

沒問題,那是問題所在。我一直在使用管理證書......至少現在這個問題已經解決了。但是,下一個問題發生。新錯誤:無法爲權限爲'management.core.windows.net'的SSL/TLS建立安全通道。你知道如何啓用SSL嗎? – Christian