Author Topic: Replication question  (Read 19109 times)

0 Members and 1 Guest are viewing this topic.

Offline 10nico

  • Jr. Member
  • **
  • Posts: 49
  • I'm a gnu!
Replication question
« on: June 21, 2006, 05:27:42 PM »
Hi all.
The company I work for recently acquired a package of 380 Advanced Suite licenses.
Since our network topology comprises various remote locations connected by slow WAN links, I decided to deploy what in the ADNM manual is called "Multi-AMS model".
I started installing the "root" AMS and verified it works correctly. (did some push installs along with policy changes and all works perfectly).
Then I went to deploy the first "leaf" AMS following the instructions in the manual.
It installed ok, and I was able to do the "Subscribe to Root AMS" step.
The leaf server correctly appeared on the root console.
Then I started a replication task as stated in the manual and it went (seemingly) ok.
The question is: is it normal that on the leaf console I don't see any of changes I made/make on the root console?
Shouldn't replication create an exact copy of everything (catalog/policies/schedules/ecc ecc) on the leaf server database?
Also, if instead is normal that I don't see anything on the leaf console, is it a safe practice to start creating another catalog on the leaf console?
I mean, I start adding (and deploying to) pc's that belong to the remote leaf AMS and treat the leaf console as a separate entity.

Please forgive the lenght of this post but I'm a little clueless and don't want to mess it up.

Thank you all

          Michele
Live long and prosper

Offline Vlk

  • Global Moderator
  • Serious Graphoman
  • **
  • Posts: 11665
  • Please don't send me IM's. Email only. Thx.
    • ALWIL Software
Re: Replication question
« Reply #1 on: June 21, 2006, 05:59:28 PM »
Hello, and welcome to the avast forum

Quote
The company I work for recently acquired a package of 380 Advanced Suite licenses.

Congratulations. BTW was this a direct purchase, or did you buy the software via one of our resellers?

Quote
Since our network topology comprises various remote locations connected by slow WAN links, I decided to deploy what in the ADNM manual is called "Multi-AMS model".
I started installing the "root" AMS and verified it works correctly. (did some push installs along with policy changes and all works perfectly).
Then I went to deploy the first "leaf" AMS following the instructions in the manual.
It installed ok, and I was able to do the "Subscribe to Root AMS" step.
The leaf server correctly appeared on the root console.
Then I started a replication task as stated in the manual and it went (seemingly) ok.

OK, good so far...

Quote
Then I started a replication task as stated in the manual and it went (seemingly) ok.
The question is: is it normal that on the leaf console I don't see any of changes I made/make on the root console?
Shouldn't replication create an exact copy of everything (catalog/policies/schedules/ecc ecc) on the leaf server database?


During the FIRST RUN of the replication task, the database from the ROOT server will be copied to the LEAF server. I.e. all data stored in the LEAF server's database will be lost (replaced by the data from the root server).

On each successive run, however, the replication task should do a "merge" -- i.e. it should basically copy new things from ROOT to LEAF, AND from LEAF (leaves) to ROOT. Of course, if there's a conflict, the process needs to decide what to keep, but that's not the case we're dealing with here...


BTW, are you using the latest version of the ADNM? Because just about a week ago, a new version was released, and it is supposed to fix a number of bugs with respect to the multi-AMS model.


Thanks
Vlk
If at first you don't succeed, then skydiving's not for you.

Offline 10nico

  • Jr. Member
  • **
  • Posts: 49
  • I'm a gnu!
Re: Replication question
« Reply #2 on: June 21, 2006, 06:21:26 PM »
Quote
Hello, and welcome to the avast forum
Thank you Vlk! ^_^
Nice to be here!

Quote
Quote
The company I work for recently acquired a package of 380 Advanced Suite licenses.

Congratulations. BTW was this a direct purchase, or did you buy the software via one of our resellers?

We had to buy from a local reseller since we're a government institution and can't buy online.

Quote
During the FIRST RUN of the replication task, the database from the ROOT server will be copied to the LEAF server. I.e. all data stored in the LEAF server's database will be lost (replaced by the data from the root server).

And if so, why on the leaf server console I don't see anything of what I've got on the root server?
I mean nothing, no computers in the catalog, no schedules, no policies, nothing.
Is this ok?

Quote
On each successive run, however, the replication task should do a "merge" -- i.e. it should basically copy new things from ROOT to LEAF, AND from LEAF (leaves) to ROOT. Of course, if there's a conflict, the process needs to decide what to keep, but that's not the case we're dealing with here...

This sounds perfectly right.

Quote
BTW, are you using the latest version of the ADNM? Because just about a week ago, a new version was released, and it is supposed to fix a number of bugs with respect to the multi-AMS model.

Yes, I had an old copy on my hard drive, but before installing I checked the ADNM changelog and noticed it had just been updated, so I redownloaded it before starting the deployment.

By the way, I'm about to deploy to a remote server from the leaf console, just to see if that piece of the catalog I'm about to create will appear on the root console (hope so!!).

Thank you

Michele
Live long and prosper

Offline Vlk

  • Global Moderator
  • Serious Graphoman
  • **
  • Posts: 11665
  • Please don't send me IM's. Email only. Thx.
    • ALWIL Software
Re: Replication question
« Reply #3 on: June 21, 2006, 06:29:32 PM »
Quote
And if so, why on the leaf server console I don't see anything of what I've got on the root server?
I mean nothing, no computers in the catalog, no schedules, no policies, nothing.
Is this ok?

That's not OK... There must be some kind of a problem with the replication. I suppose you tried to run the replication more than once (?).

BTW are you using MSDE or full SQL?
Also, could you please have a look in the file <ADNM>\data\log\error.log (on both the root and the leaf), if there's something relevant?


Grazie & ciao, :)
Vlk
If at first you don't succeed, then skydiving's not for you.

Offline 10nico

  • Jr. Member
  • **
  • Posts: 49
  • I'm a gnu!
Re: Replication question
« Reply #4 on: June 21, 2006, 06:47:33 PM »
Quote
That's not OK... There must be some kind of a problem with the replication. I suppose you tried to run the replication more than once (?).
As a matter of fact, I tried some times and it kept ending with "unknown error".
So I checked on the services console and noticed the SQLServer Agent wasn't started so I started it.
Then I repeated the replication task and it went ok without errors.

But nothing appeared on the leaf server.

So I tried to schedule the replication and tried both making it run on the root server and on the leaf server.
It seemed to run withouth error both times. (but there's nothing new on the leaf)

Quote
BTW are you using MSDE or full SQL?
Both servers use MSDE installed by the ADNM setup.

Quote
Also, could you please have a look in the file <ADNM>\data\log\error.log (on both the root and the leaf), if there's something relevant?

On the root I have this:

21/06/2006   16.42.10   1150900930   SYSTEM   2688   Database command failed [CServer::ReplicateServer, 80040E14]: SQLServerAgent is not currently running so it cannot be notified of this action. 
21/06/2006   16.43.30   1150901010   SYSTEM   2688   Database command failed [CServer::ReplicateServer, 80040E14]: SQLServerAgent is not currently running so it cannot be notified of this action. 
21/06/2006   16.45.55   1150901155   SYSTEM   2688   Database command failed [CServer::ReplicateServer, 80040E14]: SQLServerAgent is not currently running so it cannot be notified of this action. 

On the leaf I have this:

6/21/2006   4:59:37 PM   1150901977   SYSTEM   2784   Database command failed [CServer::UploadFile, 80040E2F]: The statement has been terminated. 
6/21/2006   4:59:37 PM   1150901977   SYSTEM   2784   Database command failed [CServer::UploadFile, 80040E2F]: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_File_Object'. The conflict occurred in database 'avast', table 'Object', column 'Id'. 
6/21/2006   4:59:37 PM   1150901977   SYSTEM   2784   Database command failed [CServer::UploadFile, 80040E2F]: The statement has been terminated. 
6/21/2006   4:59:37 PM   1150901977   SYSTEM   2784   Database command failed [CServer::UploadFile, 80040E2F]: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_File_Object'. The conflict occurred in database 'avast', table 'Object', column 'Id'. 
6/21/2006   5:28:40 PM   1150903720   SYSTEM   2784   Database command failed [CServer::UploadFile, 80040E2F]: The statement has been terminated. 
6/21/2006   5:28:40 PM   1150903720   SYSTEM   2784   Database command failed [CServer::UploadFile, 80040E2F]: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_File_Object'. The conflict occurred in database 'avast', table 'Object', column 'Id'. 
6/21/2006   5:28:40 PM   1150903720   SYSTEM   2784   Database command failed [CServer::UploadFile, 80040E2F]: The statement has been terminated. 
6/21/2006   5:28:40 PM   1150903720   SYSTEM   2784   Database command failed [CServer::UploadFile, 80040E2F]: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_File_Object'. The conflict occurred in database 'avast', table 'Object', column 'Id'. 

It seems something is wrong...

P.S: I also tried to check with SQL Server Enterprise Manager and...well I don't understand what I see!
I have to admit I never replicated an MSSQL database before , only did some backups and created some views).

Quote
Grazie & ciao, :)
Vlk


Thanks for your patience!

Michele

P.S: I won't deploy that remote server I mentioned before to not to add new variables to this equation 8-)

CIAO!
Live long and prosper

Offline Vlk

  • Global Moderator
  • Serious Graphoman
  • **
  • Posts: 11665
  • Please don't send me IM's. Email only. Thx.
    • ALWIL Software
Re: Replication question
« Reply #5 on: June 21, 2006, 07:00:22 PM »
I'd suggest the following:

1. make sure the SQLServerAgent service is running on both servers (have no idea why it wasn't running before)

2. on the LEAF server:
  • Close the console
  • Start the AMS Maintenance Tool, and do the following:
    • Delete database
    • Create database

3. On the ROOT server, try running the replication task once more. This should push the snapshot to the newly created leaf server database...


Thanks
Vlk
If at first you don't succeed, then skydiving's not for you.

Offline Vlk

  • Global Moderator
  • Serious Graphoman
  • **
  • Posts: 11665
  • Please don't send me IM's. Email only. Thx.
    • ALWIL Software
Re: Replication question
« Reply #6 on: June 21, 2006, 07:02:34 PM »
BTW I'm sorry to say that but I hope we'll beat you (I mean squadra azzura) tomorrow... :P ;D
If at first you don't succeed, then skydiving's not for you.

Offline 10nico

  • Jr. Member
  • **
  • Posts: 49
  • I'm a gnu!
Re: Replication question
« Reply #7 on: June 21, 2006, 07:26:02 PM »
I did as you told me, now I have:

- ROOT's console reports replication finished without problems
- No new errors on the ROOT error.log
- new errors on the LEAD error.log as follows

6/21/2006   7:04:56 PM   1150909496   SYSTEM   964   Database command failed [CServer::UploadFile, 80040E2F]: The statement has been terminated. 
6/21/2006   7:04:56 PM   1150909496   SYSTEM   964   Database command failed [CServer::UploadFile, 80040E2F]: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_File_Object'. The conflict occurred in database 'avast', table 'Object', column 'Id'. 
6/21/2006   7:04:56 PM   1150909496   SYSTEM   964   Database command failed [CServer::UploadFile, 80040E2F]: The statement has been terminated. 
6/21/2006   7:04:56 PM   1150909496   SYSTEM   964   Database command failed [CServer::UploadFile, 80040E2F]: INSERT statement conflicted with COLUMN FOREIGN KEY constraint 'FK_File_Object'. The conflict occurred in database 'avast', table 'Object', column 'Id'.

WSUS-TEST is the ROOT
SRV-ASL04 is the LEAF

- and on the SQL Server Enterprise Manager console, connecting to the ROOT MSDE -> Avast -> Replication Monitor -> Publishers -> WSUS-TEST\AVAST -> policy publication:avast reports this:
Snapshot = never started
SRV-ASL04\AVAST : type = push , status = running , last action = connecting to publisher WSUS-TEST\AVAST , action time 19:04:59:920 , start time 19:04:59:973 , duration 00:00:00 , delivery rate 0,00 rows/sec.

I refreshed a lot of times and it still reports as running but no update occurs (no change on the SQL console, no change on the LEAF console).
I'm very curious on why "Snapshot = never started"...mmmhhh....

I'm in your hands Vlk.

Michele
Live long and prosper

Offline 10nico

  • Jr. Member
  • **
  • Posts: 49
  • I'm a gnu!
Re: Replication question
« Reply #8 on: June 21, 2006, 07:31:39 PM »
About the soccer thing: seeing how bad we played against USA I have to agree with you!  :'(

But more than the victory I hope to see an enjoyable match with LOTS of fair play!!!

About the SQL Server console, I updated again and here's what I have:

SRV-ASL04\avast:avast , type = push , status = failed , Last action = The agent is suspect. No response withing the last 10 minutes.

I'm clueless...

Live long and prosper

Offline Vlk

  • Global Moderator
  • Serious Graphoman
  • **
  • Posts: 11665
  • Please don't send me IM's. Email only. Thx.
    • ALWIL Software
Re: Replication question
« Reply #9 on: June 21, 2006, 07:39:31 PM »
OK, so you can access the server using Enteprise Manager. Very well then.

Try running the snapshot agent manually. It is possible that the initial DB snapshot was not created because the SQLAgent service was not running -- and hence, the replication itself now doesn't work.



About football: yeah, I pretty much agree. But we played MUCH WORSE with Ghana than you did with the US. So, it's going to be an interesting match... Seeing Nedved and DelPiero against each other, well, yummy... :)


BTW I have to run now (one of our colleages is getting merried on Saturday and is having a before-wedding party tonight; I can't miss that! ;D)


Cheers
Vlk
If at first you don't succeed, then skydiving's not for you.

Offline 10nico

  • Jr. Member
  • **
  • Posts: 49
  • I'm a gnu!
Re: Replication question
« Reply #10 on: June 21, 2006, 07:45:11 PM »
Quote
OK, so you can access the server using Enteprise Manager. Very well then.

Try running the snapshot agent manually. It is possible that the initial DB snapshot was not created because the SQLAgent service was not running -- and hence, the replication itself now doesn't work.

Makes sense to me  :)
I'm about to try, I'll keep you updated.

Quote
About football: yeah, I pretty much agree. But we played MUCH WORSE with Ghana than you did with the US. So, it's going to be an interesting match... Seeing Nedved and DelPiero against each other, well, yummy... :)

Good luck to both teams!  :)

Quote
BTW I have to run now (one of our colleages is getting merried on Saturday and is having a before-wedding party tonight; I can't miss that! ;D)

In this case, BEST WISHES to your colleague and HAVE A GOOD TIME to you! ^_^

Michele
Live long and prosper

Offline 10nico

  • Jr. Member
  • **
  • Posts: 49
  • I'm a gnu!
Re: Replication question
« Reply #11 on: June 22, 2006, 11:32:13 AM »
*** Update ***

Now replication seems to work and all objects appear correctly on the LEAF console.
Also, if I define something on the remote console, and wait the scheduled replication to occur (or force it manually), the modifications appear on the ROOT console too.

However , besides running the snapshot manually from SQL Srv console, I had to manually run the replication on the SQL console, only once.
After that the replications from AMS (both forced and scheduled) ran perfectly.

Thanks for your help Vlk!

Michele

Live long and prosper

Offline Vlk

  • Global Moderator
  • Serious Graphoman
  • **
  • Posts: 11665
  • Please don't send me IM's. Email only. Thx.
    • ALWIL Software
Re: Replication question
« Reply #12 on: June 22, 2006, 11:38:51 AM »
A bit strange -- but I'm glad it's working now.

Just a note: for the replication process to work well, we strongly recommend using a replication task (instead of running the replication agent directly from the Enterprise Manager).

This is because the replication task is performing some extra work. For example, it runs server tasks started on another AMS (but relevant to this AMS) and also tries to deal with merge conflicts (e.g. removes duplicate computers from the catalog etc).


Thanks
Vlk
If at first you don't succeed, then skydiving's not for you.

Offline r3flux

  • Jr. Member
  • **
  • Posts: 21
Re: Replication question
« Reply #13 on: June 22, 2006, 12:31:42 PM »
*** Update ***

Now replication seems to work and all objects appear correctly on the LEAF console.
Also, if I define something on the remote console, and wait the scheduled replication to occur (or force it manually), the modifications appear on the ROOT console too.

However , besides running the snapshot manually from SQL Srv console, I had to manually run the replication on the SQL console, only once.
After that the replications from AMS (both forced and scheduled) ran perfectly.

Thanks for your help Vlk!

Michele



Were you using sa as the user for the sql server or did you create another user?

Cheers

Offline 10nico

  • Jr. Member
  • **
  • Posts: 49
  • I'm a gnu!
Re: Replication question
« Reply #14 on: June 22, 2006, 09:26:46 PM »
Were you using sa as the user for the sql server or did you create another user?

Cheers

I'm using sa on both MSDE and with the same password on both.

Googling around I've seen some references to errors during replication due to using the LocalSystem account on the SQLServer Agent service...but here it seems to work with it.

Greetings and have a nice evening  :)

Michele
Live long and prosper