Azure Data Factory Error- when trying to connect to Azure SQL Database. How to resolve? Why happened?

Fatemeh Ghorbani Sini 0 Reputation points
2024-05-04T18:37:19.4233333+00:00

Spark job failed: { "text/plain": "{"runId":"f05fc3c9-ca09-4071-b2f6-cb429d56caa2","sessionId":"00a2a303-b09b-44c2-9003-6fb18cc409df","status":"Failed","payload":{"statusCode":400,"shortMessage":"DF-SYS-0 Failure(java.lang.Exception: failed to obtain token from https://dmeusaksig3aks.svc.datafactory.azure.com/subscriptions/f95a5af8-705d-46d9-a790-b32696f34062/authservice/ams/api/v2/acquiretoken with exception:java.io.IOException: Retry Request, fail to reach https://dmeusaksig3aks.svc.datafactory.azure.com/subscriptions/f95a5af8-705d-46d9-a790-b32696f34062/authservice/ams/api/v2/acquiretoken with with code: 500, exception:, CorrelationId:00a2a303-b09b-44c2-9003-6fb18cc409df, RunId:f05fc3c9-ca09-4071-b2f6-cb429d56caa2) (of class scala.util.Failure)","detailedMessage":"Failure 2024-05-04 18:31:02.736 failed DebugManager.processJob, run=f05fc3c9-ca09-4071-b2f6-cb429d56caa2, errorMessage=DF-SYS-0 Failure(java.lang.Exception: failed to obtain token from https://dmeusaksig3aks.svc.datafactory.azure.com/subscriptions/f95a5af8-705d-46d9-a790-b32696f34062/authservice/ams/api/v2/acquiretoken with exception:java.io.IOException: Retry Request, fail to reach https://dmeusaksig3aks.svc.datafactory.azure.com/subscriptions/f95a5af8-705d-46d9-a790-b32696f34062/authservice/ams/api/v2/acquiretoken with with code: 500, exception:, CorrelationId:00a2a303-b09b-44c2-9003-6fb18cc409df, RunId:f05fc3c9-ca09-4071-b2f6-cb429d56caa2) (of class scala.util.Failure)"}}\n" } - RunId: f05fc3c9-ca09-4071-b2f6-cb429d56caa2

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

2 answers

Sort by: Most helpful
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2024-05-07T09:40:55.01+00:00

    @Fatemeh Ghorbani Sini ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your query here.

    The error message you received indicates that the token acquisition failed while trying to connect to the Azure SQL Database using Azure Data Factory. It means there was an internal server error. This error can occur due to various reasons, such as network connectivity issues, incorrect credentials, or an issue with the Azure service itself.

    Kindly try the following steps to troubleshoot the issue:

    1. Check the network connectivity between Azure Data Factory and the Azure SQL Database. Ensure that the firewall rules are configured correctly to allow traffic from Azure Data Factory to the Azure SQL Database.
    2. Verify that the credentials used to connect to the Azure SQL Database are correct. Ensure that the username and password are correct and that the user has the necessary permissions to access the database.
    3. Check the Azure service health status to ensure that there are no known issues with the Azure service.

    In case it doesn't help, kindly provide more details with screenshot or code snippet. Thankyou.

    Hope it helps. Kindly accept the answer by clicking on Accept answer button. Thankyou.

    1 person found this answer helpful.
    0 comments No comments

  2. Vinodh247 34,661 Reputation points MVP Volunteer Moderator
    2024-05-05T06:13:44.2966667+00:00

    Hi Fatemeh Ghorbani Sini,

    Thanks for reaching out to Microsoft Q&A.

    See the below two resolved answers., this might help you fix your issue.

    https://learn.microsoft.com/en-us/answers/questions/1089381/calling-azure-batch-service-via-azure-data-factory

    https://learn.microsoft.com/en-us/answers/questions/555862/not-able-to-access-azure-key-vault-from-adf

    Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.