Kentico 11 Staging Issues - Duplicate tasks created in simple bi-directional configuration.

Alex Diaz asked on November 5, 2019 21:31

When setting up a simple bi-directional configuration in the following manner:

QA <-> Staging -> Production

If a task originates from QA and is staged/synced up to staging, then staged/sync up to production and staged back down to QA. The task that already exists in QA is being recreated and setup for syncing again in QA although it already exist in the environment that it was created in. Should Kentico recognize that? We have the same site codename throughout the environments.

This is happening when a site is setup and staging servers are enabled.

Our organization has another site that is setup the same way and we are not getting duplicate tasks.

Besides the documented configuration settings, are there any other settings that should be modified?

Recent Answers


Mike Wills answered on November 5, 2019 23:33

Hi Ricardo,

Did you disable the Log staging changes setting, to prevent a synchronization loop? See:

https://docs.kentico.com/k12/deploying-websites/content-staging/bi-directional-content-staging

Mike

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on November 6, 2019 10:24

Also, what version and hotfix of Kentico are you using? Do the server code names set in the Staging app UI match the server code names defined in the web.config file?

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on November 6, 2019 17:17

Juraj i believe will have the answer for you, in these scenarios where you have more than 2 sites going between them, you need to add unique Server codenames (ex "QA" "Staging" "Production") and then use the app key

<add key="CMSStagingServerName" value="QA" />

with the server code name to each.

0 votesVote for this answer Mark as a Correct answer

Alex Diaz answered on November 6, 2019 22:20

Hello All,

Thank you for your reply.

1) Did you disable the Log staging changes setting, to prevent a synchronization loop? Yes, this was disabled but the loop continues on other sites that are not main site.

2) We only have one ServerName codename for each web.config file.

  1. value="QA_ServerName" with a suffix "_ServerName"
  2. value="Staging_ServerName" with a suffix "_ServerName"
  3. value="Admin_ServerName" with a suffix "_ServerName"

Can we add another entry for other sites? We have more than one site running. Above is what we have on each server. I don't think we can add another ServerName?

The ServerName appears in the staging configuration.  Info Current server name is 'QA_ServerName'.

Again, we have a site that does not loop. It's our main site. I have tested it with various tasks originating from QA and no looping. Other sites are looping. Same changes pushed up from QA are looped back down and create a task again.

Any other settings that we have outside of the web.config?

Thank you for your replies.

0 votesVote for this answer Mark as a Correct answer

Alex Diaz answered on November 6, 2019 22:23

v11.0.29

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on November 7, 2019 08:09

So, the values in each web.config file are matching the Code name of the server which is set in the Staging admin UI, correct?
You mentioned you have multiple sites - what kind of task is being looped? Does it happen for any kind of task?
I am asking since there are basically two main types of objects in Kentico - site related (e.g. page) and global (page template, page type). So, maybe the task which is being looped is a global task and it gets logged for all the sites but you are synchronizing it for one site only.
Could you please provide a more detailed step by step description of what kind of task is problematic, what is the server selection when synchronizing, what are the task data and also what values you see in the Stating_* tables, especially in Staging_Synchronization table?
Also, using e.g. the CMSStagingTreatServerNamesAsInstances web.config key - does it make any difference? Or, CMSStagingLogGlobalObjectsOnlyForAssignedSites key?

0 votesVote for this answer Mark as a Correct answer

Alex Diaz answered on November 8, 2019 19:28

Juraj, we have already setup the CMSStagingTreatServerNamesAsInstances web.config key - does it make any difference? This does create seperate task in each site without looping. The loop only happens within a site that is being modified. Again, I create a change in QA, then sync up to staging. Then I sync from staging to production but any change that gets synced also goes back down to QA. We have this setup so that if there is a change made in staging, when synced, it would go back down to QA. The issue arises when we create a task in QA. The task gets recreated again but it shouldn't in theory because it originated in QA.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on November 12, 2019 11:26

I am unable to reproduce the issue. I have setup the staging in the same way as you have and the task is not getting back to the original instance. Have you checked the DB tables I mentioned? Also, in the Staging_Task table there is the TaskServers column - what are the values here? Or, you can also view the task details in the admin UI, clicking on the eye icon. This is what I have on the source server. Then, when this task is synchronized to the target (the middle instance) I see this. And after I synchronize the task to the production, final target instance, nothing is being logged on the source instance, since the Task Processed by held the value that the task was already processed by given instance.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.