Saturday 10 July 2021

Resolved: The subscription file failed to load for the following reason: The direct trust certificate of the subscribed Edge Transport server with thumbprint is a duplicate of the certificate of one of the HubTransport servers. Sharing the same certificate between Edge and Hub Transport

Issue:

Due to some issues, i had to re subscribe the edge server.

After creating the edge subscription file on the edge server with the following command.

New-EdgeSubscription –FileName “c:\EdgeSubFile.xml”

then copied the file "EdgeSubFile" to one mailbox server. and tried the following command.

New-EdgeSubscription -FileData ([byte[]]$(Get-Content -Path "c:\EdgeSubFile.xml" -Encoding Byte -ReadCount 0)) -Site "sitename"


 Getting the following Error:

The subscription file failed to load for the following reason: The direct trust certificate of the subscribed Edge Transport server with thumbprint

<Thumprint> is a duplicate of the certificate of one of the HubTransport servers. Sharing the same certificate between Edge and Hub Transport

servers is not allowed.

    + CategoryInfo          : InvalidOperation: (:) [New-EdgeSubscription], InvalidOperationException

Solution:

as mentioned in the error, the issue was with the SSL certificate, So after some searching on some forums, tried the following steps and the issue was resolved/successfully subscribed the edge.

On the edge server

  1. copy/backup of the currently used SSL certificate for SMTP services.
  2. delete that SSL
  3. import another SSL certificate to the personal store of that edge
  4. Enable that SSL for SMTP services
  5. i.e (Enable-ExchangeCertificate -Thumbprint <34434kklkjlkjkdkfjk> -Services SMTP) 
  6. restart the "Microsoft Exchange ADAM" service
  7. create the subscription file again (New-EdgeSubscription –FileName “c:\EdgeSubFile1.xml”)
  8. copy the file maibox server
on mailbox server
in exchange management shell use the following command for new sub subscription.
New-EdgeSubscription -FileData ([byte[]]$(Get-Content -Path "c:\EdgeSubFile.xml" -Encoding Byte -ReadCount 0)) -Site "sitename"
was successfully able to resubscribe
On the edge server

  1. delete the SSL certificate which we imported and assigned to SMTP services before for edge subscription
  2. So open mmc and delete that certificate.
  3. import the valid certificate which we want to use for SMTP services 
  4. enable that new certificate for smtp services 
  5. i.e (Enable-ExchangeCertificate -Thumbprint <34fdsf434kklkfdfjlkjkdkfjk> -Services SMTP)
  6. restart the "Microsoft Exchange ADAM" service on the edge server
on the mailbox server 
restart the Microsoft Exchange Transport and Microsoft Exchange EdgeSync services
Test the subscription with the following power shell commands 

Start-EdgeSynchronization -ForceUpdateCookie -ForceFullSync
should have result as success or inprogress like as below.
Result         : Success
Type           : Configuration
or 
Result         : InProgress
Type           : Recipients

Test-EdgeSynchronization
should have syncstatus Normal, like as below.
RunspaceId                  : 58fdsfad-dfds-4123-adf1-39a802dcd2bd
SyncStatus                  : Normal
UtcNow                      : 7/10/2021 3:55:35 PM

check mailflow/Queue
with get-Queue poweshell command