问题 Azure Connect : SQL server Database issue

  • Freitag, 24. Juni 2011 10:42
     
     

    Hi,

     

    We have an application hosted on Azure which is accessing our on-premises SQL Server Database through Azure Connect. We have installed Azure connect on our database Server and grouped the Database server Endpoint and the Application web role in the portal to establish between them.

     

    Now when we try to access the application we are getting the below error:

     

     

    Server Error in '/' Application.


    Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Data.SqlClient.SqlException: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


    Stack Trace:

    [SqlException (0x80131904): Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.]

       CIS.MSite.Business.Managers.Manager.GetRoleForEmpID(EditorialNook objEditorialNook) in D:\Divya\Project\AMF\Code\Gloria\Practice\MultipleInstance\WorkingApps\MultiInstances\MigratedGloria\CIS.MSite.Business.Managers\Manager.cs:403

       WebRole1.Global.Session_Start(Object sender, EventArgs e) in D:\Divya\Project\AMF\Code\Gloria\Practice\MultipleInstance\WorkingApps\MultiInstances\MigratedGloria\WebRole1\Global.asax.cs:94

       System.Web.SessionState.SessionStateModule.CompleteAcquireState() +409

       System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1296

       System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +115

       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371

     

     

    We enabled the Https\TCP outbound 443 firewall rule on our databse server. When we check the traffic on the VM we are able to see outbound traffic on Firewall but not able to see inbound traffic. Also when we check Azure connect diagnostics we found the error saying “Connect Service failed while connecting to the internet, please ensure that the proxy settings for the local system settings”.

     

    In the portal I RDP one of the instances of the application and pinged our Database server from the Azure machine:

     

    D:\Users\sa>ping A2MS00155V.AZUREMF.COM

    Pinging A2MS00155V.AZUREMF.COM [2404:f800:7003:0:c8fb:487e:9857:4359] from 2404:
    f800:7003:5:401d:592:8ee0:6aa with 32 bytes of data:
    Reply from 2404:f800:7003:0:c8fb:487e:9857:4359: time=502ms
    Reply from 2404:f800:7003:0:c8fb:487e:9857:4359: time=163ms
    Reply from 2404:f800:7003:0:c8fb:487e:9857:4359: time=164ms
    Reply from 2404:f800:7003:0:c8fb:487e:9857:4359: time=170ms

    Ping statistics for 2404:f800:7003:0:c8fb:487e:9857:4359:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 163ms, Maximum = 502ms, Average = 249ms

     

    Could you please look into the issue and guide us in making the application work.

     


Alle Antworten

  • Freitag, 24. Juni 2011 18:50
    Moderator
     
     
    It seems you have the Azure <--> on-premises connectivity up. Is the error persistent? did you try with a large timeout value?
    Jason Chen, Windows Azure PM
  • Dienstag, 28. Juni 2011 11:53
     
     

    I increased the timeout but still I am getting the same error. Also I observer that even I increased the time out it is throwing the error even before the timeout time.

    Please reply me if you have any idea to solve this.

     

     

  • Mittwoch, 29. Juni 2011 08:16
    Moderator
     
     

    Hi Kiran,

    I suggest you firstly ensure the database server is ready for remote access. Please install a SQL Server Management Studio in another machine inside your intranet and see if it can connect to your database.

    Also please refer to Exercise 1: Connecting an Azure Web Role to an External SQL Server Database with Windows Azure Connect to configrure you database server for remote access.

    Thanks.


    Wengchao Zeng
    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
  • Mittwoch, 29. Juni 2011 15:15
     
     

    This doesn't seem to be an issue relalted to connectivity with Azure Connect to me.

     

    Can you post the code around the lines mentioned in the below errors:

     

     

    CIS.MSite.Business.Managers.Manager.GetRoleForEmpID(EditorialNook objEditorialNook) in D:\Divya\Project\AMF\Code\Gloria\Practice\MultipleInstance\WorkingApps\MultiInstances\MigratedGloria\CIS.MSite.Business.Managers\Manager.cs:403

       WebRole1.Global.Session_Start(Object sender, EventArgs e) in D:\Divya\Project\AMF\Code\Gloria\Practice\MultipleInstance\WorkingApps\MultiInstances\MigratedGloria\WebRole1\Global.asax.cs:94

     

     

    If you are using SQLCommand in your code, can you try increasing it's timeout?

     

    You might want to go through this post as well -> http://blogs.msdn.com/b/spike/archive/2008/07/31/timeout-expired-the-timeout-period-elapsed-prior-to-completion-of-the-operation-or-the-server-is-not-responding.aspx

     


    If this post answers your question, please mark it as an answer. If this post is helpful to you, then vote it as helpful.
    TechyFreak | Mobile Development Resources
  • Donnerstag, 30. Juni 2011 12:02
     
      Enthält Code

    We even can't get into the SQL Azure Management overview:

    sql.azure.com:

     

    Server Error in '/' Application.

    Runtime Error

    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine. 

    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

     

    <!-- Web.Config Configuration File -->
    
    <configuration>
     <system.web>
      <customErrors mode="Off"/>
     </system.web>
    </configuration>


    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

    <!-- Web.Config Configuration File -->
    
    <configuration>
     <system.web>
      <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
     </system.web>
    </configuration>

     

    Additionally our applications experience performance issues of SQL Azure.

     


    EDIT: Only in Germany. Works fine if I connect trough UK!
  • Donnerstag, 30. Juni 2011 13:10
     
     
    Patrick, i will suggest to raise a support request
    If this post answers your question, please mark it as an answer. If this post is helpful to you, then vote it as helpful.
    TechyFreak | Mobile Development Resources
  • Donnerstag, 10. Mai 2012 13:34
     
     

    Make sure that you have a firewall rule for SQL Port, for the IPv6 Connect Address.  It should be port 1433, but if your SQL server is set for dynamic ports it could be something else.   http://support.microsoft.com/kb/287932

    Try RDPing into your Azure node and then telneting into your on-premise SQL box on the SQL port. This will tell you if something is blocking the port itself.