Unable to get an exclusive access to the vCenter Server repository
search cancel

Unable to get an exclusive access to the vCenter Server repository

book

Article ID: 301440

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
  • You are unable to start the VMware VirtualCenter Server service.
  • The VMware VirtualCenter Server service fails to start.
  • vSphere Client locks up after loading.
  • You cannot get exclusive access to the vCenter Server repository.
  • vCenter Server shuts down.
  • This error appears in the vpxd logs on the vCenter Server:

    Unable to get exclusive access to VC repository. Please check if another VirtualCenter instance is running against the same database schema
     
  • This issue can occur when vCenter Server is backed by a Microsoft SQL or Oracle database
  • The vpxd.log file contains entries similar to:

    [08:29:33.211 01760 error 'App'] [Vdb::LockRepositoryHelper] SQLExecDirect failed: HY000:6550:ODBC error: (HY000) - [Oracle][ODBC][Ora]ORA-06550: line 1, column 203:
    PLS-00201: identifier 'DBMS_LOCK' must be declared
    ORA-06550: line 1, column 203:
    PL/SQL: Statement ignored
    ORA-06550: line 1, column 277:
    PLS-00201: identifier 'DBMS_LOCK' must be declared
    ORA-06550: line 1, column 260:
    PL/SQL: Statement ignored
    [08:29:33.227 01760 error 'App'] Unable to get exclusive access to VC repository. Please check if another VirtualCenter instance is running against the same database schema.

     
  • If vCenter Server is backed by an Oracle 10g or 11g database:
    The vpxd log contains the entry:

    SQLExecDirect failed: HYT00:1013:ODBC error: (HYT00) - [Oracle][ODBC][Ora]ORA-01013: user requested cancel of current operationORA-06512: at "SYS.DBMS_LOCK", line 209ORA-06512 at "SYS.DBMS_LOCK", line 214ORA-06512
     
  • Prior to this issue, database performance slows and the database stops accepting connections. The vpxd log contains entries similar to:

    [23:42:49.743 14116 warning 'VpxdMoLock' opID=HB-host-99760@6254 ] ***WARNING*** Lock domain-XXXXX mode EXCLUSIVE held for 21307 ms
    [23:42:49.743 14116 warning 'VpxdMoLock'
    opID=HB-host-99760@6254 ] ***WARNING*** Lock host-XXXXX mode EXCLUSIVEALL held for 21307 ms
    [04:01:39.827 04780 error 'App'] [HttpUtil::ExecuteRequest] Error in sending request - No connection could be made because the target machine actively refused it.
    [08:00:01.186 20008 warning 'ProxySvc Req05432'] Error reading from client while waiting for header: class Vmacore::SystemException(The specified
    network name is no longer available. )


    Note: For more information on the location of the vpxd.log file, see Location of vCenter Server log files (1021804)


Environment

VMware vCenter Server 5.1.x
VMware vCenter Server 5.5.x
VMware vCenter Server 4.1.x
VMware vCenter Server 4.0.x
VMware VirtualCenter 2.0.x
VMware VirtualCenter 2.5.x
VMware vCenter Server 5.0.x

Resolution

This issue can occur if open connections to the database prevent the exclusive access that vCenter Server requires on the entire database when it starts or fails to start.

To clear open connections to the database:
  1. Verify that only one instance of vCenter Server is trying to access the vCenter Server database. You see this error if vpxd.exe is run from the command line and you try to start the service from services.msc.
  2. Using the vendor's database management tools, check for any connections to the vCenter Server database. If any are found, your DBA can terminate them.
  3. If you do not have a DBA, you can stop and restart database server. This clears any connections.

    Warning: Stopping and starting the database server terminates all connections to all databases being hosted on that server. Perform this action with extreme caution.
Note: For information on killing Oracle sessions, see Killing Oracle Sessions.
 
Note: The preceding link was correct as of September 30, 2013. If you find the link is broken, provide feedback and a VMware employee will update the link.


Additional Information

Many issues with Oracle database connectivity are resolved in vCenter Server 4.1 Update 1. VMware recommend that Oracle users upgrade the vCenter Server 4.1 Update 1 to ensure compatibility in your environments. You can download the latest release from the VMware Download Center.Location of vCenter Server log files
vCenter Server リポジトリに排他的にアクセスできない
无法独占访问 vCenter Server 存储库