2011-07-04 36 views
1

禁用遠程桌面連接後,我正在使用奇怪的Azure問題。我開始從Azure SDK 1.2升級到1.4,並啓用了遠程桌面,以便於調試。但是,一旦完成升級並且所有部署工作都順利進行,我會在禁用遠程桌面連接的情況下進行一次最終部署。令我驚訝的是,我的網絡角色實例被困在「等待角色啓動」階段的「」階段。有趣的是,工作者角色實例正常啓動。關於20後的部署問題是100%可重複:如何解決此Azure錯誤:Web角色禁用遠程桌面連接後無法啓動?

  • 遠程桌面啓用:一切正常
  • 遠程桌面禁用:無法web角色實例啓動

啓用的IntelliTrace不似乎有幫助,因爲嘗試獲取日誌結果爲「沒有IntelliTrace日誌可用」錯誤。正如所料,我的源代碼管理工具顯示啓用和禁用遠程桌面的唯一區別在於服務定義和配置文件(.cscfg,.csdef)。重新映像和重新啓動虛擬機也似乎沒有任何好處。

如果有人有類似的問題,請幫助一個絕望的傢伙!

UPDATE:這裏有服務定義和配置文件:

ServiceDefinition.csdef中

<?xml version="1.0" encoding="utf-8"?> 
<ServiceDefinition name="####" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition"> 
    <WebRole name="####.Web" enableNativeCodeExecution="true"> 
    <Runtime executionContext="elevated" /> 
    <Startup> 
     <Task commandLine="StartupTasks\FixACLs.cmd" executionContext="elevated" /> 
    </Startup> 
    <Sites> 
     <Site name="Web"> 
     <Bindings> 
      <Binding name="HttpIn" endpointName="HttpIn" /> 
     </Bindings> 
     </Site> 
    </Sites> 
    <ConfigurationSettings> 
     <Setting name="DiagnosticsConnectionString" /> 
    </ConfigurationSettings> 
    <LocalResources> 
     <LocalStorage name="Index" cleanOnRoleRecycle="false" sizeInMB="10240" /> 
    </LocalResources> 
    <Endpoints> 
     <InputEndpoint name="HttpIn" protocol="http" port="80" /> 
    </Endpoints> 

    <!-- BEGIN Remote desktop addition --> 
    <Imports> 
     <Import moduleName="RemoteAccess" /> 
    </Imports> 
    <!-- END Remote desktop addition --> 

    </WebRole> 
    <WorkerRole name="####.Worker" enableNativeCodeExecution="true"> 
    <Runtime executionContext="elevated" /> 
    <ConfigurationSettings> 
     <Setting name="DiagnosticsConnectionString" /> 
    </ConfigurationSettings> 
    <LocalResources> 
     <LocalStorage name="Index" cleanOnRoleRecycle="true" sizeInMB="10240" /> 
    </LocalResources> 

    <!-- BEGIN Remote desktop addition --> 
    <Imports> 
     <Import moduleName="RemoteAccess" /> 
     <Import moduleName="RemoteForwarder" /> 
    </Imports> 
    <!-- END Remote desktop addition --> 

    </WorkerRole> 
</ServiceDefinition> 

ServiceConfiguration.cscfg

<?xml version="1.0"?> 
<ServiceConfiguration serviceName="####" osFamily="2" osVersion="*" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration"> 
    <Role name="####.Web"> 
    <Instances count="2" /> 
    <ConfigurationSettings> 
     <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=####;AccountKey=####" /> 

     <!-- BEGIN Remote desktop addition --> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="####" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="####" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="####" /> 
     <!-- END Remote desktop addition --> 

    </ConfigurationSettings> 

    <!-- BEGIN Remote desktop addition --> 
    <Certificates> 
     <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="####" thumbprintAlgorithm="sha1" /> 
    </Certificates> 
    <!-- END Remote desktop addition --> 

    </Role> 
    <Role name="####.Worker"> 
    <Instances count="1" /> 
    <ConfigurationSettings> 
     <Setting name="DiagnosticsConnectionString" value="DefaultEndpointsProtocol=https;AccountName=####;AccountKey=####" /> 

     <!-- BEGIN Remote desktop addition --> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.Enabled" value="true" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountUsername" value="####" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountEncryptedPassword" value="####" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteAccess.AccountExpiration" value="####" /> 
     <Setting name="Microsoft.WindowsAzure.Plugins.RemoteForwarder.Enabled" value="true" /> 
     <!-- END Remote desktop addition --> 

    </ConfigurationSettings> 

    <!-- BEGIN Remote desktop addition --> 
    <Certificates> 
     <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="####" thumbprintAlgorithm="sha1" /> 
    </Certificates> 
    <!-- END Remote desktop addition --> 

    </Role> 
</ServiceConfiguration> 
+0

請張貼兩個日誌(舊的和新的)之間的差異。 – Steve

+0

@Steve編輯該問題以包含這兩個文件。 – tishon

+1

Hrm ...如果您只是將'[RemoteAccess.Enabled] value =「true」'設置爲'「false」'你還會遇到同樣的問題嗎?Azure技術支持對我來說一直很好。我不得不打電話兩次,他們幫助我兩次...不收費。 – Steve

回答

5

終於找到了罪魁禍首感謝對通信Stevesmarx :)謝謝你們!你讓我朝正確的方向挖掘。

原來的PowerShell腳本,我的啓動任務是使用Microsoft.WindowsAzure.ServiceRuntime管理單元,其中,由smarx指出,靜靜地添加了遠程訪問模塊時啓用了遠程桌面連接解僱。而這種微妙的包容讓我忽視了對snapin的依賴,因此我更加頭疼。

發現我居然看到了,我甚至沒有需要的管理單元的問題之後,因此該解決方案是簡單地刪除添加-PSSnapin Microsoft.WindowsAzure.ServiceRuntime從我的PowerShell腳本調用。如果我確實需要管理單元,this文章展示了一種在使用管理單元之前安裝管理單元的方法,因爲它在默認情況下並未安裝在Azure虛擬機上。

另一個幫助我調試啓動任務的有用資源是this articlesmarx

希望這可以讓我一直都有人因爲這個問題而迷路。再次感謝您Stevesmarx

相關問題