Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Peck 687 posts 1863 karma points c-trib
    Apr 22, 2021 @ 15:42
    David Peck
    0

    uSync Console boot issue

    To give some context: I'm trying to find a way to get uSync to import when I deploy the website, but not on every subsequent boot.

    My plan had been to use the uSync Console to do an import, and I can trigger that from a script as part of my CD.

    I've become stuck because the console (which I added to the main Web App project), when run, claims the site has 'BootFailed'. However the site is running, and the same execution request works locally. enter image description here

    I can see the error log showing the boot attempt within the application. enter image description here

    If I set this to Verbose then the last message is simply: "[Composers] Composing uSync8.BackOffice.uSyncBackOfficeConfigComposer."

    I can't think how to debug this further. Can you think under what circumstance this might occur, or how I might debug this?

    Equally if you have any better ideas on how to meet my requirement then I'm all ears.

    I'm grateful for any assistance. Thanks in advance.

  • Kevin Jump 2312 posts 14698 karma points MVP 7x c-trib
    Apr 22, 2021 @ 16:30
    Kevin Jump
    1

    Hi David,

    I think there are two main reasons why the boot can fail.

    1) the nucache.db can be locked 2) there can be something that is trying to use a HttpContext in the startup and isn't checking it.

    I "think" we need to look at number 2 a bit more and the azure file system can trigger this issue, but in both cases you would expect something in the logs.

    another way to get uSync to deploy once and not again is to use the uSync.once file. If the uSync/v8 folder contains a file called uSync.once, then on the first boot, uSync will import, and rename the file uSync.Stop on every subsequent boot it won't do the install.

    so if your deployment puts a uSync.once file in the folder as part of the deployment the import will run the first time and not again.

    but - we should look at the console app a bit more to see if we can get it to at least show an error here.

  • David Peck 687 posts 1863 karma points c-trib
    Apr 23, 2021 @ 10:51
    David Peck
    0

    Your usync.once solution sounds perfect. Thanks.

    However, if you'd like to continue to explore the Console issue then I'm happy to facilitate. I put null checks around every usage that I could find of HttpContext, without success.

    Possibly though that did make a difference as this time I manage to get an error message out.

    Umbraco.Core.Exceptions.BootFailedException: Boot failed. ---> System.UnauthorizedAccessException: Access to the path 'C:\Sites\***\wwwroot\App_Data\TEMP\NuCache\NuCache.Content.db' is denied.
    

    I don't think it can be file permissions because I granted write access to the Everyone role on the App_Data folder, and ran from cmd run as Administrator.

    "the nucache.db can be locked" sounds more probable now right?

Please Sign in or register to post replies

Write your reply to:

Draft