There was an error connecting to NSX manager API

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:


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.


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.


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


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.


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.



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 has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon 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.

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.