Mike's Virtualization Blog

Issue with SSO and SQL Express

This past week I was working with a large Telco on their first vSphere deployment. This particular deployment was with vSphere 5.1 and was a lot of fun getting to use some new features in the real world such as Auto Deploy Statefull Install, enhancements in the distributed switch, among others.

That’s not to say we didn’t have any issues along the way, which is were this post comes in. This environment is for a particular set of apps that will be running across 18 VM’s, not a large number by any means but the service this provider is selling is quite cool, you can read more about it here.

The provider wanted to keep all vCenter services in one VM and to use SQL Express, they were over the host limit, 2 management and 10 resource nodes, VM wise they are way under so we decided SQL Express would meet their needs for now and if they grew out the environment they would move to full SQL at that time.

The issue we ran into is when installing SSO with SQL Express the SSO install sees the port SQL Express is using at the time of install and configures its connection string with that port. SQL Express installs with the dynamic ports option which when the server is rebooted causes SSO to not be able to connect to its database which in turns means vCenter won’t start. In the imsSystem.log file you’ll see.

java.sql.SQLException: Network error IOException: Connection refused: connect

This is easily fixed by setting SQL to use a fixed port and reconfiguring the connection string for SSO. To set SQL Express to use a static port open up SQL Server Configuration Manager, expand SQL Server Network Configuration, click on Protocols for VIM_SQLEXP, on the right hand pane double click TCP/IP.


In the properties delete the 0 from dynamic ports and enter a port to use under TCP Port, something like the default SQL port of 1433 or any other available TCP port would work fine.

SQL Ports

Once you’ve made those changes restart the SQL service. Now we need to update SSO’s connection string and configuration. This is a two step process, first run:

c:\program files\VMware\Infrastructure\SSOServer\utils\ssocli configure-riat -a configure-db –database-host <database server> –database-port <port number> -m <master password>

Next open the file c:\program files\VMware\Infrastructure\SSOServer\webapps\lookupservice\WEB-INF\classes\config.properites and change the portNumber= part of the file to the port you used for SQL.

SSO config.properties

Restart the SSO service and all services will be able to connect to SSO and start normally.