Troubleshoot vCloud Director Database Connection Issues


In my Last post Troubleshooting vCloud SSL Certificates Issue I have covered how to resolve the ssl certificates issue.

Once the certificate is accepted by the vCloud director configuration script the next thing is that it will ask you for the database connection details so that it can connect to vcloud database and configure it.

This was not end of life it seems as vCloud director has decided to test me one more time. This time I ran into database connection issue as the vCloud director server was unable to contact my database (MSSQL).

I have covered the database preparation steps in my post Configuring MSSQL Database for vCloud Director

I was getting the error as shown in below screenshot

db-1

I was getting a connection failure error as vCloud director setup was unable to reach my MSSQL database and I was getting socket timeout error. This was very annoying for me. I tried to telnet my server where MSSQL database is running (in my case it is running on same server where my vCenter server is running as I am using embedded SQL express as DB).

Telnet was not happening on the default port (1433) over which MSSQL listens. This was a bit strange. I decided to check on my vCenter server that whether or not it is listening on port 1433, and surprisingly it was not. I remember I haven’t changed any setting while SQL installation was in progress and went with default settings.

db-2

I have faced this kind of issue earlier so I was sure where I have to look for. The cause of this issue is that in protocol settings of MSSQL dynamic ports are selected instead of static (1433). All I needed was to change the port settings back to static from dynamic.

To do so I launched SQL Server Configuration Manager by typing mmc.exe on RUN and pressing Ctrl +M to Add/Remove new snap-in to mmc.

db-3

Pressing Ctrl + M will open a new window where you can select the snap-in which you want to add to mmc. In my case I had to select SQL Server Configuration Manager and click on Add> button to add.

db-4

Once the snap-in is added hit OK.

db-5

The next screen which pops-up will provide you options to configure your SQL server settings. To change the ports settings browse to SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for DB-Instance (VIM_SQLEXP in my case) and select TCP/IP and double click on it.

db-6

A new window will pop-up. Select “IP Addresses “tab and navigate to topmost bottom part to locate the settings named “IPALL

In below screenshot you can see dynamic port was set to 59677 and there was no value for TCP Port (static). This was the reason why my vCloud director was unable to reach my DB.

db-7

All I needed here is to put the value “0” in dynamic port and “1433” in TCP Port field and hit apply and ok.

db-8

Clicking on apply button will tell you that some settings can only take effect after restarting the SQL services.

db-9

Go to Services.msc and restart the SQL service from there and you are good to go.

After restarting I was able to listen on port 1433 on my localhost.

db-10

Now I wanted to test telnet from the vCloud Director server to verify it is reaching DB server now. Luckily that went well and I was able to connect on port 1433.

db-11

Now it was time to go back to the vcloud configuration script and finalize the installation.

Summary: The issue occurred because MSSQL was configured to listen on dynamic ports. As a best practice it is always advisable to check the port settings in advance prior to installing/configuring any application that will connect to your MSSQL database.

About Alex Hunt

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in VMware Software India Pvt Ltd as Operations System Engineer (vCloud Air Operations). I have around 5 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in vCloud Director, Vmware and tagged . Bookmark the permalink.

One Response to Troubleshoot vCloud Director Database Connection Issues

  1. Pingback: Building a Private Cloud with vCloud Director-Part 4: Installing vCloud Director | Go Virtual.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s