I have been fighting with Umbraco today and I cannot work out what is going wrong. I have upgraded an Umbraco 13 site to Umbraco 17. I used uSync migration and had great success with all the content not breaking anything and code upgrades have gone well.
But every time I re-start the website locally I get the following screen:
I can then republish the home node and the home works again.
I then created a fresh website, fresh umbraco 17 install, I used usync to copy the document types across and then only created the home node… and again this issue reared its head.
Has anyone else come across this? I have upgraded multiple other websites to U17 all 100% successfully… this one is going a bit pete-tong!
Have you tried rebuilding the database cache in the backoffice Settings? Are the pages in the CMS unpublished, or published just not in the cache? Any errors in the Umbraco log?
Thanks Steve, but sadly it’s not that the home is never appearing. The homepage loads correctly when I publish, but then after a restart of the project Umbraco believes the home page is unpublished. But in backoffice it shows the Url. Publish the Home node and the home node starts working…weird.
Now what I am seeing from my testing is this might be down to the Languages and routes. I am currently testing this theory by starting again and being tidy with Languages.
If you manage to figure anything out, please update the existing issue that @pc-pdx linked so that HQ can look into this if indeed it is related and is the same issue.
I asked AI for it’s thoughts and this is what it came back with… not sure if any of that helps?
The languages theory sounds plausible to me. From v15 onwards, URLs live in the umbracoDocumentUrl table, keyed by document key and language ID, and get reloaded at startup. Republishing writes fresh rows, which would explain why a publish fixes it but a restart breaks it again: the startup path is either failing to load those rows or not matching them.
Things I’d suggest he checks:
Compare the URL table before and after a restart. Query umbracoDocumentUrl for the Home node’s key after publishing, then again after restarting. If the rows survive but the route still fails, it’s a lookup or matching problem. If they’ve gone, something is rebuilding or clearing them on boot.
Check umbracoLanguage for oddities. Look for:
more than one language marked as default
duplicate ISO codes
a default language that changed after content was published
Invariant content is stored against the default language ID, so a mismatch there would cause exactly this. uSync migrations from 13 can leave languages in a slightly odd state.
Check culture and hostnames on the Home node. A domain assigned to a culture that’s missing, non-default or duplicated could break routing after a cache reload.
Look for custom URL segment providers. Any custom IUrlSegmentProvider (his own code or a package) matters, because I believe a change in providers triggers a URL rebuild at startup. It’s worth confirming nothing nondeterministic is in there.
Look for a second instance sharing the database. Another local instance, or a scheduled-publishing or server-role misconfiguration, could be triggering cache rebuilds he isn’t expecting.
Turn on debug logging for the URL service at startup. Setting Umbraco.Cms.Core.Services to Debug should show whether a rebuild runs and what it does.
Try a minimal repro. He already reproduced it on a fresh install with synced doc types. Next, try a fresh install with only the default en-US language, one invariant Home doc type, and nothing synced. If that works, add languages back one at a time.
If he does pin it down, the before-and-after rows from the URL table along with his language setup would be the most useful thing to add to #23234.
umbracoDocumentUrl - this table appears to be the issue. It is not getting populated. I manually populated it with my site’s homepage and the home page now consistently works. Now how to fix that…
Oh man! So my upgrade to 17.7.1 earlier in the day did not work. It looked like it had worked, but the umbracoDocumentUrl table was populated with some pages, the pages I used to test! But there was only a handful. And when I published all the nodes, the table was not getting repopulated.
While I was reading through all the bug reports and stuff on github from the links above, I read one thing that made my brain melt!
The site I have been upgrading has this “SetServerRegistrar” code in it, and its been there for so long I never thought about it.
I deleted this code, and bosh, all is working again.
Absolutely 100% agreed. If you are a Sub you should be doing what you are told to do and not allowed to do anything by yourself
We set this subscriber/publisher code in place across a few websites a couple of years back due to issues with Azure Sql Server and slots which resulted in -333 error a lot…
When Umbraco starts up it basically uses the first server at start up as the main server and populates the Server table which can cause locks to lock badly hence the -333. And we felt the issues were resolved when we implemented that Sub/Pub code… but that might have just been a coincidence
So I guess I am going to remove that code from all sites I now upgrade to U17 as this issue will come up again. We are now implementing Umbraco__CMS__Global__MainDomKeyDiscriminator as we found that later on and I rarely see the -333 on any site even the ones not using Sub/Pub code.
Yes! This is the solution for me. I hope it helps others if it is happening on servers out in the world.
Yeah the whole purpose of explicitly setting server roles is to avoid the first server to boot assumes it’s the publisher.. (and the best practice guidelines in the docs say to explicilty set)
My point was more that Publishing should be disabled for any and all servers that have a serverRole of Subscriber.. so if this is the root cause you just shouldn’t have been able to publish on a subscriber
Maybe just something that got missed with allowing loadbalanced publishers now?
Hopefully will be the fix.. eg a Subscriber can’t publish content.. or save content.. or well do anything… maybe should even be the case that
UseBackOffice() should be disabled for Subscribers.. or lots of backoffice functionality set to readonly?
Hi all, just to add the HQ side to the accepted answer: registering the backoffice server as a Subscriber isn’t a supported setup, which is why #23569 was closed as by design. The load-balancing docs say it should be SchedulingPublisher. There’s a related bug where the automatic election puts the backoffice instance in the same state. That one is fixed in 17.8.0 and 18.3.0 (#23565). Either way, pages that are already broken need a one-off repair: publish with descendants from the root on the publisher instance.
@jacob
So just to confirm there is no mechanism(s) in place to stop a serverRole=subscriber from physically being able to save/publish/schedule etc ? (disabled write options across the board?)
We have to educate editors to watch out for definately being on the ScheduledPublisher, or put in place mechanisms to redirect /umbraco on subscribers to the correct server? (watching out for any default front end /umbraco/{api} routes… )