Starting VMware VirtualCenter Server service when using SQL authentication fails with the error: Login Failure, Failed to connect to database
search cancel

Starting VMware VirtualCenter Server service when using SQL authentication fails with the error: Login Failure, Failed to connect to database

book

Article ID: 310485

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • You cannot start the VMware VirtualCenter Server service when using Microsoft SQL authentication.
  • VMware VirtualCenter Server service fails to start.
  • In the C:\ProgramData\VMware\VMware Virtual Center\Logs\vpxd.log file, you see entries similar to:

    <time>.364-04:00 [03404 error 'Default'] [VpxdVdb::SetDBType]: Login failure - retrying once...
    <time>.364-04:00 [03404 error 'Default'] [VpxdVdb::SetDBType] Failed to connect to database: . Retry attempt: 1 ...
    <time>.364-04:00 [03404 error 'Default'] [VpxdVdb::SetDBType] Encountered login error. Subsequent connection attempt failed: 28000
    <time>.364-04:00 [03404 error 'Default'] [VpxdVdb::SetDBType] Aborting after 1 retries.
    <time>.364-04:00 [03404 error 'Default'] Error getting configuration info from the database
    02-05T<time>.712+08:00 [02364 error 'Default'] [VpxdVdb::SetDBType] Failed to connect to database: ODBC error: (08001) - [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [64]. . Retry attempt: 49 ..."

    </time></time></time></time></time></time>
  • In the Windows Event Viewer, the VMware VirtualCenter Server service reports an error similar to:

    The description for Event ID 1000 from source VMware VirtualCenter Server cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.


Environment

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

Cause

This issue occurs when:
  • The VMware VirtualCenter Server service is unable to communicate with the remote database.
  • There are authentication issues with the remote Microsoft SQL database when using SQL authentication.

Resolution

To resolve this issue, ensure you make these checks:

Verify the DSN

Ensure that the VMware VirtualCenter Server service can communicate with the remote Microsoft SQL server.
  1. In the Control Panel, navigate to Administrative Tools > Data Sources (ODBC) > System DSN.
  2. Select the vCenter Server DSN and click Configure.
  3. Verify the remote SQL server name, username, and default database.
  4. Test the connection to the SQL server.
  5. If it fails to connect, investigate the SQL user account used for this connection on the database server. For more information, see the Microsoft TechNet article Troubleshooting Server and Database Connection Problems.

    Note:The preceding link was correct as of May 29, 2015. If you find the link is broken, provide feedback and a VMware employee will update the link.

Verify Log on As in Windows for VMware VirtualCenter Server service

Ensure that the VMware VirtualCenter Server service is running as Local System.
  1. Click Start > Run, type services.msc, and click OK. The Services Management Snap-in opens.
  2. Right-click VMware VirtualCenter Server service and click Properties.
  3. Click the Log On tab.
  4. Verify and ensure that the Local System account option is selected.

Verify the database username in the registry

In some cases, the username for the database must be manually entered.

Note: This procedure modifies the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine.

The preceding link was correct as of August 14, 2013. If you find the link is broken, provide feedback and a VMware employee will update the link.
 
To manually enter the username for the database:
  1. Take a backup of the Windows registry before proceeding.
  2. Click Start > Run, type regedit, and click OK. The Registry Editor window opens.
  3. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\VMware Virtualcenter\DB.
  4. Edit Key 2 and enter the username in the value data field.

Reset the encrypted password found in the registry

Verify that the VMware VirtualCenter Server service can authenticate to the remote Microsoft SQL server.
 
  1. Open a command prompt as an administrator.
  2. Change to the vCenter Server directory by running the command:

    cd "C:\Program Files\VMware\Infrastructure\VirtualCenter Server"

    Where C:\ is the drive where vCenter Server is installed.
     
  3. Run the command:

    vpxd.exe -p
     
  4. Enter the same password that you used while verifying the DSN connection.
  5. Start the VMware VirtualCenter Server service. For more information, see Stopping, starting, or restarting vCenter services (1003895).


Additional Information

For more information, see the Microsoft Technet article Backing Up and Restoring the Registry.

Note: The preceding link was correct as of August 14, 2013. If you find the link is broken, provide feedback and a VMware employee will update the link.How to stop, start, or restart vCenter Server services
SQL 認証を使用している場合、VMware VirtualCenter Server サービスを起動するときに次のエラーで失敗する: ログイン失敗、データベースに接続できませんでした
在使用 SQL 身份验证时启动 VMware VirtualCenter Server 服务失败,并显示以下错误:登录失败,无法连接到数据库