Installation and deployment
Version 7.x > Installation and deployment > Web Farm - Media Library File Upload Sync Issue View modes: 
User avatar
Member
Member
TimmyB - 10/15/2013 11:16:10 AM
   
Web Farm - Media Library File Upload Sync Issue
I am running a Stage server and 2 Prod servers that are currently using a Netscaler to manage traffic flow and writing files to a custom media folder. When we upload a file using the CMS Desk GUI, the file will make it to 1 of the VM's (whichever it is routed to via the Netscaler) but not the second one. Normal content pages sync fine and haven't had any issues with them syncing at all.

From reading the documentation, it sounds like there is a job that is supposed to run that makes sure the web farm servers are synced up but it doesn't seem to be working properly. I can usually get the files to sync up eventually by using the Synchronize Current Subtree functionality several times and hope that I get it to hit the server that didn't have the file.

In my web.config, I have tried several variations to see if I could get something to change. Right now I have CMSWebFarmUpdateWithinRequest=true and CMSWebFarmUseDBUpdater=true and I have the CMSUseAutoScheduler commented out. I have tried various combos of these settings without any luck.

I see 2 tasks in my Scheduled Tasks list called "SyncServer" with the correct web farm server names and they are scheduled to run every 5 minutes but they don't appear to run. I reset the execution counts and clicked the Run ASAP button but it doesn't appear to run and the execution counts never increase. Both jobs are enabled and I don't receive any errors.

As a possible fix, I have my firewall guy opening up traffic so that I can sync to each server individually and I will remove the single instance from my Servers list in the Staging area and add the individual ones.

Does this sound like the right way to fix this issue or is there something else that I am missing?
(I did search on the forums here but couldn't find anything for v7.0.55)

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 10/15/2013 2:15:57 PM
   
RE:Web Farm - Media Library File Upload Sync Issue
Do you have your web farm servers setup in CMSSiteManager>Administration>Web farm servers? Do you have a license for the second server in the farm?

In your initial post you are talking about a few different thing as well.

* Web farms
* Content staging
* Scheduled tasks

My guess is once you get web farm sync setup properly you won't have a problem. Also do you have any file replication setup on your server(s) like Microsoft DFS? I've worked in an environment where we have both DFS setup and a web farm. There were some challenges but once I understood all the pieces and how they worked together, things work like a well oiled machine now.

User avatar
Member
Member
TimmyB - 10/15/2013 2:29:55 PM
   
RE:Web Farm - Media Library File Upload Sync Issue
Web Farm is setup, proper licensing and appears to be working correctly. If we make a general content change, i.e.- make text change on a page and publish, it appears on both servers. This is only related to file uploads to the media library. No DFS running.

Thanks for responding!

User avatar
Member
Member
TimmyB - 10/15/2013 2:31:53 PM
   
RE:Web Farm - Media Library File Upload Sync Issue
More info, running on Windows 2012 Server/SQL 2012 with IIS 8 and under .Net 4.0. Site was configured for 3.5 and I manually updated the web.config to use 4.0.

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 10/16/2013 8:42:55 AM
   
RE:Web Farm - Media Library File Upload Sync Issue
Timmy,

How is your web farm setup within Kentico? Are you using auto server generation? Do you see any tasks in the task list when some changes are made in the web farm section? Are you storing your files in the file system and the database or one over the other?

You mentioned the "SyncServer" Scheduled Task. I don't believe this one deals with the web farm sync. Check out this page. About half way down it talks about the scheduled task. You may have to change from your site specific scheduled tasks to the global tasks to see this one.

Brenden

User avatar
Kentico Support
Kentico Support
kentico_filipl - 10/16/2013 9:22:31 AM
   
RE:Web Farm - Media Library File Upload Sync Issue
Hi Timmy,

I tried to create a media library file on one web farm server but it was synchronized correctly with the other one. The synchronization was performed immediately so there should not be any need to start scheduled tasks manually. The hotfix version for the instance I was trying it on was the same - 7.0.55 so it should be working for you automatically as well.

Haven't you tried it before changing web.config keys from ASP.NET version 3.5 to 4.0? Also, are there any records in CMS_WebFarmTask or CMS_WebFarmServerTask database tables?

Best regards,
Filip Ligac

User avatar
Member
Member
TimmyB - 10/16/2013 11:40:42 AM
   
RE:Web Farm - Media Library File Upload Sync Issue
We had another company upgrade this site for us from 5.5R2 to 7 and I am just learning to be the administrator of it so please excuse me if I sound a little foreign to this product.

I just started over from a clean slate.
- commented out all of the customized settings in the web.config
- set the web farm to automatically create the web farm servers (it worked)
- walked through the staging server and target server configurations
- configured a server for staging (uses a single url that points to the netscaler)
- Ran a sync for the Current subtree under the Documents tab, out of how many ever thousand docs it updated, I got 4 failures and teh event logg says The request failed with http status 404: Not Found.
- tasks showed up for both prod servers in the CMS_WebFarmTask table for Document sync
- In the CMS_WebFarmServerTask table, I see some error's saying the License Webfarm server count exceeded. Checked all of my licenses and they all appear to be good. They are all set for 2 servers and I am running 2 servers.

Media Library
- created a 1kb text file for testing and uploaded in staging
- ran sync, no errors
- See the file on 1 server, not the other
- look in CMS_WebFarmTask table and I only see tasks related to the server that it published to.

Should I open a support ticket for this?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 10/16/2013 11:51:32 AM
   
RE:Web Farm - Media Library File Upload Sync Issue
Define your servers manually. This resolved the problem for me in regards to licensing. I had a test environment (2 server farm) and 3 developers developing locally with code on their desktop connecting to the test database and Kentico was seeing 5 servers in the farm causing licensing issues. When developing locally you will have to comment out the server names in your web.config file.

User avatar
Member
Member
TimmyB - 10/16/2013 11:54:06 AM
   
RE:Web Farm - Media Library File Upload Sync Issue
I tried to define them manually on the staging server and everything looked fine but I got errors when publishing. I had my IT guy open the firewall to the IP addresses of the machines and went in that route. The IP's matched what shows up in the CMS_WebFarmServer table too. Let me see if I can find the error that I got.

User avatar
Member
Member
TimmyB - 10/16/2013 11:59:16 AM
   
RE:Web Farm - Media Library File Upload Sync Issue
I switched it back over to use the IP's and I get this(timtest is the name of the content document I changed, not a media library file):
Dependent task 'Publish document timtest' failed:Synchronization client error: Exception occurred: The request failed with the error message:
--
Object movedObject moved to here.

User avatar
Member
Member
TimmyB - 10/16/2013 6:29:57 PM
   
RE:Web Farm - Media Library File Upload Sync Issue
Found the issue, inadvertently added the staging server as a web farm server and that caused it to try and sync over to a server that wasn't part of the webfarm. Thanks to John at Kentico Support for helping me figure this one out.