question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Version Control Errors Not Logged - "An unknown error has occurred. Check the diagnostic log for details"

See original GitHub issue

If git errors out while trying to deploy a site that is setup for continuous deployment you get a very vague message in the deployment log which states: "An unknown error has occurred. Check the diagnostic log for details."

But there does not seem to be any other indication of what is wrong.

Repro steps.

I’ve run into this in a number of different ways, but the following is one of the ways it can happen (and the only one I know how to easily reproduce):

  1. Setup a project that has another project as a git submodule.
  2. Add an additional commit or to the submodule, but do not pull the newer versions of the project into the main project yet.
  3. Within SCM navigate to your repository folder: D:\site\reposository
  4. Run the following command from SCM: git submodule update --remote

This will manually update the sub-project to the latest version, and put it “ahead” of what should really be in the main project based on source control.

  1. Make a change to the main project and return those changes. This should trigger a deploy.

NOTE: The project will error out without any indication of what went wrong besides the “An unknown error occurred”.

This appears to happen because git will spit an error when trying to update the submodule (Since the submodule is already to a version later than what it should be).

This kind of makes sense that it should stop the deploy, but it seems it should also at least log something so that someone can manually fix it.

Project structures.

You should be able to reproduce this with the Dev Branch: https://github.com/securityvoid/azure-bug/tree/dev

The log/error given by the failure.

"An unknown error has occurred. Check the diagnostic log for details."

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
sanjaygovindancommented, Aug 18, 2022

Hey Ji,

Long time ago for me now, so give me a day to boot my memory and I’ll see if I can remember what I did.

Looking at your log files however, looks like the issue is with the purge step??

Cheers, Sanjay

On Fri, 19 Aug 2022, 02:04 Fangrou JI, @.***> wrote:

Hi here, Any news about this topic? I got the same issue. My Azure Function runs on a standard App Service Plan, I checked CPU & Memory Percentages during the deployment but all metrics was OK. So I don’t think it’s related to limited CPU quota.

I connected to instance with ssh and checked the log file under ~/LogFiles/kudu/deployment, there are 2 log files:

  • the first one ended with Running pip install… without any error
  • the 2nd one created 12mins after the 1st log file and just show me: An unknown error has occurred. Check the diagnostic log for details. But I don’t know where could I found “diagnostic log”.

[image: Screenshot 2022-08-18 at 17 36 45] https://user-images.githubusercontent.com/102027206/185436293-7631add1-3423-47e3-8ae4-6e38f6e47cb5.png

I also checked the log files under ~/LogFiles/kudu/trace, I see 6 xml files created during the deployment time:

-rwxrwxrwx 1 nobody nogroup 7814 Aug 18 14:11 2022-08-18T08-44-22_8ac792_014_POST_api-zipdeploy_pending.xml -rwxrwxrwx 1 nobody nogroup 4081 Aug 18 14:11 2022-08-18T14-11-39_8ac792_015_POST_api-zipdeploy_pending.xml -rwxrwxrwx 1 nobody nogroup 482 Aug 18 14:23 2022-08-18T14-23-32_8ac792_001_Startup_GET_api-deployments_0s.xml -rwxrwxrwx 1 nobody nogroup 3990 Aug 18 14:23 2022-08-18T14-23-33_8ac792_002_GET_api-deployments_pending.xml -rwxrwxrwx 1 nobody nogroup 3425 Aug 18 14:23 2022-08-18T14-23-52_8ac792_003_GET_api-deployments-07ada6ad-6c7c-439a-b416-ad417343c375-log_200_0s.xml -rwxrwxrwx 1 nobody nogroup 3625 Aug 18 14:23 2022-08-18T14-23-57_8ac792_004_GET_api-deployments-07ada6ad-6c7c-439a-b416-ad417343c375-log-d1e2963f-32bf-4c80-9454-9979e1673459_200_0s.xml

I searched the keywords i.e. error, failed inside those xml files, the only match was found in 2022-08-18T14-23-33_8ac792_002_GET_api-deployments_pending.xml:

@.***:~/LogFiles/kudu/trace# cat 2022-08-18T14-23-33_8ac792_002_GET_api-deployments_pending.xml <step title="Incoming Request" date="2022-08-18T14:23:33.375" instance="8ac792" url="/api/deployments/?api-version=2018-11-01" method="GET" type="request" pid="65,1,25" Accept-Encoding="gzip, deflate" Accept-Language="fr-FR" Authorization="PoP..." Host="azfndboogeo01.scm.azurewebsites.net" Referer="https://management.azure.com/subscriptions/36e03817-4441-4df6-a09a-c44092b602d2/resourceGroups/azrgd-boogeo-01/providers/Microsoft.Web/sites/azfndboogeo01/deployments?api-version=2018-11-01" traceparent="00-e7fc47902b1ec6408f3ffa57972599e9-03229462c73e7c4a-01" x-ms-command-name="fetchDeployments" x-ms-client-session-id="947814c453484407806768af04d09e92" x-ms-client-request-id="2dca8c08-6d34-4cc1-aa1c-474eab88a41e" x-ms-client-location="francecentral" x-ms-arm-service-request-id="232311f7-a03a-416a-9da7-d80ed491df73" x-ms-activity-vector="IN.01.IN.03" x-ms-arm-request-tracking-id="dcb5486b-b1e5-47e5-8fba-c2074420e4a7" x-ms-correlation-request-id="b153dc62-662b-404e-9abe-dc93c17d8cb6" x-ms-routing-request-id="FRANCECENTRAL:20220818T142332Z:dcb5486b-b1e5-47e5-8fba-c2074420e4a7" x-ms-home-tenant-id="329e91b0-e21f-48fb-a071-456717ecc28e" x-ms-client-ip-address="165.225.20.252" x-ms-management-group-ancestors="iasp-lz-internet, iasp-landing-zones, iasp, 329e91b0-e21f-48fb-a071-456717ecc28e" x-ms-client-audience="https://management.core.windows.net/" x-ms-client-scope="user_impersonation" x-ms-client-acr="1" x-ms-client-app-id="c44b4083-3bb0-49c1-b47d-974e53cbdf3c" x-ms-client-app-id-acr="2" x-ms-client-tenant-id="329e91b0-e21f-48fb-a071-456717ecc28e" x-ms-client-issuer="https://sts.windows.net/329e91b0-e21f-48fb-a071-456717ecc28e/" x-ms-client-object-id="d4f98db7-f101-44cb-8155-d3c981bf678d" x-ms-client-puid="10032001A50F55D0" x-ms-client-alt-sec-id="" x-ms-client-principal-id="10032001A50F55D0" x-ms-client-authorization-source="RoleBased" x-ms-client-identity-provider="" x-ms-client-authentication-methods="pwd, mfa" x-ms-client-principal-group-membership-source="Token" x-ms-client-family-name-encoded="Skk=" x-ms-client-given-name-encoded="RmFuZ3JvdQ==" x-ms-arm-network-source="PublicNetwork" x-ms-via-extensions-route="true" x-ms-geo-location="North Europe" x-ms-version="20140301" x-ms-request-id="cfc21492-ecb3-4cfe-94ef-8e1f3baa11d3" CLIENT-IP="13.69.227.128:12356" X-ARR-LOG-ID="cfc21492-ecb3-4cfe-94ef-8e1f3baa11d3" X-Client-IP="13.69.227.128" X-SITE-DEPLOYMENT-ID="azfndboogeo01" WAS-DEFAULT-HOSTNAME="azfndboogeo01.scm.azurewebsites.net" X-Forwarded-Proto="https" X-AppService-Proto="https" X-Forwarded-TlsVersion="1.2" X-WAWS-Unencoded-URL="/api/deployments/?api-version=2018-11-01" X-Client-Port="12356" > <step title="DeploymentService.GetCurrentEtag" date="2022-08-18T14:23:34.089" > <step title="Current Etag: "8da812394e1c1d0", Cached Etag: " date="2022-08-18T14:23:34.976" /> </step> <step title="DeploymentService.GetDeployResults" date="2022-08-18T14:23:34.984" > <step title="DeploymentManager.GetResults" date="2022-08-18T14:23:34.986" > <step title="Deployment Lock Failure" date="2022-08-18T14:23:35.098" > <step title="Deployment Lock Failure" date="2022-08-18T14:23:35.938" > <step title="Purge deployment items" date="2022-08-18T14:23:36.760" > <step title="Remove temp-ec8d, Failed, received at 08/18/2022 14:11:39" date="2022-08-18T14:23:36.804" /> </step> <step title="Purge deployment items" date="2022-08-18T14:23:36.842" > <step title="Remove temp-ec8d, Failed, received at 08/18/2022 14:11:39" date="2022-08-18T14:23:36.877" /> </step> </step> </step> <step title="Outgoing response" date="2022-08-18T14:23:37.386" type="response" statusCode="200" statusText="OK" /> </step>

But it’s not clear what was the cause and how to fix this issue.

— Reply to this email directly, view it on GitHub https://github.com/projectkudu/kudu/issues/2366#issuecomment-1219671741, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEW3KQO7U2T7YVILJJNCKXDVZZNHJANCNFSM4DECUYLA . You are receiving this because you were mentioned.Message ID: @.***>

0reactions
AJ1058310commented, Aug 18, 2022

Hi here, Any news about this topic? I got the same issue. My Azure Function runs on a standard App Service Plan, I checked CPU & Memory Percentages during the deployment but all metrics was OK. So I don’t think it’s related to limited CPU quota.

I connected to instance with ssh and checked the log file under ~/LogFiles/kudu/deployment, there are 2 log files:

  • the first one ended with Running pip install... without any error
  • the 2nd one created 12mins after the 1st log file and just show me: An unknown error has occurred. Check the diagnostic log for details. But I don’t know where could I found “diagnostic log”. Screenshot 2022-08-18 at 17 36 45

I also checked the log files under ~/LogFiles/kudu/trace, I see 6 xml files created during the deployment time:

-rwxrwxrwx 1 nobody nogroup   7814 Aug 18 14:11 2022-08-18T08-44-22_8ac792_014_POST_api-zipdeploy_pending.xml
-rwxrwxrwx 1 nobody nogroup   4081 Aug 18 14:11 2022-08-18T14-11-39_8ac792_015_POST_api-zipdeploy_pending.xml
-rwxrwxrwx 1 nobody nogroup    482 Aug 18 14:23 2022-08-18T14-23-32_8ac792_001_Startup_GET_api-deployments_0s.xml
-rwxrwxrwx 1 nobody nogroup   3990 Aug 18 14:23 2022-08-18T14-23-33_8ac792_002_GET_api-deployments_pending.xml
-rwxrwxrwx 1 nobody nogroup   3425 Aug 18 14:23 2022-08-18T14-23-52_8ac792_003_GET_api-deployments-07ada6ad-6c7c-439a-b416-ad417343c375-log_200_0s.xml
-rwxrwxrwx 1 nobody nogroup   3625 Aug 18 14:23 2022-08-18T14-23-57_8ac792_004_GET_api-deployments-07ada6ad-6c7c-439a-b416-ad417343c375-log-d1e2963f-32bf-4c80-9454-9979e1673459_200_0s.xml

I searched the keywords i.e. error, failed inside those xml files, the only match was found in 2022-08-18T14-23-33_8ac792_002_GET_api-deployments_pending.xml:

root@b6bedbb9e72c:~/LogFiles/kudu/trace# cat 2022-08-18T14-23-33_8ac792_002_GET_api-deployments_pending.xml
<step title="Incoming Request" date="2022-08-18T14:23:33.375" instance="8ac792" url="/api/deployments/?api-version=2018-11-01" method="GET" type="request" pid="65,1,25" Accept-Encoding="gzip, deflate" Accept-Language="fr-FR" Authorization="PoP..." Host="azfndboogeo01.scm.azurewebsites.net" Referer="https://management.azure.com/subscriptions/36e03817-4441-4df6-a09a-c44092b602d2/resourceGroups/azrgd-boogeo-01/providers/Microsoft.Web/sites/azfndboogeo01/deployments?api-version=2018-11-01" traceparent="00-e7fc47902b1ec6408f3ffa57972599e9-03229462c73e7c4a-01" x-ms-command-name="fetchDeployments" x-ms-client-session-id="947814c453484407806768af04d09e92" x-ms-client-request-id="2dca8c08-6d34-4cc1-aa1c-474eab88a41e" x-ms-client-location="francecentral" x-ms-arm-service-request-id="232311f7-a03a-416a-9da7-d80ed491df73" x-ms-activity-vector="IN.01.IN.03" x-ms-arm-request-tracking-id="dcb5486b-b1e5-47e5-8fba-c2074420e4a7" x-ms-correlation-request-id="b153dc62-662b-404e-9abe-dc93c17d8cb6" x-ms-routing-request-id="FRANCECENTRAL:20220818T142332Z:dcb5486b-b1e5-47e5-8fba-c2074420e4a7" x-ms-home-tenant-id="329e91b0-e21f-48fb-a071-456717ecc28e" x-ms-client-ip-address="165.225.20.252" x-ms-management-group-ancestors="iasp-lz-internet, iasp-landing-zones, iasp, 329e91b0-e21f-48fb-a071-456717ecc28e" x-ms-client-audience="https://management.core.windows.net/" x-ms-client-scope="user_impersonation" x-ms-client-acr="1" x-ms-client-app-id="c44b4083-3bb0-49c1-b47d-974e53cbdf3c" x-ms-client-app-id-acr="2" x-ms-client-tenant-id="329e91b0-e21f-48fb-a071-456717ecc28e" x-ms-client-issuer="https://sts.windows.net/329e91b0-e21f-48fb-a071-456717ecc28e/" x-ms-client-object-id="d4f98db7-f101-44cb-8155-d3c981bf678d" x-ms-client-puid="10032001A50F55D0" x-ms-client-alt-sec-id="" x-ms-client-principal-id="10032001A50F55D0" x-ms-client-authorization-source="RoleBased" x-ms-client-identity-provider="" x-ms-client-authentication-methods="pwd, mfa" x-ms-client-principal-group-membership-source="Token" x-ms-client-family-name-encoded="Skk=" x-ms-client-given-name-encoded="RmFuZ3JvdQ==" x-ms-arm-network-source="PublicNetwork" x-ms-via-extensions-route="true" x-ms-geo-location="North Europe" x-ms-version="20140301" x-ms-request-id="cfc21492-ecb3-4cfe-94ef-8e1f3baa11d3" CLIENT-IP="13.69.227.128:12356" X-ARR-LOG-ID="cfc21492-ecb3-4cfe-94ef-8e1f3baa11d3" X-Client-IP="13.69.227.128" X-SITE-DEPLOYMENT-ID="azfndboogeo01" WAS-DEFAULT-HOSTNAME="azfndboogeo01.scm.azurewebsites.net" X-Forwarded-Proto="https" X-AppService-Proto="https" X-Forwarded-TlsVersion="1.2" X-WAWS-Unencoded-URL="/api/deployments/?api-version=2018-11-01" X-Client-Port="12356" >
  <step title="DeploymentService.GetCurrentEtag" date="2022-08-18T14:23:34.089" >
    <step title="Current Etag: &quot;8da812394e1c1d0&quot;, Cached Etag: " date="2022-08-18T14:23:34.976" /><!-- duration: 3ms -->
  </step><!-- duration: 893ms -->
  <step title="DeploymentService.GetDeployResults" date="2022-08-18T14:23:34.984" >
    <step title="DeploymentManager.GetResults" date="2022-08-18T14:23:34.986" >
      <step title="Deployment Lock Failure" date="2022-08-18T14:23:35.098" >
        <step title="Deployment Lock Failure" date="2022-08-18T14:23:35.938" >
          <step title="Purge deployment items" date="2022-08-18T14:23:36.760" >
            <step title="Remove temp-ec8d, Failed, received at 08/18/2022 14:11:39" date="2022-08-18T14:23:36.804" /><!-- duration: 3ms -->
          </step><!-- duration: 50ms -->
          <step title="Purge deployment items" date="2022-08-18T14:23:36.842" >
            <step title="Remove temp-ec8d, Failed, received at 08/18/2022 14:11:39" date="2022-08-18T14:23:36.877" /><!-- duration: 5ms -->
          </step><!-- duration: 44ms -->
        </step><!-- duration: 1395ms -->
      </step><!-- duration: 2239ms -->
      <step title="Outgoing response" date="2022-08-18T14:23:37.386" type="response" statusCode="200" statusText="OK" /><!-- duration: 5ms -->
    </step><!-- duration: 2408ms -->

But it’s not clear what was the cause and how to fix this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An unknown error has occurred. Check the diagnostic log ...
New to Azure : I am using azure free service to host react website using vs code extension Azure App Service . While...
Read more >
Azure Devops: Pipeline fails to deploy to Linux Web App
An unknown error has occurred. Check the diagnostic log for details. Failed to deploy web package to App Service. ##[error]Failed to deploy ...
Read more >
Release pipeline 'Deploy Azure App Service' fails
I try to setup an Azure Deployment Release Pipeline for a simple NodeJS WebApp. The Build already works fine.
Read more >
Understanding Diagnostic Log Files and Log Configuration ...
Diagnostic log files and log configuration files provide a means for troubleshooting and ... A serious problem caused by unknown reasons has occurred....
Read more >
Troubleshooting migration tasks in AWS Database Migration ...
Troubleshoot issues when migrating data using AWS Database Migration Service (AWS DMS).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found