4

My servicebus has an expired certificate. So I would like to change it.

I have tried the following

PS C:\Program Files\Service Bus\1.0> Set-SBCertificate -SBFarmDBConnectionString
 'Data Source=MYDBSERVER\MYINSTANCE;Initial Catalog=SbManagementDB;Integrat
ed Security=True' -FarmCertThumbprint 'dac7fc30d5c534a151d3f21cbdee557ea9abfdfa'

Set-SBCertificate : Certificate requested with thumbprint
6450F755020335011BC6D6B5522675DCF15EC94A not found in the certificate store
LocalMachine\My.

6450F755020335011BC6D6B5522675DCF15EC94A is the thumbprint of the expired certificate

I've tried following this article. But after running certutil -repairstore my “serialnumber” and get-sbfarm I once again get:

get-sbfarm : Certificate requested with thumbprint
6450F755020335011BC6D6B5522675DCF15EC94A not found in the certificate store
LocalMachine\My.
At line:1 char:1
+ get-sbfarm

So, how can I change an expired certificate for ServiceBus ?

2
  • I ended up reinstalling Workflow Manager e Service Bus.
    – Gyonder
    Aug 16, 2018 at 14:26
  • Any other solution apart from re-installing Workflow Manager?We are facing similar issue on our production environment Dec 13, 2018 at 11:33

2 Answers 2

1

I used the below method to change the certificate without any issues. Harber explain very well in his blog post. You can try the below powershell:

#load up the Service Bus PoSh
Import-Module ServiceBus
#grab the certificate based on it's friendly name
$friendlyName = "wfmSanCert"
$cert = dir Cert:\LocalMachine\My | ? {$_.FriendlyName -eq $friendlyName}
# configure the certificates
Set-SBCertificate -FarmCertificateThumbprint $cert.Thumbprint -EncryptionCertificateThumbprint $cert.Thumbprint
# stop the service bus farm
Stop-SBFarm -Verbose
#update the service bus host(s)
Update-SBHost
Start-SBFarm
2
  • 3
    Thanks but it doesn't seem to work when the certificate is already expired. If I try what you suggest the same comes up: Set-SBCertificate : Certificate requested with thumbprint 6450F755020335011BC6D6B5522675DCF15EC94A not found in the certificate store LocalMachine\My.
    – Gyonder
    Aug 16, 2018 at 13:13
  • You may need to change the time on the machine back to the period when the certificate was valid and update it after.
    – Roman
    Dec 23, 2021 at 12:52
0

There are 2 possible ways to update expired certificate

  1. Rollback VM and Server time to moment when certificate was valid and perform Powershell actions to update cert. It worked for me.
  2. Reinstall Workflow Manager

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.