locked
Can't uninstall service bus RRS feed

  • Question

  • Hi,

    When trying to uninstall Service Bus i get this error:

    "This computer is part of a farm. To uninstall, first leave the farm either using 'Leave from Farm' option in Service Bus Configuration tool or Remove-SBHost cmd-let in PowerShell."

    When trying the Remove-SBHost powershell command I get this error:

    "Remove-SBHost : Certificate requested with thumbprint EC808B911009F8A8E21FE73DE5216E6B596527F4 not found in the certificate store LocalMachine\My."

    When trying to open the configuration tool it just craches with this information in the eventlog:

    Application: Microsoft.ServiceBus.ConfigWizard.exe
    Framework Version: v4.0.30319
    Description: The process was terminated due to an unhandled exception.
    Exception Info: System.Windows.Markup.XamlParseException

    How can I uninstall the Service Bus?


    TR

    Monday, February 4, 2013 1:36 PM

Answers

  • Hi,

    I also got the two above suggestions from Microsoft and it didnt work. They finally sent me this information which works:



    TR

    • Marked as answer by Thomas_R Tuesday, February 19, 2013 7:14 AM
    Tuesday, February 19, 2013 7:14 AM

All replies

  • Hi Thomas

    Was the certificate removed manually from the store?

    Best Regards

    Narasimhan

    Wednesday, February 6, 2013 8:14 PM
  • Hi,

    yes probably it was removed manually by me but I'm not 100% sure. Does it matter? I just want to know how I can solve this problem because now I can't manage the Bus at all. If something like this happens in production and it can't be resolved then we are in big troubble.

    //Thomas


    TR

    Thursday, February 7, 2013 9:49 AM
  • Hello Thomas

    Please run the following cmdlet in the Service Bus Powershell window

    Set-SBCertificateAutogenerationKey -IgnoreEncryptionError.

    This would re-generate the cert and you can Leave-farm from the configuration wizard

    Please let me know if you are unblocked.

    Best Regards

    Narasimhan

    Thursday, February 7, 2013 9:18 PM
  • Hi Narasimhan,

    It didnt help. Same error :-(

    //Thomas


    TR

    Monday, February 11, 2013 2:59 PM
  • I have the exact same error :(

    Accidentally removed the certs. and now I'm stuck with this dumb thumbprint error.

    Anyone have a solution?

    Wednesday, February 13, 2013 1:09 PM
  • Hi Gustav,

    I have a case open against MS now. I will let you know when I got the solution.

    //Thomas


    TR

    Wednesday, February 13, 2013 1:58 PM
  • Apologies for the incorrect syntax earlier. Please try the following.

    In the Service Bus PS command prompt, do the following

    1. Run,  $mycert=ConvertTo-SecureString -string <password> -force –AsPlainText
    2. Then, Set-SBCertificateAutogenerationKey -Key $mycert

    You should be able to Leave Farm from the configuration wizard after this.

    Please let me know if this resolves the issue.

    Wednesday, February 13, 2013 6:25 PM
  • Apologies for the incorrect syntax earlier. Please try the following.

    In the Service Bus PS command prompt, do the following

    1. Run,  $mycert=ConvertTo-SecureString -string <password> -force –AsPlainText
    2. Then, Set-SBCertificateAutogenerationKey -Key $mycert

    You should be able to Leave Farm from the configuration wizard after this.

    Please let me know if this resolves the issue.

    Thx for the reply! But, tried it and get same error as before :(

    "Set-SBCertificateAutogenerationKey : Certificate requested with thumbprint A37B18D5267D2B5C643AE8D912ECD959A0BF80C8 not found in the certificate store LocalMachine\My."

    Thursday, February 14, 2013 11:06 AM
  • Hi,

    I also got the two above suggestions from Microsoft and it didnt work. They finally sent me this information which works:



    TR

    • Marked as answer by Thomas_R Tuesday, February 19, 2013 7:14 AM
    Tuesday, February 19, 2013 7:14 AM
  • Worked like a charm! Thanks!
    Friday, February 22, 2013 8:22 AM
  • The following steps worked for me. 

    1. Delete Registry key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Service Bus]

    2. Delete folder C:\\Program Files\\Service Bus\\1.0\ or the installation path folder

    3. Now, uninstall service bus from control panel..

    For further installation:

    4. Restart machine.

    4.1. If you still see, Service bus gate way service on services.msc, remove registry key  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Service Bus Gateway

    4.2 restart machine

    5. Install Service bus again

    6. Once SB installed on machine, join the farm again using service bus configuration wizard or through SB powershell command

    • Proposed as answer by Lehus Monday, March 31, 2014 5:53 PM
    Tuesday, April 2, 2013 8:13 AM
  • Muchas Gracias fue de gran ayuda

    Gvega

    Wednesday, February 26, 2014 5:58 PM
  • I know this is an old post - however having recently come across this myself here's what I figured out you can do:

    Open regedit.exe -> LOCAL_MACHINE -> Software -> Microsoft -> Service Bus 1.1

    Delete every entry except the following: 

    - (Default)

    - INSTALLDIR

    - Locale

    - Version

    - WinFabric

    You will now be able to launch Service Bus Configuration, however you will not be able to add your machine back to the farm because the farm already thinks it exists. To solve this issue:

    In your SQL Server Instance that your farm is tied to, go into your Service Bus Management Database that was created (this will be whatever you named it or default SBManagementDatabase).

    If you query the nodes table you should see your machine name listed. 

    Delete this row - it will perform a cascade delete and remove all other references to the machine. 

    Once completed, you will be able to re-add your machine to the farm.

    Hope this helps someone out!


    

    • Proposed as answer by Raks77 Thursday, September 19, 2019 8:21 AM
    Tuesday, February 3, 2015 4:30 PM
  • Perfect!  I had accidentally deleted my certificates and nothing else worked.  I kept trying to start Service Bus Configuration and it just kept disappearing until I deleted the registry entries.

    Thank you Thank you Thank you!

    Monday, September 21, 2015 9:04 PM
  • Your suggestion is a life saver thank you.

    Tuesday, May 3, 2016 5:35 PM
  • a_minner !  You saved the day.  How the heck did you figure that out?

    Friday, October 7, 2016 3:50 PM
  • Worked, thank you!
    Friday, November 25, 2016 7:22 PM
  • Solution propsed by "a_minner" is the identical one. You don't have to uninstall the whole sb and go for another installation, as other solutions on the web suggested. 

    By deleting the specific reg keys, you manage to run configuration wizard indeed. That's the most important part of the solution. 

    Having myself an expired certificate, I could not do anything. Neither run the configuration wizard, nor run any powershell command to establish a new and valid certificate.

    The only part in which I had to follow another path, was the one of dealing with the db. In my case, I did not want to re-join the farm, because this meant that you keep the same certificate: remember, my certificate was expired, so that was not the best solution for me. So, I deleted all 3 tables in the db that had to do with the service bus. By doing this, I had the opportunity to create a new farm, which led to the auto-generation of a new and valid certificate. Success! My service bus was once again up and running, having created a new farm, with a new and valid certificate.

    Of course you should always backup in case things do not work for you. That is, export the reg keys before deleting them and backup the 3 tables on the db.

    As a conclusion, this is the BEST solution so far, in case you have an expired certificate. Having an expired certificate is really a nightmare, since service bus literally does not allow you to do anything. All powershell commands (along with attempting to use  configuration wizard) end up with the same error: "Certificate.... not found in...."

    Well done! 


    • Edited by Raks77 Thursday, September 19, 2019 8:43 AM
    Thursday, September 19, 2019 8:42 AM