To sum up the system, i'm running a umbraco staging environment on three IIS servers, using a SQL Server as DB backend. Next to this, i have three IIS running the production site, using another SQL Server cluster as database backend. I'm using Courier to publish from staging to production. MVC is set as the default RenderingEngine. We access the staging server on 1 server only, to acknowledge best practice according to the LB guide.
distributedCall is enabled in both Umbraco installations, and both are configured with the servers computernames. as such:
iis-web-01 iis-web-02 iis-web-03
I've created a unique temp folder for each App_Data/TEMP and set the location as a VDIR in IIS for each server.
Files are replicated using DFS-R where the sync-folder the our wwwroot/ (root for all IIS sites) containing the umbraco website root folder.
Problem: When i create new content, and want to publish it. I get this error in the /umbraco/ website Oops: this document is published but is not in the cache (internal error)
The umbraco log only shows one warning in the logfile.
2013-03-15 14:40:56,587 [5] WARN Umbraco.Web.Routing.NiceUrlProvider - [Thread 16] Couldn't find any page with nodeId=1086. This is most likely caused by the page not being published.
I might have solved this. Initially i didn't use fully qualified names in the serverlist for the distributed cache feature. This has now been changed... i'll do some more testing and get back to you on the final results.
Umbraco Configuration
Configuring Umbraco to support load balanced clusters is probalby the easiest part. In the /config/umbracoSettings.config file you need to updated the distributed call section to the following (as an example)
As you can see in the above XML the distributed server names are the custom DNS names created for each IIS host name for each server. Don't forget to enable the distributedCall.
In addition to enabling the distributed calls above, there are some additional items that should be modified as well. Each server will need a unique copy of the /App_Data/TEMP directory for Examine and Client Dependency Cache to work correctly. Further, the umbraco.config xml cache file should also be unique to limit any issues with file locks.
I have a hosting account -- public cloud hosted website, so I shouldn't think the umbraco config above should concern me. It's happening fairly often. Can anyone point me towards anything? I'm using version 6.0.3, with Ublogsy installed.
This is still happening when my user is posting a new blog post in ublogsy. There's a static machine key now, I've upped the apppool memory limits, etc. BTW, I was wrong about the version, it's 6.0.2.
Another data point - we are also seeing this error message and using a distributed setup. The Backoffice and main site have been configured as separate sites in IIS. This was a security decision. The main site doesn't have any admin/editing functionality and the Backoffice site is only accessible on the internal network.
We will need to investigate but my guess is that the message is correct and the Backoffice site cache is not getting updated when documents are published.
After going back and reviewing our configuration we only had the main site listed in the DistributedCall section of the UmbracoSettings.config. Once we added the Backoffice site to the list of servers and republished the site ( right click on Content node and select Republish Entire Site from menu) the links on the Properties tab were displayed correctly. The 'oops....' error message was gone.
One thing to note is that the links were to the Backoffice instance of the site and this is not the site that regular visitors will see. Setting the Hostname to the hostname of the main site changed the links on the Properties tab to point to the main site.
Yet when the date/time to publish roles by, the content doesn't not publish, and the oops... error appears in the link location. Also, normal publishing doesn't cause any issue across the LB environment. That functionality appears to work fine.
My understanding of the 'oops... error' is that the document has been published ( in the database ) but the local cache has not been updated. This would fit with your symptoms - the page doesn't show up on any of the servers and you see the error message.
What happens if you Republish the site content? ( right click on Content node and select Republish entire site )
You could check the source code for the scheduled publish function and compare it against the code for the Publish button. Check if they are doing the same thing. you want to see if the Scheduled Publish is calling the webservice that updates all the other services.
Yes, we're able to get the published, non-cached pages to "publish" after manually forcing a publish. However, this sort of defeats the purpose of "future publishing" in a load balanced environment.
Yes, my next step is try to work through the U source code to figure out why the distributedCall and/or clearDocumentCache aren't being fired by the future publish functionality.
Has there been any definitive answer on this? I get this from time to time and in fact now am looking at a broken site that has this glitch. Seems to have only happened to me on v6 sites, I never saw this particular error before on v4. (Which I've built probably 20 or 30+ sites in, as opposed to only about three v6 sites which have all exhibited this problem at one time or another, usually at strange times.) We are not using any "publish at/remove at" functionality---simply saving and publishing nodes normally.
Oops: this document is published but is not in the cache (internal error).
It is disconcerting to me to have a production site just suddenly stop working due to this problem. The whole site turned into a YSOD because a node required for rendering the footer suddenly "disappeared". The node is published and in fact no one has even edited this node recently. I wish there were some more diagnostics I could look at but am really confused here. (And unhappy that clients have to be the ones to call me and tell me their site stopped working.)
P.S. I should have added more details about my setup & environment. I re-read this thread again more carefully and actually seem to be quite alone in that I'm not dealing with distributed environments, nor multiple hostnames, nor any scheduled publishing. The site is actually quite simple with nothing advanced to speak of.
The site is version 6.1.3, sits on a single IIS 7 machine, with SQL Server 2008 R2 database.
Well Funka!, you're not alone in this.. I also have a "normal" website (Umbraco v6.1.4 (Assembly version: 1.0.4982.22139)) running on a normal hoster (not Azure websites), and I also got the YSOD mentioning there was not a page published with the selected id.
I have however noticed that some folders don't have writing permission on the file system. I'll look in to this, but I don't think it is related: once the page is republished, the site works fine again (regardless of permissions).
Wow this is really frustrating. Fortunately the last two clients this has happened to have been really cool about their site not working and needing to telephone me to ask why their site is suddenly broken. I've created http://issues.umbraco.org/issue/U4-3145 to hopefully gain more visibility into this problem.
I have just done a clean install Umbraco v6.1.4 and now get this error. I only have two "pages" One is Home and the other is Forum (nForum). All pages have been repeatedy published but only the Home page shows. The umbraco.config only shows the one Home node. A snip from the log.txt is below:
2013-10-22 15:32:06,453 [19] INFO Umbraco.Core.Publishing.PublishingStrategy - [Thread 20] Content 'Forum' with Id '1086' has been published. 2013-10-22 15:32:08,078 [19] WARN Umbraco.Web.Routing.DefaultUrlProvider - [Thread 20] Couldn't find any page with nodeId=1086. This is most likely caused by the page not being published.
Publishing the whole site clears this problem. Its like the page not being published is not aware that the parent page is published (I have a parent node which holds all the site pages).
I now have a nForum problem but that is something completely different
It was a long time ago but if I remeber rightly this was a permissions problem.
I built a batch file which sorted most of my issues with permissions. Thescript is below. as you can see it was some time ago.
::Version 1.0 Date 2012-11-01 Author W Charlton etyMonda @ECHO OFF if exist %SystemRoot%\System32\icacls.exe ( SET SetUser="NETWORK SERVICE" goto icaclsStart ) ELSE ( SET SetUser="ASPNET" ) Echo %SetUser% ::pause :caclsStart :: Clear the screen cls Echo Batch file courtesy of the yMonda team. www.ymonda.co.uk Echo Note: This is the cacls version Echo. Echo This batch file sets and unsets permissions for an Umbraco site. Echo. Echo 1. Set intial permissions on all folders Echo (except those needed to install packages) Echo. Echo 2. Allow access for installing packages Echo. Echo 3. Remove permissions not required Echo (For enhanced security) Echo. Echo 4. Get me out of here! Echo. :: ######################### :: Using cacls (no icacls) :: Win XP and Win 2000 :: For more info http://situsnya.wordpress.com/2008/08/31/caclsexe-display-or-modify-access-control-lists-acls-for-files-and-folders/ :: and http://thedance.net/~win95/cacls.html :: ######################### set /p userinp1=Choose a number(1-4): set userinp=%userinp1:~0,1% if "%userinp1%"=="1" goto 1 if "%userinp1%"=="2" goto 2 if "%userinp1%"=="3" goto 3 if "%userinp1%"=="4" goto end Echo Invalid choice! Echo Hit any key to try again pause>nul goto caclsStart :1 Echo. Echo Set Temp rights for installation as %SetUser% Echo. cacls "%CD%\web.config" /E /G "%SetUser%:C cacls "%CD%\config" /E /G "%SetUser%:C Echo. Echo Set permanent rights for %SetUser% Echo. cacls "%CD%\app_code" /E /G %SetUser%:C cacls "%CD%\app_data" /E /G "%SetUser%:C cacls "%CD%\app_data\umbraco.config" /E /G "%SetUser%:C cacls "%CD%\css" /E /G "%SetUser%:C cacls "%CD%\masterpages" /E /G "%SetUser%:C cacls "%CD%\macroScripts" /E /G %SetUser%:C cacls "%CD%\media" /E /G "%SetUser%:C cacls "%CD%\scripts" /E /G "%SetUser%:C cacls "%CD%\xslt" /E /G "%SetUser%:C Echo. pause goto caclsStart :2 Echo. Echo Set access to allow installation of packages for %SetUser% Echo. cacls "%CD%\bin" /E /G "%SetUser%:C cacls "%CD%\umbraco" /E /G "%SetUser%:C cacls "%CD%\umbraco\config\create\UI.xml" /E /G "%SetUser%:C cacls "%CD%\umbraco_client" /E /G "%SetUser%:C cacls "%CD%\usercontrols" /E /G "%SetUser%:C :: The next two are needed for the uLess install cacls "%CD%\config\applications.config" /E /G "%SetUser%:C cacls "%CD%\config\trees.config" /E /G "%SetUser%:C Echo. pause goto caclsStart :3 Echo. Echo Removing permissions for %SetUser% Echo. cacls "%CD%\web.config" /E /P "%SetUser%:R cacls "%CD%\config" /E /P "%SetUser%:R cacls "%CD%\bin" /E /P "%SetUser%:R cacls "%CD%\umbraco" /E /P "%SetUser%:R cacls "%CD%\umbraco\config\create\UI.xml" /E /P "%SetUser%:R cacls "%CD%\umbraco_client" /E /P "%SetUser%:R cacls "%CD%\usercontrols" /E /P "%SetUser%:R Echo. Echo Things are more secure now! Echo. pause goto caclsStart :: ######################### :: icacls exists :: Vista, Win 2003, Win 7, Win 2008 :: For more info http://ss64.com/nt/icacls.html :: ######################### :icaclsStart :: Clear the screen cls Echo Batch file courtesy of the etyMonda team. www.etymonda.com Echo. Echo This batch file sets and unsets permissions for an Umbraco site. Echo Note: This is the icacls version Win 2003 + Echo. Echo 1. Set intial permissions on all folders Echo (except those needed to install packages) Echo. Echo 2. Allow access for installing packages Echo. Echo 3. Remove permissions not required Echo (For enhanced security) Echo. Echo 4. Get me out of here! Echo. set /p userinp1=Choose a number(1-4): set userinp=%userinp1:~0,1% if "%userinp1%"=="1" goto 4 if "%userinp1%"=="2" goto 5 if "%userinp1%"=="3" goto 6 if "%userinp1%"=="4" goto end Echo Invalid choice! Echo Hit any key to try again pause>nul goto icaclsStart :4 Echo. Echo Set Temp rights for installation for %SetUser% Echo. icacls web.config /grant %SetUser%:(OI)(CI)M icacls config /grant %SetUser%:(OI)(CI)M icacls app_data /grant %SetUser%:(OI)(CI)M Echo. Echo Set permanent rights for %SetUser% Echo. icacls app_code /grant %SetUser%:(OI)(CI)RX icacls css /grant %SetUser%:(OI)(CI)M icacls less /grant %SetUser%:(OI)(CI)M icacls masterpages /grant %SetUser%:(OI)(CI)M icacls macroScripts /grant %SetUser%:(OI)(CI)M icacls media /grant %SetUser%:(OI)(CI)M icacls scripts /grant %SetUser%:(OI)(CI)M icacls xslt /grant %SetUser%:(OI)(CI)M
Echo. pause goto icaclsStart :5 Echo. Echo Set access to allow installation of packages for %SetUser% Echo. icacls bin /grant %SetUser%:(OI)(CI)M icacls umbraco /grant %SetUser%:(OI)(CI)M icacls umbraco_client /grant %SetUser%:(OI)(CI)M icacls usercontrols /grant %SetUser%:(OI)(CI)M icacls web.config /grant %SetUser%:(OI)(CI)M Echo. pause goto icaclsStart :6 Echo. Echo Removing permissions for %SetUser% Echo. icacls app_data /substitute %SetUser%:(OI)(CI)RX icacls web.config /substitute %SetUser%:(OI)(CI)R icacls config /substitute %SetUser%:(OI)(CI)R icacls bin /substitute %SetUser%:(OI)(CI)R icacls umbraco /substitute %SetUser%:(OI)(CI)R icacls umbraco_client /substitute %SetUser%:(OI)(CI)R icacls usercontrols /substitute %SetUser%:(OI)(CI)R Echo. Echo Things are more secure now! Echo. pause goto icaclsStart :end
I also encounter this issue ~1 out 10 times in my 7.2.4 assembly: 1.0.5557.19139.
It happens when creating a new item with the following code.
var page = contentService.CreateContent(name, unitRoot, contentTypeAlias);
page.SetValue("connector", connectorId);
var status = contentService.SaveAndPublishWithStatus(page);
The log show the following:
2015-05-06 00:20:56,966 [9] INFO Umbraco.Core.Publishing.PublishingStrategy - [Thread 79] Content 'more more delete' with Id '0' has been published.
and in umbraco
Link to document : Oops: this document is published but is not in the cache (internal error)
If you are caching business logic data that changes based on a user's action in the back office and you are not using an ICacheRefresher than you will need to review your code and update it based on the below
https://our.umbraco.org/documentation/reference/cache/
Almost a year since the last post from Niels... is the case closed? If so, could someone please point me in the right direction? Thanks. (It is still an issue).
Michael, Do you have access to the logs and can set file/folder permissions?
As far as I remember it was a permissions issue. There is a batch file further up which might help. If you run this and try again then examine the logs, these should tell you what pages are failing due to no access.
You might also try setting all permissions to "everyone" but it's a bit drastic
Is there a way to correct this en-masse when it happens? I'm finding that publishing a parent and it's children doesn't work but publishing individually does so there is a difference in the way each of these processes work.
The solution that we found was introduced in 7.1.5, but didn't work correctly back then either, so we had to change some Umbraco src and recompile it to make it work.
It looks from the above configuration that there is a lack of information about master-slave relationships - also remember that this information is essential on all the slaves as well:
In the section "Correct config for scheduled publishing & tasks" it states that "serverName or appId" must be added to each server node.
The reason for this is that each umbraco instance has a timer running that says "if I am the master I need to check if there are nodes that are candidates to be published in a scheduled fashion". Now, if any of the slaves mistakenly is configured to think that it (lets call it SlaveA) is the master and its timer checks for nodes to publish BEFORE the real master, then SlaveA will try to do the scheduled publish and set a "published" timestamp in the database - BUT the node has never been actually published and therefore will not be in the cache of the master node that you are accessing umbraco from, hence the master node WILL say "Oops...".
Additional note I remember I had an issue with the appId in our setup, so please be sure to have unique appIds on ALL nodes as well if you choose to use appId.
I suspect that this has occurred due to a publish action on the slave node which did happen yesterday to resolve another issue with the cache on the slave. I understand if they were first published on the slave and not the master how this scenario might occur however that doesn't explain why publishing existing nodes on the slave would remove them from the cache on the master.
We are almost at the point of upgrading to 7.2.4 which I think has additional load balancing features so I'm hoping some of this sort of stuff will go away soon as it intermittently happens and takes an awfully long time to recover from it.
It looks like umbraco is only caching the publish event and not writing it to the db. When the site refreshes the cache recreate the umbraco.config file, it does not get the notification for the publish event as it was never written to the db.
Give the db user read, write permissions to the umbraco database, stop the app pool and website, delete umbraco.config. In App_Data/Temp delete inner files and NOT folders. Start the site then start the app pool. This resolved
issue.
Oops: this document is published but is not in the cache (internal error)
Hi,
I've been installing Umbraco in a high-avalability environment, and i'm facing some problems with caching.
I've used this guide as a reference: http://our.umbraco.org/wiki/install-and-setup/installing-umbraco-for-load-balanced-environments
To sum up the system, i'm running a umbraco staging environment on three IIS servers, using a SQL Server as DB backend. Next to this, i have three IIS running the production site, using another SQL Server cluster as database backend. I'm using Courier to publish from staging to production. MVC is set as the default RenderingEngine. We access the staging server on 1 server only, to acknowledge best practice according to the LB guide.
distributedCall is enabled in both Umbraco installations, and both are configured with the servers computernames. as such:
iis-web-01
iis-web-02
iis-web-03
I've created a unique temp folder for each App_Data/TEMP and set the location as a VDIR in IIS for each server.
Files are replicated using DFS-R where the sync-folder the our wwwroot/ (root for all IIS sites) containing the umbraco website root folder.
Problem: When i create new content, and want to publish it. I get this error in the /umbraco/ website
Oops: this document is published but is not in the cache (internal error)
Temporary Solution:
iisreset /stop
delete cache folder
iisreset /start
The umbraco log only shows one warning in the logfile.
2013-03-15 14:40:56,587 [5] WARN Umbraco.Web.Routing.NiceUrlProvider - [Thread 16] Couldn't find any page with nodeId=1086. This is most likely caused by the page not being published.
What am i doing wrong, and how do i debug further
Umbraco version is: 4.11.5
Courier: 2.7.3
Server: IIS 8.0, .net 4.5, Server 2012 Standard
SQL Server: 2008r2 Enterprise
I might have solved this. Initially i didn't use fully qualified names in the serverlist for the distributed cache feature.
This has now been changed... i'll do some more testing and get back to you on the final results.
Umbraco Configuration
Configuring Umbraco to support load balanced clusters is probalby the easiest part. In the /config/umbracoSettings.config file you need to updated the distributed call section to the following (as an example)
As you can see in the above XML the distributed server names are the custom DNS names created for each IIS host name for each server. Don't forget to enable the distributedCall.
In addition to enabling the distributed calls above, there are some additional items that should be modified as well. Each server will need a unique copy of the /App_Data/TEMP directory for Examine and Client Dependency Cache to work correctly. Further, the umbraco.config xml cache file should also be unique to limit any issues with file locks.
This person is also having a similar issue:
http://our.umbraco.org/projects/starter-kits/ublogsy/ublogsy-razor-blog/40202-Search-in-multiple-blogs
I have a hosting account -- public cloud hosted website, so I shouldn't think the umbraco config above should concern me. It's happening fairly often. Can anyone point me towards anything? I'm using version 6.0.3, with Ublogsy installed.
Thanks!
Steph
This is still happening when my user is posting a new blog post in ublogsy. There's a static machine key now, I've upped the apppool memory limits, etc. BTW, I was wrong about the version, it's 6.0.2.
Thanks!
Steph
Sorry about the late reply... I was on vacation.
This seems more and more like a distributed infrastructure issue.
Did you figure this out? I'm curious what is causing this.
Another data point - we are also seeing this error message and using a distributed setup. The Backoffice and main site have been configured as separate sites in IIS. This was a security decision. The main site doesn't have any admin/editing functionality and the Backoffice site is only accessible on the internal network.
We will need to investigate but my guess is that the message is correct and the Backoffice site cache is not getting updated when documents are published.
After going back and reviewing our configuration we only had the main site listed in the DistributedCall section of the UmbracoSettings.config. Once we added the Backoffice site to the list of servers and republished the site ( right click on Content node and select Republish Entire Site from menu) the links on the Properties tab were displayed correctly. The 'oops....' error message was gone.
One thing to note is that the links were to the Backoffice instance of the site and this is not the site that regular visitors will see. Setting the Hostname to the hostname of the main site changed the links on the Properties tab to point to the main site.
We are running into the same issue when doing future publishing. Our distributedCall section is configured to include all load balanced servers:
Yet when the date/time to publish roles by, the content doesn't not publish, and the oops... error appears in the link location. Also, normal publishing doesn't cause any issue across the LB environment. That functionality appears to work fine.
Any help would be great.
My understanding of the 'oops... error' is that the document has been published ( in the database ) but the local cache has not been updated. This would fit with your symptoms - the page doesn't show up on any of the servers and you see the error message.
What happens if you Republish the site content? ( right click on Content node and select Republish entire site )
You could check the source code for the scheduled publish function and compare it against the code for the Publish button. Check if they are doing the same thing. you want to see if the Scheduled Publish is calling the webservice that updates all the other services.
Dallas
Dallas,
Thanks for the feedback.
Yes, we're able to get the published, non-cached pages to "publish" after manually forcing a publish. However, this sort of defeats the purpose of "future publishing" in a load balanced environment.
Yes, my next step is try to work through the U source code to figure out why the distributedCall and/or clearDocumentCache aren't being fired by the future publish functionality.
Has there been any definitive answer on this? I get this from time to time and in fact now am looking at a broken site that has this glitch. Seems to have only happened to me on v6 sites, I never saw this particular error before on v4. (Which I've built probably 20 or 30+ sites in, as opposed to only about three v6 sites which have all exhibited this problem at one time or another, usually at strange times.) We are not using any "publish at/remove at" functionality---simply saving and publishing nodes normally.
Oops: this document is published but is not in the cache (internal error)
.It is disconcerting to me to have a production site just suddenly stop working due to this problem. The whole site turned into a YSOD because a node required for rendering the footer suddenly "disappeared". The node is published and in fact no one has even edited this node recently. I wish there were some more diagnostics I could look at but am really confused here. (And unhappy that clients have to be the ones to call me and tell me their site stopped working.)
Thank you,
P.S. I should have added more details about my setup & environment. I re-read this thread again more carefully and actually seem to be quite alone in that I'm not dealing with distributed environments, nor multiple hostnames, nor any scheduled publishing. The site is actually quite simple with nothing advanced to speak of.
The site is version 6.1.3, sits on a single IIS 7 machine, with SQL Server 2008 R2 database.
Well Funka!, you're not alone in this.. I also have a "normal" website (Umbraco v6.1.4 (Assembly version: 1.0.4982.22139)) running on a normal hoster (not Azure websites), and I also got the YSOD mentioning there was not a page published with the selected id.
I have however noticed that some folders don't have writing permission on the file system. I'll look in to this, but I don't think it is related: once the page is republished, the site works fine again (regardless of permissions).
Wow this is really frustrating. Fortunately the last two clients this has happened to have been really cool about their site not working and needing to telephone me to ask why their site is suddenly broken. I've created http://issues.umbraco.org/issue/U4-3145 to hopefully gain more visibility into this problem.
For anyone experiencing this, check your parent nodes are published correctly, we're hoping to work out the fix soon as we can replicate this.
I have just done a clean install Umbraco v6.1.4 and now get this error. I only have two "pages" One is Home and the other is Forum (nForum). All pages have been repeatedy published but only the Home page shows. The umbraco.config only shows the one Home node. A snip from the log.txt is below:
2013-10-22 15:32:06,453 [19] INFO Umbraco.Core.Publishing.PublishingStrategy - [Thread 20] Content 'Forum' with Id '1086' has been published.
2013-10-22 15:32:08,078 [19] WARN Umbraco.Web.Routing.DefaultUrlProvider - [Thread 20] Couldn't find any page with nodeId=1086. This is most likely caused by the page not being published.
HUH?
Publishing the whole site clears this problem. Its like the page not being published is not aware that the parent page is published (I have a parent node which holds all the site pages).
I now have a nForum problem but that is something completely different
Check that your Application Pool only has 'Maximum Worker Processes set to 1
The problem is still here. I've the same problem on 6.1.6 with "publish at" nodes...
@Skowronek posted this reply August 15, 2013 @ 10:47
Did you find any solution to your problem in the balanced setup with future publishing?
I am running into the same issue - now in Umbraco 7.1.3
Best regards
Villads
It was a long time ago but if I remeber rightly this was a permissions problem.
I built a batch file which sorted most of my issues with permissions. Thescript is below. as you can see it was some time ago.
::Version 1.0 Date 2012-11-01 Author W Charlton etyMonda
@ECHO OFF
if exist %SystemRoot%\System32\icacls.exe (
SET SetUser="NETWORK SERVICE"
goto icaclsStart
) ELSE (
SET SetUser="ASPNET"
)
Echo %SetUser%
::pause
:caclsStart
:: Clear the screen
cls
Echo Batch file courtesy of the yMonda team. www.ymonda.co.uk
Echo Note: This is the cacls version
Echo.
Echo This batch file sets and unsets permissions for an Umbraco site.
Echo.
Echo 1. Set intial permissions on all folders
Echo (except those needed to install packages)
Echo.
Echo 2. Allow access for installing packages
Echo.
Echo 3. Remove permissions not required
Echo (For enhanced security)
Echo.
Echo 4. Get me out of here!
Echo.
:: #########################
:: Using cacls (no icacls)
:: Win XP and Win 2000
:: For more info http://situsnya.wordpress.com/2008/08/31/caclsexe-display-or-modify-access-control-lists-acls-for-files-and-folders/
:: and http://thedance.net/~win95/cacls.html
:: #########################
set /p userinp1=Choose a number(1-4):
set userinp=%userinp1:~0,1%
if "%userinp1%"=="1" goto 1
if "%userinp1%"=="2" goto 2
if "%userinp1%"=="3" goto 3
if "%userinp1%"=="4" goto end
Echo Invalid choice!
Echo Hit any key to try again
pause>nul
goto caclsStart
:1
Echo.
Echo Set Temp rights for installation as %SetUser%
Echo.
cacls "%CD%\web.config" /E /G "%SetUser%:C
cacls "%CD%\config" /E /G "%SetUser%:C
Echo.
Echo Set permanent rights for %SetUser%
Echo.
cacls "%CD%\app_code" /E /G %SetUser%:C
cacls "%CD%\app_data" /E /G "%SetUser%:C
cacls "%CD%\app_data\umbraco.config" /E /G "%SetUser%:C
cacls "%CD%\css" /E /G "%SetUser%:C
cacls "%CD%\masterpages" /E /G "%SetUser%:C
cacls "%CD%\macroScripts" /E /G %SetUser%:C
cacls "%CD%\media" /E /G "%SetUser%:C
cacls "%CD%\scripts" /E /G "%SetUser%:C
cacls "%CD%\xslt" /E /G "%SetUser%:C
Echo.
pause
goto caclsStart
:2
Echo.
Echo Set access to allow installation of packages for %SetUser%
Echo.
cacls "%CD%\bin" /E /G "%SetUser%:C
cacls "%CD%\umbraco" /E /G "%SetUser%:C
cacls "%CD%\umbraco\config\create\UI.xml" /E /G "%SetUser%:C
cacls "%CD%\umbraco_client" /E /G "%SetUser%:C
cacls "%CD%\usercontrols" /E /G "%SetUser%:C
:: The next two are needed for the uLess install
cacls "%CD%\config\applications.config" /E /G "%SetUser%:C
cacls "%CD%\config\trees.config" /E /G "%SetUser%:C
Echo.
pause
goto caclsStart
:3
Echo.
Echo Removing permissions for %SetUser%
Echo.
cacls "%CD%\web.config" /E /P "%SetUser%:R
cacls "%CD%\config" /E /P "%SetUser%:R
cacls "%CD%\bin" /E /P "%SetUser%:R
cacls "%CD%\umbraco" /E /P "%SetUser%:R
cacls "%CD%\umbraco\config\create\UI.xml" /E /P "%SetUser%:R
cacls "%CD%\umbraco_client" /E /P "%SetUser%:R
cacls "%CD%\usercontrols" /E /P "%SetUser%:R
Echo.
Echo Things are more secure now!
Echo.
pause
goto caclsStart
:: #########################
:: icacls exists
:: Vista, Win 2003, Win 7, Win 2008
:: For more info http://ss64.com/nt/icacls.html
:: #########################
:icaclsStart
:: Clear the screen
cls
Echo Batch file courtesy of the etyMonda team. www.etymonda.com
Echo.
Echo This batch file sets and unsets permissions for an Umbraco site.
Echo Note: This is the icacls version Win 2003 +
Echo.
Echo 1. Set intial permissions on all folders
Echo (except those needed to install packages)
Echo.
Echo 2. Allow access for installing packages
Echo.
Echo 3. Remove permissions not required
Echo (For enhanced security)
Echo.
Echo 4. Get me out of here!
Echo.
set /p userinp1=Choose a number(1-4):
set userinp=%userinp1:~0,1%
if "%userinp1%"=="1" goto 4
if "%userinp1%"=="2" goto 5
if "%userinp1%"=="3" goto 6
if "%userinp1%"=="4" goto end
Echo Invalid choice!
Echo Hit any key to try again
pause>nul
goto icaclsStart
:4
Echo.
Echo Set Temp rights for installation for %SetUser%
Echo.
icacls web.config /grant %SetUser%:(OI)(CI)M
icacls config /grant %SetUser%:(OI)(CI)M
icacls app_data /grant %SetUser%:(OI)(CI)M
Echo.
Echo Set permanent rights for %SetUser%
Echo.
icacls app_code /grant %SetUser%:(OI)(CI)RX
icacls css /grant %SetUser%:(OI)(CI)M
icacls less /grant %SetUser%:(OI)(CI)M
icacls masterpages /grant %SetUser%:(OI)(CI)M
icacls macroScripts /grant %SetUser%:(OI)(CI)M
icacls media /grant %SetUser%:(OI)(CI)M
icacls scripts /grant %SetUser%:(OI)(CI)M
icacls xslt /grant %SetUser%:(OI)(CI)M
Echo.
pause
goto icaclsStart
:5
Echo.
Echo Set access to allow installation of packages for %SetUser%
Echo.
icacls bin /grant %SetUser%:(OI)(CI)M
icacls umbraco /grant %SetUser%:(OI)(CI)M
icacls umbraco_client /grant %SetUser%:(OI)(CI)M
icacls usercontrols /grant %SetUser%:(OI)(CI)M
icacls web.config /grant %SetUser%:(OI)(CI)M
Echo.
pause
goto icaclsStart
:6
Echo.
Echo Removing permissions for %SetUser%
Echo.
icacls app_data /substitute %SetUser%:(OI)(CI)RX
icacls web.config /substitute %SetUser%:(OI)(CI)R
icacls config /substitute %SetUser%:(OI)(CI)R
icacls bin /substitute %SetUser%:(OI)(CI)R
icacls umbraco /substitute %SetUser%:(OI)(CI)R
icacls umbraco_client /substitute %SetUser%:(OI)(CI)R
icacls usercontrols /substitute %SetUser%:(OI)(CI)R
Echo.
Echo Things are more secure now!
Echo.
pause
goto icaclsStart
:end
We have this in our productionenvironment on Umbraco 7.2.2
I also encounter this issue ~1 out 10 times in my 7.2.4 assembly: 1.0.5557.19139. It happens when creating a new item with the following code.
The log show the following:
and in umbraco
It's happens both on my local dev and on UnoEuro.
This what the source of my problem
https://our.umbraco.org/Documentation/Reference/Cache/cache-refresher
Dont know if its related to the original problem in the tread.
We've just upgraded a working site from v7.1.4 to v7.2.5 and have this exact same issue. Cannot publish some nodes.
We are not using any API's to programatically create content either. Standard site using OOTB DocTypes apart from ArchType?
@Lee Would be helpful with more details. Do you have anything in the logs?
Almost a year since the last post from Niels... is the case closed? If so, could someone please point me in the right direction? Thanks. (It is still an issue).
Michael, Do you have access to the logs and can set file/folder permissions?
As far as I remember it was a permissions issue. There is a batch file further up which might help. If you run this and try again then examine the logs, these should tell you what pages are failing due to no access. You might also try setting all permissions to "everyone" but it's a bit drastic
Is there a way to correct this en-masse when it happens? I'm finding that publishing a parent and it's children doesn't work but publishing individually does so there is a difference in the way each of these processes work.
Thanks, Simon
The solution that we found was introduced in 7.1.5, but didn't work correctly back then either, so we had to change some Umbraco src and recompile it to make it work.
It looks from the above configuration that there is a lack of information about master-slave relationships - also remember that this information is essential on all the slaves as well:
https://our.umbraco.org/documentation/getting-started/setup/server-setup/load-balancing/traditional
In the section "Correct config for scheduled publishing & tasks" it states that "serverName or appId" must be added to each server node.
The reason for this is that each umbraco instance has a timer running that says "if I am the master I need to check if there are nodes that are candidates to be published in a scheduled fashion". Now, if any of the slaves mistakenly is configured to think that it (lets call it SlaveA) is the master and its timer checks for nodes to publish BEFORE the real master, then SlaveA will try to do the scheduled publish and set a "published" timestamp in the database - BUT the node has never been actually published and therefore will not be in the cache of the master node that you are accessing umbraco from, hence the master node WILL say "Oops...".
Additional note I remember I had an issue with the appId in our setup, so please be sure to have unique appIds on ALL nodes as well if you choose to use appId.
Hope this clarifies your issue.
Thanks for the detail.
In our load balanced environment we have only 2 servers at present and these are configured as follows:
I suspect that this has occurred due to a publish action on the slave node which did happen yesterday to resolve another issue with the cache on the slave. I understand if they were first published on the slave and not the master how this scenario might occur however that doesn't explain why publishing existing nodes on the slave would remove them from the cache on the master.
We are almost at the point of upgrading to 7.2.4 which I think has additional load balancing features so I'm hoping some of this sort of stuff will go away soon as it intermittently happens and takes an awfully long time to recover from it.
Cheers, Simon
Had this recently on 7.2.4. Couldn't republish entire site as the system couldn't write to umbraco.config due to rights issues.
Deleting umbraco.config manually via ftp solved the problem for me
It looks like umbraco is only caching the publish event and not writing it to the db. When the site refreshes the cache recreate the umbraco.config file, it does not get the notification for the publish event as it was never written to the db.
Give the db user read, write permissions to the umbraco database, stop the app pool and website, delete umbraco.config. In App_Data/Temp delete inner files and NOT folders. Start the site then start the app pool. This resolved issue.
is working on a reply...