Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

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

Closed
securityvoid opened this issue Mar 17, 2017 · 12 comments

Comments

@securityvoid
Copy link

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."

@davidebbo
Copy link
Member

After getting the error, try checking the D:\home\LogFiles\kudu folder for more detailed error info.

@securityvoid
Copy link
Author

@davidebbo I looked there and the folder was empty. That was one of the first places I looked since kudu handles the deploy.

@securityvoid
Copy link
Author

Let me further clarify, I had two folders under D:\home\LogFiles\kudu.

  1. deployment
  2. traces

deployment was empty. traces had some files, but poking through none seemed to have anything about the git commands.

@davidebbo
Copy link
Member

Yes, traces is what I meant. You should see a file that matches the time of your deployment and that contains git related things.

@securityvoid
Copy link
Author

Okay, I'll test it again and see.

@gituser227
Copy link

I'm experiencing the same problem. There's nothing in \deployment or \traces that explains what the mysterious unknown error is. Is there another way to find out what the unknown error relates to?

@davidebbo
Copy link
Member

@gituser227 with app name and UTC time of one such error, we may be able to learn more.

@sanjaygovindan
Copy link

sanjaygovindan commented Jul 7, 2019

@davidebbo - Getting the same error, with Kudu logs not revealing much about the issue. The Background_POST_deploy_pending file is empty. Not too sure why nothing is being logged here.

Was there any solution you could suggest from the above?

-- Update

Assuming it had something to do with the free azure app service instance I had. Upgraded, and it ran smoothly, logs and all.

@davidebbo
Copy link
Member

@sanjaygovindan note that I'm no longer on the team, so others can better help.

But indeed, with free plan, there is a very limited CPU quota. If you exceed it, the process can get killed and leave things in a strange state.

@AJ1058310
Copy link

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.

@sanjaygovindan
Copy link

sanjaygovindan commented Aug 18, 2022 via email

@jvano
Copy link
Member

jvano commented Apr 29, 2024

Hi

If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

This way we can better track and assist you on this case

Thanks,

Joaquin Vano
Azure App Service

@jvano jvano closed this as completed Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants