Common Issues Which Cause Roles to Recycle

    This section lists some of the common causes of deployment problems, and
    offers troubleshooting tips to help you resolve the problems. An indication
    that a problem exists with an application is when the role instance fails to
    start, or it cycles between the initializing, busy, and stopping states.

    Missing Runtime Dependencies

    If a role in your application relies on any assembly that is not part of
    the .NET Framework or the Windows Azure managed library, you must explicitly
    include that assembly in the application package. Keep in mind that other
    Microsoft frameworks are not available on Windows Azure by default. If your
    role relies on such a framework, you must add those assemblies to the
    application package.

    Before you build and package your application, verify the following:

    • The Copy Local property is set to True for each referenced assembly in
      your project that is not part of the Windows Azure SDK or the .NET
      Framework, if you are using Visual Studio. If you are not using Visual
      Studio, you must specify the locations for referenced assemblies when you
      call CSPack. For more information about using CSPack, seeCSPack
      Command-Line Tool
      .

    • The web.config file does not reference any unused assemblies in the
      compilation element, and all references point to assemblies that are either
      part of the .NET Framework or the Windows Azure SDK, or that have their Copy
      Local property set to True in Visual Studio, or that are included in the
      application package by running CSPack.

    • The Build Action of every .cshtml file is set to Content. This ensures
      that the files will appear correctly in the package and allows other
      referenced files to appear in the package.

    Assembly Targets Wrong Platform

    Windows Azure is a 64-bit environment. Therefore, .NET assemblies compiled
    for a 32-bit target won‘t work on Windows Azure.

    Role Throws Unhandled Exceptions While Initializing or Stopping

    Any exceptions that are thrown by the methods of the RoleEntryPoint
    class, which includes the OnStart,
    OnStop,
    and Run,
    are unhandled exceptions. If an unhandled exception occurs in one of these
    methods, the role will recycle. If the role is recycling repeatedly, it may be
    throwing an unhandled exception each times it tries to start.

    Role Returns from Run Method

    The Run
    method is intended to run indefinitely. If your code overrides the Run method,
    it should sleep indefinitely. If the Run method returns, the role
    recycles.

    Incorrect DiagnosticsConnectionString Setting

    If application uses Windows Azure Diagnostics, then your service
    configuration file must specify the DiagnosticsConnectionString configuration
    setting. This setting should specify an HTTPS connection to your storage
    account in Windows Azure.

    To ensure that your DiagnosticsConnectionString setting is correct before
    you deploy your application package to Windows Azure, verify the
    following:

    • The DiagnosticsConnectionString setting points to a valid storage
      account in Windows Azure. By default, this setting points to the emulated
      storage account, so you must explicitly change this setting before you
      deploy your application package. If you do not change this setting, an
      exception is thrown when the role instance attempts to start the diagnostic
      monitor. This may cause the role instance to recycle indefinitely.

    • The connection string is specified in the following format (the protocol
      must be specified as HTTPS). Replace MyAccountName with the name of your
      storage account, andMyAccountKey with your access key:

      DefaultEndpointsProtocol=https;AccountName=MyAccountName;AccountKey=MyAccountKey

      For more information about using connection strings, see Configuring
      Windows Azure Connection Strings
      .

    If you are developing your application using the Windows Azure Tools for
    Microsoft Visual Studio, you can use the property pages to set this value. For
    more information about using Visual Studio to set the configuration values,
    see Configuring the Cloud
    Service
    .

    Exported Certificate Does Not Include Private Key

    To run a web role under SSL, you must ensure that your exported management
    certificate includes the private key. If you use the Windows Certificate
    Manager to export the certificate, be sure to select the Yes, export the
    private key option. The certificate must be exported to the PFX format, which
    is the only format currently supported.

    See Also

    Concepts

    Troubleshooting and
    Debugging in Windows Azure

    来自 <http://msdn.microsoft.com/en-US/us/library/windowsazure/gg465402.aspx>

时间: 2024-08-13 04:46:45

Common Issues Which Cause Roles to Recycle的相关文章

Failover clustrinng configration common issues

Windows fail-over clustering is very useful for servers fail over, when configuring this function some common issues we might encounter, I shared the solutions as follows: 1) Cluster quorum setting cannot be successful. Most likely, it is due to acce

Fixing common issues when hosting a .NET 4.0 WCF service in IIS 7

http://sandrinodimattia.net/fixing-common-issues-when-hosting-a-net-4-0-wcf-service-in-iis-7/ Until today I never had to host a WCF service in IIS… I always prefered using a ServiceHost in a Windows Service. Before getting my service up and running I

Macbook pro install Tex and TexEditor and common issues (keep updating)

TexLive versus  Miktex Both of them are based on Tex. (Mactex is wrapper on TexLive distribution of Tex and opens to Mac system, while Miktex is for Windows system.) In recent versions, the differences between MiKTeX and TeX Live have narrowed, Packa

10 Common Problems Causing Group Policy To Not Apply

10 Common Problems Causing Group Policy To Not Apply Group Policy is a solid tool and is very stable. Microsoft has made constant improvements to it since Windows 2000. It allows for the configuration and deployment of pretty much anything in your Ac

Docker on YARN在Hulu的实现

这篇文章是我来Hulu这一年做的主要工作,结合当下流行的两个开源方案Docker和YARN,提供了一套灵活的编程模型,目前支持DAG编程模型,将会支持长服务编程模型. 基于Voidbox,开发者可以很容易的写出一个分布式的框架,Docker作为运行的执行引擎,YARN作为集群资源的管理系统. 同时这篇文章也发表在Hulu官方的技术博客上:http://tech.hulu.com/blog/2015/08/06/voidbox-docker-on-yarn/ 1. Voidbox Motivati

Java性能提示(全)

http://www.onjava.com/pub/a/onjava/2001/05/30/optimization.htmlComparing the performance of LinkedLists and ArrayLists (and Vectors) (Page last updated May 2001, Added 2001-06-18, Author Jack Shirazi, Publisher OnJava). Tips: ArrayList is faster than

MEANJS DOC

Overview Thank you for downloading the MEAN.JS boilerplate! This simple documentation will cover the basics of developing your MEAN application. Before you begin we recommend you read about the basic building blocks that assemble a MEAN.JS applicatio

2019.3.5 L261 Are All Our Organs Vital?

Medicine has not always shown a lot of respect for the human body. Just think about the ghoulish disregard early surgeons had for our corporeal integrity. They poked holes in the skull and copiously drained blood with leeches or lancets—a practice th

App 组件化/模块化之路——Android 框架组件(Android Architecture Components)使用指南

面对越来越复杂的 App 需求,Google 官方发布了Android 框架组件库(Android Architecture Components ).为开发者更好的开发 App 提供了非常好的样本.这个框架里的组件是配合 Android 组件生命周期的,所以它能够很好的规避组件生命周期管理的问题.今天我们就来看看这个库的使用. 通用的框架准则 官方建议在架构 App 的时候遵循以下两个准则: 关注分离 其中早期开发 App 最常见的做法是在 Activity 或者 Fragment 中写了大量