VMware

There was an error connecting to NSX manager API

Recently with connecting an API client to VMware NSX manager ran into- There was an error connecting to NSX manager API - resulted in an interesting find.

A quick issue I ran into yesterday connecting a restful API client to an NSX manager – “there was an error connecting”. ย As I had connected to this manager before using an API client, I knew that it was accessible at least at some point in the past. ย I covered all the bases of general connectivity troubleshooting at the network layer. ย However, this issue “there was an error connecting to NSX manager API” turned out to be something totally different.

There was an error connecting to NSX manager API

Below is the error received connecting with an API client to the NSX manager IP address:

nsxconerror01

After ruling out general network connectivity issues, I decided to take a look at the administrative interface of the NSX manager itself to see if there were any obvious errors. ย To do that simply browse to https://<nsx manager IP>. ย Underย componentsย andย NSX management service I saw aย disconnected error on theย Lookup service URL.

nsxconerror02

When I tried to reconnect the Lookup service URL, I received an errorย “Time is not synchronized between NSX Manager and vCenter Server.” ย It appears that time is not just important in Active Directory environments! ย Sure enough when looking under the general settings the NSX manager time was in the wrong time zone and incorrectly configured.

nsxconerror03

I simply had to edit the time settings and allow the manager to synchronize the correct time.

nsxconerror04

After setting up the time, I had to go back to the NSX Management service and reestablish connectivity for the Lookup service URL with vCenter. ย After this step was completed and I had the connected green light, I was ready to try connecting again.

nsxconerror06

Immediately, after the time issue was corrected on the server with time sync as well as the lookup service URL, the connection from my API client to the NSX manager started to work.

nsxconerror05

Thoughts

This illustrates in a vCenter environment, it is important to make sure that time synchronization is configured correctly. ย Most enterprise systems whether it be Microsoft, VMware or others, start having issues with systems reporting different times. ย So if you receive the error:ย There was an error connecting to NSX manager API, once you rule out general connectivity issues, your problem may be with your time configuration. ย Hope this helps someone else out there who may run into this issue.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.