{"id":1233,"date":"2021-09-20T14:00:45","date_gmt":"2021-09-20T19:00:45","guid":{"rendered":"http:\/\/zewwy.ca\/?p=1233"},"modified":"2021-11-09T19:23:47","modified_gmt":"2021-11-10T01:23:47","slug":"fixing-vcenter-500-an-error-occurred-while-fetching-identity-providers","status":"publish","type":"post","link":"https:\/\/zewwy.ca\/index.php\/2021\/09\/20\/fixing-vcenter-500-an-error-occurred-while-fetching-identity-providers\/","title":{"rendered":"Fixing vCenter [500] An error occurred while fetching identity providers."},"content":{"rendered":"<h1 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Story\"><\/span>Story<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>So The other day I posted about <a href=\"http:\/\/zewwy.ca\/index.php\/2021\/09\/15\/upgrade-and-migrate-a-vcenter-server\/\">upgrading vCenter to 7.0.x<\/a> while everything went fine during the upgrade. For some odd reason a couple days later when I went to navigate to the vCenter login page I was greeted with:<\/p>\n<pre>[500] An error occurred while fetching identity providers.<\/pre>\n<p>Kind of wished I had <a href=\"https:\/\/www.reddit.com\/r\/vmware\/comments\/m1dutq\/update_to_vcenter_702_broke_my_instance_shows_an\/\">read this reddit post<\/a> right off the hop, cause the first reply was is going to be my answer at the end of this post.<\/p>\n<p>I did however first hit <a href=\"https:\/\/kb.vmware.com\/s\/article\/83161\">this KB about it as well<\/a> I was a bit thrown off has it indicated to only do it if you see the following in the logs:<\/p>\n<p>(\/var\/log\/vmware\/trustmanagement\/trustmanagement-svcs.log)<\/p>\n<pre>2021-03-10T09:27:03.474Z [tomcat-exec-14 \u00a0INFO \u00a0com.vmware.identity.token.impl.X509TrustChainKeySelector \u00a0opId=]\u00a0<b>Failed to find trusted path to signing certificate<\/b>\u00a0&lt;<i>STS Certificate Subject, example - C=US,CN=ssoserverSign\\,dc\\=vsphere\\,dc\\=local<\/i>&gt;\r\njava.security.cert.CertPathBuilderException:\u00a0<b>Unable to find certificate chain<\/b>.<\/pre>\n<p>Which I could not see, so I wasn&#8217;t sure if this was the issue or not. What I did see in my logs was the following:<\/p>\n<pre>2021-09-17T23:58:03.945Z [tomcat-exec-14 WARN com.vmware.vcenter.trustmanagement.impl.VcIdentityProviders opId=] com.vmware.sso.interop.ldap.NoSuchObjectLdapException: No such object\r\nLDAP error [code: 32]\r\n\r\nand\r\n\r\n2021-09-18T01:19:01.322Z [tomcat-exec-26 INFO com.vmware.vapi.security.AuthenticationFilter opId=] Not successful authentication\r\njava.lang.RuntimeException: Authentication data not found\r\nCaused by: com.vmware.vapi.dsig.json.SignatureException: Cannot verify the signature over the provided data<\/pre>\n<p>So it wasn&#8217;t matching. Looking at my firewall I couldn&#8217;t see any LDAP connections from vCenter to my LDAP server since the upgrade. So I decided instead to try a reboot. This simply made things worse.<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"No_Healthy_Upsteam\"><\/span>No Healthy Upsteam<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Now when I&#8217;d try access vCEnter Web UI I was greeted with a blank white web page with simple text stating &#8220;No Healthy Upstream&#8221;, now looking into this, people reached this problem for several different reasons. As mentioned <a href=\"https:\/\/communities.vmware.com\/t5\/vCenter-Server-Discussions\/vCenter-7-Bug-No-Healthy-Upstream\/td-p\/2286782\">here<\/a> and <a href=\"https:\/\/communities.vmware.com\/t5\/vCenter-Server-Discussions\/vCenter-7-error-no-healthy-upstream\/td-p\/1869890\">here<\/a> and for <a href=\"http:\/\/vcloud-lab.com\/entries\/vcenter-server\/vmware-vcenter-server-error-no-healthy-upstream-\">some odd reason this guy just changed his IP address<\/a>?! Weird.<\/p>\n<p>For me I checked the local Hosts file and it was fine, and couple other mentioned fixes and they all didn&#8217;t work for me.<\/p>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Try_Anyway\"><\/span>Try Anyway<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For some reason at this point I decided to double the mentioned work around in the <a href=\"https:\/\/kb.vmware.com\/s\/article\/83161\">initial VMware KB<\/a> I found as the main login symptom was exactly the same even though I couldn&#8217;t validate the same log entries within the logs.<\/p>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"How_to_Copy_Files_to_VCSA_via_WinSCP\"><\/span>How to Copy Files to VCSA via WinSCP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Now a couple real quick things to note here. You need to copy a script to the VCSA. If you get unable to agree on a cipher suite, you&#8217;ll need to update your copy of WinSCP to a newer version. Also instead of doing what VMware says to change the shell on the VCSA, <a href=\"https:\/\/www.johnborhek.com\/vmware\/vmware-vsphere\/vmware-vcenter\/using-winscp-vmware-vcenter-server-appliance\/\">do what this guy suggests<\/a> instead:<\/p>\n<p>&#8220;In the new connection dialog, specify the Host name, User name and then click the Advanced button,<\/p>\n<p>(VCSA 6.5)<\/p>\n<p>Choose the Environment\/SFTP option<\/p>\n<p>Specify for SFTP server: shell \/usr\/libexec\/sftp-server&#8221;<\/p>\n<p>so much easier.<\/p>\n<p>I decided to take a look at the script after copying it to the VCSA, and it had this line which had me hopeful it would actually work to resolve my issue:<\/p>\n<pre>\/opt\/likewise\/bin\/ldapmodify -x -h localhost -p 389 -D \"cn=administrator,cn=users,$DOMAINCN\" -w \"$DOMAINPASSWORD\" -f sso-sts.ldif | tee -a $LOGFILE<\/pre>\n<p>So I followed along with the workaround specified in the KB&#8230;<\/p>\n<p>1) Download the attached fixsts.sh script from this article and upload to the impacted PSC or vCenter Server with Embedded PSC to the \/tmp folder.<\/p>\n<p>2) If the connection to upload to the vCenter by the SCP client is rejected, run this from an SSH session to the vCenter:<\/p>\n<pre>chsh -s \/bin\/bash<\/pre>\n<p>3) Connect to the PSC or vCenter Server with an SSH session if you have not already per Step 2.<\/p>\n<p>4) Navigate to the \/tmp directory:<\/p>\n<pre>cd \/tmp<\/pre>\n<p>5) Run chmod +x fixsts.sh to make the file executable.<\/p>\n<pre>chmod +x .\/fixsts.sh<\/pre>\n<p>6) Run .\/fixsts.sh.<\/p>\n<pre>.\/fixsts.sh<\/pre>\n<p>Restart services on all vCenters and\/or PSCs in your SSO domain by using below commands:<\/p>\n<pre>service-control --stop --all\r\nservice-control --start --all<\/pre>\n<p>my results:<\/p>\n<p><a href=\"https:\/\/i.imgur.com\/6i4vtUw.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/6i4vtUw.png\" alt=\"\" width=\"1347\" height=\"819\" \/><\/a><\/p>\n<p><a href=\"https:\/\/i.imgur.com\/BMlSqUx.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/BMlSqUx.png\" alt=\"\" width=\"558\" height=\"647\" \/><\/a><\/p>\n<p>To my Amazement it actually worked, and I was able to login into the vCenter server!! Wooo!<\/p>\n<p>*Update* <a href=\"https:\/\/vnote42.net\/2020\/04\/15\/replace-machine-certificate-in-vsphere-7\/\">Here&#8217;s a great blog post covering managing or creating custom certificates with vCenter 7<\/a><\/p>\n<p>Kinda funny that 7.0 is stated as 6.8 in the scripts.. mhmm<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Story So The other day I posted about upgrading vCenter to 7.0.x while everything went fine during the upgrade. For some odd reason a couple days later when I went to navigate to the vCenter login page I was greeted with: [500] An error occurred while fetching identity providers. Kind of wished I had read &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/zewwy.ca\/index.php\/2021\/09\/20\/fixing-vcenter-500-an-error-occurred-while-fetching-identity-providers\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fixing vCenter [500] An error occurred while fetching identity providers.&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[5,8],"tags":[105,375,16],"class_list":["post-1233","post","type-post","status-publish","format-standard","hentry","category-hypervisors","category-server-administration","tag-error","tag-identity-provider","tag-vcenter"],"_links":{"self":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1233","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/comments?post=1233"}],"version-history":[{"count":5,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1233\/revisions"}],"predecessor-version":[{"id":1287,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/1233\/revisions\/1287"}],"wp:attachment":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/media?parent=1233"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/categories?post=1233"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/tags?post=1233"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}