Connecting to vCenter Server Appliance 5.0 fails with the error: No connection could be made because the target machine actively refused it (2014860)
Details
Cannot connect to the vCenter Server Appliance using the vSphere Client
Connecting to the vCenter Server Appliance fails
You see the error:
No connection could be made because the target machine actively refused itThe VMware VirtualCenter Server service fails to run
In the /var/log/vmware/vpx/vpxd.log file, you see entries similar to:
2012-03-02T10:47:54.377Z [7FFFF3B09700 info 'Default'] [Init:842] Calling: VpxdCertificate_Load(gDB, CERTIFICATE_VMDBPATH )2012-03-02T10:47:54.377Z [7FFFF3B09700 info 'Default'] [Init:843] Calling: VpxdVdb::Init(VpxdVdb::GetVcVdbInstId(), false, false, NULL)2012-03-02T10:47:54.377Z [7FFFF3B09700 info 'Default'] Registry Item DB 5 value is ''2012-03-02T10:48:05.304Z [7FFFF3B09700 error 'Default'] [VpxdVdb::SetDBType]: Database error: ODBC error: (HY000) - [unixODBC][Oracle][ODBC][Ora]ORA-28001: the password has expired--> 2012-03-02T10:48:05.304Z [7FFFF3B09700 error 'Default'] Error getting configuration info from the database2012-03-02T10:48:05.310Z [7FFFF3B09700 error 'Default'] [Init] Init failed: VpxdVdb::Init(VpxdVdb::GetVcVdbInstId(), false, false, NULL)2012-03-02T10:48:05.310Z [7FFFF3B09700 warning 'VpxProfiler'] ServerApp::Init [TotalTime] took 10933 ms2012-03-02T10:48:05.310Z [7FFFF3B09700 error 'Default'] Failed to intialize VMware VirtualCenter. Shutting down...2012-03-02T10:48:05.310Z [7FFFF3B09700 info 'Default'] Wrote uptime information2012-03-02T10:48:05.310Z [7FFFF3B09700 error 'Default'] Alert:false@ /build/mts/release/bora-455964/bora/vpx/vpxd/util/vpxdVdb.cpp:408--> Backtrace:--> [00] rip 00007fffeed9ed14 --> [01] rip 00007fffeecf59e2 --> [02] rip 00007fffeec9b38b --> [03] rip 00007ffff58c613d --> [04] rip 00007ffff4ea5a40 --> [05] rip 00007ffff4eb4e21 --> [06] rip 00007ffff4ea2953 --> [07] rip 00007fffed03abc6 --> [08] rip 00007ffff4ea1c19 --> 2012-03-02T10:48:05.310Z [7FFFF3B09700 info 'Default'] Registry Item DB 5 value is ''2012-03-02T10:48:15.343Z [7FFFF3B09700 error 'Default'] [VpxdVdb::SetDBType]: Database error: ODBC error: (HY000) - [unixODBC][Oracle][ODBC][Ora]ORA-28001: the password has expired--> 2012-03-02T10:48:15.343Z [7FFFF3B09700 error 'Default'] Error getting configuration info from the database2012-03-02T10:48:15.350Z [7FFFF3B09700 error 'Default'] Unhandled exception <Error[VdbError] (-24) Vdb instance is not initialized or terminated>lines 1-58/58 (END)
Solution
Identify the database user that VPXD service uses by logging in to the Oracle database instance via SSH.
Setup your shell environment using these commands:
# su - oracle$ echo $ORACLE_SID$ export ORACLE_SID=VPXD$ echo $ORACLE_SIDRun these command to connect to the Oracle database:
$ sqlplus /nologSQL> connect / as sysdbaRun this SQL statement to list all database users:
SQL> select * from all_users; You see an output similar to:USERNAME USER_ID CREATED------------------------------ ---------- ---------VPXADMIN 85 24-AUG-11SCOTT 84 15-AUG-09OWBSYS_AUDIT 83 15-AUG-09OWBSYS 79 15-AUG-09APEX_030200 78 15-AUG-09APEX_PUBLIC_USER 76 15-AUG-09FLOWS_FILES 75 15-AUG-09MGMT_VIEW 74 15-AUG-09SYSMAN 72 15-AUG-09SPATIAL_CSW_ADMIN_USR 70 15-AUG-09SPATIAL_WFS_ADMIN_USR 67 15-AUG-09Identify the user account that is used by the VMware VirtualCenter Server service. For example, assume that the user account isVPXADMIN .
Run this SQL statement to reset the password for the user:
SQL> alter user user_id identified by oracle account unlock; For example:SQL> alter user VPXADMIN identified by oracle account unlock; You see an output similar to:User altered.Connect to the vCenter Server Appliance and reconfigure the ODBC connection to reflect the change in the password.
Connect to the vCenter Server Appliance via SSH as the root user.
Run this command:
/usr/sbin/vpxd_odbcconfig For example:localhost:~ # /usr/sbin/vpxd_odbcconfigEnter appropriate details in the output that appears similar to:WARNING - Use of this command is not supported unless you are doing thiswith the consultation of VMware Technical Support or a VMware publishedtechnical article.VMware vCenter Server Appliance ODBC ConfigurationChoose a database to use with VMware vCenter Server1) oracle2) embedded#? 1 <- Enter 1 here for Oracle Configuring ODBC for oracleDatabase server host/ip: Enter the FQDN or the Oracle DB server here Database instance name: VPXDDatabase login id: VPXADMINDatabase password:Database password again:Operation was successful.Database already populated with version VirtualCenter Database 5.0Reinitialize database? (WARNING: WILL DELETE ALL RECORDS) [y(es)|N(O)]: OK, preserving the database.Restart vCenter Server now to activate the database changes [y/N]:ySuccessfully restarted vCenter Server