Courier issue: not updating content (basic BodyText)
Hi - I hope you can help us :-)
We are having issues using Courier on our website.
When creating a new page with BodyText, it publishes and couriers across fine first time.
When editing the BodyText, it saves and publishes locally OK and courier appears to work correctly, however the amended content is not copied across. (I have checked this by logging into the destination Umbraco)
I can see from the logs that some connection is made and that there are no errors. I can see from the properties of the destination page that the "last edited" value is updated.
The only suspicious lines I can see from the courier log is a Null in the following entries
We upgraded our site from V7.1.8 to V7.3.0 last week.
We use Courier, which is V2.51.2 for v7 on both the source site and the destination site.
The destination site is load balanced with both sites pointing at the same source code. "A" node is the primary and the one which courier published to.
Any help would be appreciated as we have a live website we effectively cannot update. I have taken snippets of the Courier source and destination and the Umbraco source and destination logs if they are of any use.
Having double checked this against our logs prior to the upgrade, I can confirm that the log lines quoted above were also in Courier 2.11.2 for v7 / Umbraco v7.18, which worked correctly.
Sorry - there are no clues for me to go on...
At this point I am able to deploy content with a workaround.
First I deploy the document types (some go easy, some are more difficult).
Then I deploy the content, make sure to uncheck the documenttypes so you don't deploy those, then the content will deploy. The checkboxes don't have labels because the labels are broken.
Thanks Dennis for this - we will try it :-)
Last week, when we had a major deployment (amended *.dlls in the bin folder), the site fully refreshed including showing items that had been couriered across - I'm suspecting a caching issue...
I faced the similar issue today, and found that it was caused by having duplicate rows in cmsPropertyData on the target host.
You can check this by running a query
SELECT cpd.contentNodeId,versionId,cpd.propertytypeid FROM dbo.cmsPropertyData AS cpd
GROUP BY cpd.contentNodeId,versionId,cpd.propertytypeid
HAVING COUNT(*)>1
In these duplicates the property data may be different, but the fact is the combination of contentNodeId,versionId,propertytypeid is not unique, whereas it is supposed to be unique.
I removed the duplicates by running query (MS SQL)
WITH cte AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY VersionId, cpd.propertytypeid ORDER BY id) AS rn FROM dbo.cmsPropertyData AS cpd)
DELETE FROM cte WHERE rn = 2
(be careful to ensure that the proper values are remained in DB! in my case the new values always have ID less than then the old ones, but I am not sure why)
After I deleted, I was able to re-courier the node and it updated OK.
This looks like Courier bug, as I have a lot of duplicates on target (production) host and no duplicates on the source (staging) machine.
We have similar issue with Umbraco 7.3.3 and Courier 2.51.3 - new content is transferred without issue but updated content is not reflected at all.
For right click courier sync there is nothing like errors or warnings logged on the remote machine. Locally there is one Warn - WARN Umbraco.Courier.RepositoryProviders.Local - [Thread 19] Closing session called but there is no session open: 6d5ec058-c259-4d0e-a981-23485b83e88b
Just to confirm Gleb Kaplan's observation - running Courier for transfer of newly added node adds many duplicates in dbo.cmsPropertyData of the target machine.
After that, transfer of updates to this node is not possible.
Once we remove the duplicates with the provided SQL script (we have to run it 3-4 times) transfer of updates is again possible.
This appears to be a serious issue and we will have to rethink our migration to 7.3.3 and Courier 2.51.3 because running such SQL scripts on Production Database after every Courier sync will be too dangerous.
Also there are other not so critical but unpleasant issues with UI, like missing labels and missing option to select sub-nodes for transfer on right click sync.
Even basic testing should catch these ones.
Are these new versions tested manually or through automation at all?
IG Alex, in your case it seems you have more then just two duplicate records per property - to cover this case the script should be:
WITH cte AS (
SELECT *, ROW_NUMBER() OVER (PARTITION BY VersionId, cpd.propertytypeid ORDER BY id) AS rn FROM dbo.cmsPropertyData AS cpd)
DELETE FROM cte WHERE rn >= 2
Hey everyone, this took us a while to figure out as well, good job hunting the cause down! We found the same cause and partial fix a few days ago and have been working hard on an updated Courier release.
The fix above will work, but the problem will keep coming up each time you deploy new content, v2.51.4 fixes that.
I believe the query above will work but we prefer you try the documented query in the documentation above so that we can be sure that we can include it a future Courier release.
Forgot to mention: if you're on Umbraco as a Service you've been automatically upgraded to Courier 2.51.4 and we've fixed up your databases automatically.
Thank you Sebastiaan for the quick resolution of this issue.
I have updated our test environments with new Courier 2.51.4 and retested the scenario - there are no more duplicate entries and both new nodes and updated nodes are transferred correctly.
Special thanks to Gleb Kaplan who was the first one to realize what is actually happening and provided some temporary workaround.
We have already reverted to 7.2.7 and Courier 2.50.4 but with this fix we may try to upgrade again to 7.3.4 and 2.51.4.
Thanks for this :-)
We are currently testing Courier 2.51.4 and can confirm the log message appears neatly:
2015-12-16 10:53:23,459 [10] ERROR Umbraco.Courier.Core.TaskManager - [Thread 37] Error PackagingTask with id: b72ab5a7-ea2a-4ca0-a6c8-10054c298c7b
Umbraco.Courier.Core.Exceptions.DataIntegrityException: We've detected a bit of a problem which prevents you from being able to deploy content. Please give this error message and the link https://our.umbraco.org/documentation/Add-ons/UmbracoCourier/DataIntegrity/ to your system adminsitrator Source: 1, Destination: 184
at Umbraco.Courier.Core.Packaging.RevisionPackaging.Package()
at Umbraco.Courier.Core.Tasks.PackagingTask.Run()
at Umbraco.Courier.Core.BackgroundTaskRunner`1.ConsumeTaskInternal(T task)
We'll carry on testing - early signs are good. Thanks, Luciox
Is there any way to disable the check? It takes 38 seconds to run against my Azure instance, and the query timeout of 30 seconds is making it fail. I've run the cleanup query already, so I'd rather just be able to turn it off and say "thanks, don't bother checking" and save the query time, not to mention being able to actually use it at all. As-is, 2.51.4 is completely unusable for us.
Hi Carl, that's insanely long, how much data is in your table? Does it take 31 seconds to run it manually? The query is as follows:
select * from cmsPropertyData where id not in (select min(id) from cmsPropertyData group by contentNodeId, versionId, propertytypeid having min(id) is not null)
The difference between 2.51.4 release and this nightly is in the dlls and an optional addition to the courier.config file, so only need to overwrite the dlls. In the settings section of courier.config you can add: <disableDataIntegrityCheck>true</disableDataIntegrityCheck>
The setting only needs to exist on the source but it can't hurt to update the remote with it as well.
There are 2021736 rows in the table. Even doing a COUNT(*) took 23 seconds. The 38 seconds is measured by running the query from SMSS on localhost connected to the Azure DB. I'll try that nightly out.
Carl, I just remembered that we optimized the query before we released 2.51.4. The actual query is: SELECT contentNodeId FROM cmsPropertyData GROUP BY contentNodeId, versionId, propertyTypeId HAVING COUNT(*) > 1
I am posting a reply here as I am seeing the same issue as Luciox but with Courier 2 version 2.52.3 installed with Umbraco 7.4.1.
I have created two simple projects with the same document types and properties and tested updating a textstring property type. Whilst the deployment appears to complete successfully, the updated textstring value does not appear in the target site.
I am using courier 3 with Umbraco 7.3.8, both on my local machine. I have got all my configuration correctly with user 0. When I deploy changes from one instance to the other using the umbraco back office, I see the deploy screen and a list "Items to be deployed" but when I click Deploy button, it shows one media file copied and then goes blank forever.l I can come out of the deploy window and it doesnt update. Nothing happens, nothing copied.
Courier issue: not updating content (basic BodyText)
Hi - I hope you can help us :-)
We are having issues using Courier on our website.
When creating a new page with BodyText, it publishes and couriers across fine first time.
When editing the BodyText, it saves and publishes locally OK and courier appears to work correctly, however the amended content is not copied across. (I have checked this by logging into the destination Umbraco)
I can see from the logs that some connection is made and that there are no errors. I can see from the properties of the destination page that the "last edited" value is updated.
The only suspicious lines I can see from the courier log is a Null in the following entries
We upgraded our site from V7.1.8 to V7.3.0 last week. We use Courier, which is V2.51.2 for v7 on both the source site and the destination site. The destination site is load balanced with both sites pointing at the same source code. "A" node is the primary and the one which courier published to.
Any help would be appreciated as we have a live website we effectively cannot update. I have taken snippets of the Courier source and destination and the Umbraco source and destination logs if they are of any use.
Kind regards
Having double checked this against our logs prior to the upgrade, I can confirm that the log lines quoted above were also in Courier 2.11.2 for v7 / Umbraco v7.18, which worked correctly. Sorry - there are no clues for me to go on...
I run into the same issue. The .courier file contains the right data, but the data issn't there on the target.
At this point when I try to deploy any content Courier just breaks and I can't even deploy any content.
Thanks Dennis for saying you have the same problem. We've tried Courier.v2.51.3-nightly268.HotFix.zip but this hasn't fixed the issue. Kind regards
At this point I am able to deploy content with a workaround. First I deploy the document types (some go easy, some are more difficult). Then I deploy the content, make sure to uncheck the documenttypes so you don't deploy those, then the content will deploy. The checkboxes don't have labels because the labels are broken.
Thanks Dennis for this - we will try it :-) Last week, when we had a major deployment (amended *.dlls in the bin folder), the site fully refreshed including showing items that had been couriered across - I'm suspecting a caching issue...
I faced the similar issue today, and found that it was caused by having duplicate rows in cmsPropertyData on the target host.
You can check this by running a query
In these duplicates the property data may be different, but the fact is the combination of contentNodeId,versionId,propertytypeid is not unique, whereas it is supposed to be unique.
I removed the duplicates by running query (MS SQL)
(be careful to ensure that the proper values are remained in DB! in my case the new values always have ID less than then the old ones, but I am not sure why)
After I deleted, I was able to re-courier the node and it updated OK.
This looks like Courier bug, as I have a lot of duplicates on target (production) host and no duplicates on the source (staging) machine.
Hello,
We have similar issue with Umbraco 7.3.3 and Courier 2.51.3 - new content is transferred without issue but updated content is not reflected at all.
For right click courier sync there is nothing like errors or warnings logged on the remote machine. Locally there is one Warn - WARN Umbraco.Courier.RepositoryProviders.Local - [Thread 19] Closing session called but there is no session open: 6d5ec058-c259-4d0e-a981-23485b83e88b
And the following INFO:
INFO Umbraco.Courier.Core.Packaging.RevisionPackaging - [Thread 19] Documents: 6d902ae2-89ed-4d4b-8bd9-2aaf270ba3e9 hash-mismatch (local/remote) 2702b94df2e235bf590958e372f54c48264d62e7ada439032f447a2d507e6a24 / cc001008d72919047053be1f859093e769fb25fd80fe85841294f19e16866837 INFO Umbraco.Courier.Core.Packaging.RevisionPackaging - [Thread 19] PropertyData: 6d902ae2-89ed-4d4b-8bd9-2aaf270ba3e9 hash-mismatch (local/remote) 264d62e7ada439032f447a2d507e6a24 / 69fb25fd80fe85841294f19e16866837
For Courier package transferred with revision and restored, there is one exception on target machine:
ERROR Umbraco.Courier.Core.BackgroundTaskRunner - [Thread 117] An error occurred consuming task System.NotSupportedException: Cannot execute without a valid/current HttpContext assigned. at Umbraco.Web.BatchedWebServiceServerMessenger.GetBatch(Boolean ensureHttpContext) at Umbraco.Core.Sync.BatchedWebServiceServerMessenger.BatchMessage(IEnumerable
1 servers, ICacheRefresher refresher, MessageType messageType, IEnumerable
1 ids, Type idType, String json) at Umbraco.Core.Sync.BatchedWebServiceServerMessenger.DeliverRemote(IEnumerable1 servers, ICacheRefresher refresher, MessageType messageType, IEnumerable
1 ids, String json) at Umbraco.Core.Sync.ServerMessengerBase.Deliver(IEnumerable1 servers, ICacheRefresher refresher, MessageType messageType, IEnumerable
1 ids, String json) at Umbraco.Core.Sync.ServerMessengerBase.PerformRefreshAll(IEnumerable1 servers, ICacheRefresher refresher) at Umbraco.Web.Cache.DistributedCache.RefreshAll(Guid factoryGuid) at Umbraco.Web.Cache.DistributedCacheExtensions.RefreshAllPageCache(DistributedCache dc) at Umbraco.Courier.DataResolvers.ItemEventProviders.RefreshContent.Execute(ItemIdentifier itemId, SerializableDictionary
2 parameters) at Umbraco.Courier.Core.EventManager.ExecuteLocalEvent(String eventAlias, ItemIdentifier itemId, Dictionary2 parameters, ExecutionContext context) at Umbraco.Courier.Core.EventManager.ExecuteLocalQueue(String sessionKey, String queueAlias, ExecutionContext context) at Umbraco.Courier.RepositoryProviders.Local.ExecuteQueue(String queueItems) at Umbraco.Courier.Core.Extraction.RevisionExtraction.CompleteDeployment() at Umbraco.Courier.Core.Extraction.RevisionExtraction.Extract() at Umbraco.Courier.Core.Tasks.ExtractionTask.Run() at Umbraco.Courier.Core.BackgroundTaskRunner
1.ConsumeTaskInternal(T task)Is this something that is caused by our configuration or known Courier issue?
We are waiting on this issue to be resolved in order to upgrade our Production environment to 7.3.3, so it is critical for us.
Thank you.
Hello,
Just to confirm Gleb Kaplan's observation - running Courier for transfer of newly added node adds many duplicates in dbo.cmsPropertyData of the target machine.
After that, transfer of updates to this node is not possible.
Once we remove the duplicates with the provided SQL script (we have to run it 3-4 times) transfer of updates is again possible.
This appears to be a serious issue and we will have to rethink our migration to 7.3.3 and Courier 2.51.3 because running such SQL scripts on Production Database after every Courier sync will be too dangerous.
Also there are other not so critical but unpleasant issues with UI, like missing labels and missing option to select sub-nodes for transfer on right click sync.
Even basic testing should catch these ones.
Are these new versions tested manually or through automation at all?
IG Alex, in your case it seems you have more then just two duplicate records per property - to cover this case the script should be:
Hey everyone, this took us a while to figure out as well, good job hunting the cause down! We found the same cause and partial fix a few days ago and have been working hard on an updated Courier release.
All of the details of this bug can be found here: https://our.umbraco.org/documentation/Add-ons/UmbracoCourier/DataIntegrity
You can now update to Courier 2.51.4: https://our.umbraco.org/projects/umbraco-pro/umbraco-courier-2/
The fix above will work, but the problem will keep coming up each time you deploy new content, v2.51.4 fixes that.
I believe the query above will work but we prefer you try the documented query in the documentation above so that we can be sure that we can include it a future Courier release.
Forgot to mention: if you're on Umbraco as a Service you've been automatically upgraded to Courier 2.51.4 and we've fixed up your databases automatically.
Hello,
Thank you Sebastiaan for the quick resolution of this issue.
I have updated our test environments with new Courier 2.51.4 and retested the scenario - there are no more duplicate entries and both new nodes and updated nodes are transferred correctly.
Special thanks to Gleb Kaplan who was the first one to realize what is actually happening and provided some temporary workaround.
We have already reverted to 7.2.7 and Courier 2.50.4 but with this fix we may try to upgrade again to 7.3.4 and 2.51.4.
Thanks for this :-) We are currently testing Courier 2.51.4 and can confirm the log message appears neatly:
We'll carry on testing - early signs are good. Thanks, Luciox
Cool, make sure to run the fix query on both source and target as they both have a count higher than 0 :)
Is there any way to disable the check? It takes 38 seconds to run against my Azure instance, and the query timeout of 30 seconds is making it fail. I've run the cleanup query already, so I'd rather just be able to turn it off and say "thanks, don't bother checking" and save the query time, not to mention being able to actually use it at all. As-is, 2.51.4 is completely unusable for us.
Hi Carl, that's insanely long, how much data is in your table? Does it take 31 seconds to run it manually? The query is as follows:
select * from cmsPropertyData where id not in (select min(id) from cmsPropertyData group by contentNodeId, versionId, propertytypeid having min(id) is not null)
In any case, there's a nightly 278 over here: http://nightly.umbraco.org/?container=umbraco-deploy
The difference between 2.51.4 release and this nightly is in the dlls and an optional addition to the
courier.config
file, so only need to overwrite the dlls. In the settings section of courier.config you can add:<disableDataIntegrityCheck>true</disableDataIntegrityCheck>
The setting only needs to exist on the source but it can't hurt to update the remote with it as well.
Hope this helps!
There are 2021736 rows in the table. Even doing a COUNT(*) took 23 seconds. The 38 seconds is measured by running the query from SMSS on localhost connected to the Azure DB. I'll try that nightly out.
Edit: Nightly seems to work fine. Thanks.
@Carl which Azure database tier are you using? Would be good to know for future testing purposes.
Carl, I just remembered that we optimized the query before we released 2.51.4. The actual query is:
SELECT contentNodeId FROM cmsPropertyData GROUP BY contentNodeId, versionId, propertyTypeId HAVING COUNT(*) > 1
Does that one run at least a bit faster?
That's the one I was running (I think I read the documentation page and found that one before I found this thread). I just tried again.
Optimized query "HAVING COUNT(*) > 1" : 41341 ms
Previous query in this thread "WHERE id NOT IN ... HAVING min(id) IS NOT NULL" : 121328 ms
Modified Gleb CTE (to make it a SELECT instead of a DELETE): 65137 ms
Azure tier is Standard/S0.
Hi.
I am posting a reply here as I am seeing the same issue as Luciox but with Courier 2 version 2.52.3 installed with Umbraco 7.4.1.
I have created two simple projects with the same document types and properties and tested updating a textstring property type. Whilst the deployment appears to complete successfully, the updated textstring value does not appear in the target site.
The log from the source project is as follows:
The only thing of note I can see is at 09:25:35 where hash-mismatch is logged but as this is only an INFO message I'm not sure if this is any issue.
Any help would be appreciated on this.
Thanks.
Hi,
I am using courier 3 with Umbraco 7.3.8, both on my local machine. I have got all my configuration correctly with user 0. When I deploy changes from one instance to the other using the umbraco back office, I see the deploy screen and a list "Items to be deployed" but when I click Deploy button, it shows one media file copied and then goes blank forever.l I can come out of the deploy window and it doesnt update. Nothing happens, nothing copied.
is working on a reply...