Replication agents may fail with error "Server '(servername)' is not registered at server '(servername)'."

Symptoms

One or more replication agents are failing with below error in verbose log

<verbose log>

OLE DB distributor 'SQLGUYDISTRIB': execute sp_server_info 18

ANSI codepage: 1

OLE DB Distributor 'SQLGUYDISTRIB': select datasource, srvid from master..sysservers where upper(srvname) = upper(N'SQLGUYPUB')

Agent message code 20053. Server 'SQLGUYPUB' is not registered at server 'SQLGUYDISTRIB'.

Repl Agent Status: 6

ErrorId = 4, SourceTypeId = 2

ErrorCode = '20053'

ErrorText = 'Server 'SQLGUYPUB' is not registered at server 'SQLGUYDISTRIB'.'

Adding alert to msdb..sysreplicationalerts: ErrorId = 4,

Transaction SeqNo =, Command Id = -1

Message: Replication-Replication Distribution Subsystem: agent (null) failed. Server 'SQLGUYPUB' is not registered at server 'SQLGUYDISTRIB'. Disconnecting from OLE DB Subscriber 'SQLGUYSUB'

</verbose log>

Cause

On Distributor server, the permission on publisher linked server to establish connection is set to "Not be made"

Resolution

On distributor server, the proxy account of replication agent's job should have access to linked server created for publisher. Make sure that when you connect to distributor server using credentials of replication agent's job proxy account, you should be able to see publisher server in sysservers table or in linked servers folder in object explorer.

Set the publisher linked server security to "Be made using the login's current security context"