无法独占访问 vCenter Server 存储库
search cancel

无法独占访问 vCenter Server 存储库

book

Article ID: 344537

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:
免责声明:本文为 Unable to get an exclusive access to the vCenter Server repository (1006369) 的翻译版本。尽管我们会不断努力为本文提供最佳翻译版本,但本地化的内容可能会过时。有关最新内容,请参见英文版本。


  • 您无法启动 VMware VirtualCenter Server 服务。
  • VMware VirtualCenter Server 服务启动失败。
  • vSphere Client 在加载后锁定。
  • 无法独占访问 vCenter Server 存储库。
  • vCenter Server 关闭。
  • vCenter Server 上的 vpxd 日志中出现以下错误:

    Unable to get exclusive access to VC repository.Please check if another VirtualCenter instance is running against the same database schema

  • vCenter Server 由 Microsoft SQL 或 Oracle 数据库支持时可能会出现此问题
  • vpxd.log 文件包含类似于以下内容的条目:

    [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.

  • 如果 vCenter Server 由 Oracle 10g 或 11g 数据库支持:
    vpxd 日志包含以下条目:

    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

  • 在出现此问题之前,数据库性能降低,并且数据库停止接受连接。vpxd 日志包含类似于以下内容的条目:

    [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.)

    注意:有关 vpxd.log 文件位置的详细信息,请参见 Location of vCenter Server log files (1021804)


Environment

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

Resolution

如果打开的数据库连接阻止 vCenter Server 在启动或无法启动时需要对整个数据库进行的独占访问,可能会出现此问题。

要清除打开的数据库连接,请执行以下操作:
  1. 验证是否只有一个 vCenter Server 的实例正在尝试访问 vCenter Server 数据库。如果从命令行运行 vpxd.exe,并且尝试从 services.msc 启动服务,则会出现此错误。
  2. 使用供应商的数据库管理工具检查是否存在与 vCenter Server 数据库的任何连接。如果存在连接,您的 DBA 可以终止连接。
  3. 如果没有 DBA,可以停止并重新启动数据库服务。这会清除任何连接。

    警告:停止和启动数据库服务器会终止与该服务器所托管的所有数据库的所有连接。请谨慎执行此操作。
注意:有关停止 Oracle 会话的信息,请参见 Killing Oracle Sessions
注意:截至 2013 年 9 月 30 日,上述链接正确无误。如果您发现该链接已损坏,请提供反馈,VMware 员工将会更新该链接。


Additional Information

与 Oracle 数据库连接有关的许多问题在 vCenter Server 4.1 Update 1 中已解决。VMware 建议 Oracle 用户升级 vCenter Server 4.1 Update 1 以确保与您环境的兼容性。可以从 VMware Download Center 下载最新版本。Unable to get an exclusive access to the vCenter Server repository