The Storage service is not initialized when clicking storage views with SQL Mirror configuration
search cancel

The Storage service is not initialized when clicking storage views with SQL Mirror configuration

book

Article ID: 309893

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article describes a specific issue. If you experience all of the below symptoms, consult the sections below. If you experience some, but not all of these symptoms, your issue is not related to this article. Search the Knowledge Base for your symptoms.

Symptoms:
  • The Storage view is not initialized when you click storage views with SQL Mirror configuration
  • In the C:\ProgramData\VMware\VMware VirtualCenter\Logs\sms.log file, you see entries similar to:

    YYYY-MM-DDTHH:MM:SS.Z [Thread-6] ERROR com.vmware.vim.sms.provider.VcProviderImpl - Failed populating service cache
    org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The connection to the named instance has failed. Error: java.net.SocketTimeoutException: Receive timed out.)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
    at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
    at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
    at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:615)
    at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:589)
    at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:118)
    at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:122)
    at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:99)
    at com.vmware.vim.sms.provider.VcProviderImpl.retrieveVcData(Unknown Source)
    at com.vmware.vim.sms.provider.VcProviderImpl.sync(Unknown Source)
    at com.vmware.vim.sms.ServiceImpl.syncServiceCache(Unknown Source)
    at com.vmware.vim.sms.ServiceImpl.init(Unknown Source)
    at com.vmware.vim.sms.ServiceImpl.access$100(Unknown Source)
    at com.vmware.vim.sms.ServiceImpl$ServiceInitializer.run(Unknown Source)
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the named instance has failed. Error: java.net.SocketTimeoutException: Receive timed out.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.getInstancePort(Unknown Source)
    at com.microsoft.sqlserver.jdbc.FailoverInfo.setupInfo(Unknown Source)
    at com.microsoft.sqlserver.jdbc.FailoverInfo.failoverPermissionCheck(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.loginWithFailover(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)
    at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
    at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
    at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)

  • You have already configured the C:\ProgramData\VMware\VMware VirtualCenter\vcdb.properties file.
  • vCenter Server database connectivity has already been verified
  • The VMware VirtualCenter Server service is started and running


Environment

VMware vCenter Server 5.0.x
VMware vCenter Server 5.5.x
VMware vCenter Server 4.1.x
VMware vCenter Server 5.1.x

Cause

This issue occurs when a SQL Mirror configuration is running. The VMware VirtualCenter Management Webservices uses JDBC to connect to the MS SQL server. This is different from vCenter Server that uses the ODBC layer paired with the SQL Native Client for connectivity.

Resolution

To workaround this issue:
  1. Upgrade the JDBC driver. SQL Mirroring is supported only with JDBC 3.0 and later.
  2. Use one of these methods in environments where database mirroring is involved:

    • For default instances of SQL server that are part of mirroring configuration, ensure that they are listening on the default port 1433 for TCP connections.
    • For named instances, ensure that SQL browser service is running and port 1434 is not blocked on the network and server B is not configured as a hidden instance. For more information, see Hide an Instance of SQL Server Database Engine.

  3. Specify failoverPartner=serverB\\serverBInstanceName in the JDBC connection string inside the C:\ProgramData\VMware\VMware VirtualCenter\vcdb.properties file.

    Sample entries in the vcdb.properties file appear similar to:

    url=jdbc:sqlserver:// SQL_ServerA_FQDN\\instance_name:port;databaseName\= vcdb_name;
    failoverPartner\=SQL_ServerB_FQDN\\instance_name;integratedSecurity\=true;
    driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
    dbtype=mssql

    Note: The integratedSecurity\=true implies that Windows authentication is used for the vCenter Server database. Changing this to false forces SQL authentication.