We recently added clustering to one of our environments. This resulted in some replication conflicts/problems due to agents modifying (new and modified) documents on two servers.
The simplest solution to the problem I could come up with was to add a computed field, originating_server, with value=@ServerName.
Then in the agent:
Set doc = col.getFirstDocument()
While Not doc Is Nothing
If Join( Evaluate( |(originating_server = @ServerName)|, doc ) ) = 0 Then
'Document modified on another server
Call session.updateProcessedDoc( doc )
Set doc = col.getNextDocument( doc )
Update: To avoid leading people on a harder track than need be. If your app is located on a single server/single cluster, use Run on -> [Your server] in the Agent Schedule settings.
Or, as DiDu suggests, check if the agent is running on the Administration Server/stop it if not. Set the Administration Server in the ACL-dialogue, under Advanced.
The apps I had problems with are all from the same template, running in two distinct environments (separate NAB/Notes domain).