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.
I can see the error log showing the boot attempt within the application.
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.
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.
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?
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.
I can see the error log showing the boot attempt within the application.
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.
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 theuSync/v8
folder contains a file called uSync.once, then on the first boot, uSync will import, and rename the fileuSync.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.
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.
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?
is working on a reply...