VPXD fails to start with error "Database error: ODBC error: (IM002) - [unixODBC][Driver Manager]Data source name not found, and no default driver specified"
search cancel

VPXD fails to start with error "Database error: ODBC error: (IM002) - [unixODBC][Driver Manager]Data source name not found, and no default driver specified"

book

Article ID: 328046

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article is created to troubleshoot vpxd and start it up by manually creating odbc.ini file to manually re-create the ODBC conection on vcsa 

Symptoms:
  • VPXD fails to start with below Backtrace
2019-07-05T21:01:25.864-04:00 error vpxd[7FEE9FED2800] [Originator@6876 sub=Default] Alert:false@ bora/vpx/vpxd/util/vdb.cpp:509
--> Backtrace:
--> [backtrace begin] product: VMware VirtualCenter, version: 6.5.0, build: build-14020092, tag: vpxd, cpu: x86_64, os: linux, buildType: release
--> backtrace[00] libvmacore.so[0x002BB0F8]: Vmacore::System::Stacktrace::CaptureFullWork(unsigned int)
--> backtrace[01] libvmacore.so[0x001B18B6]: Vmacore::System::SystemFactoryImpl::CreateBacktrace(Vmacore::Ref<Vmacore::System::Backtrace>&)
--> backtrace[02] libvmacore.so[0x00177B89]: Vmacore::Service::Alert(char const*, char const*, int)
--> backtrace[03] vpxd[0x00A4342B]
--> backtrace[04] vpxd[0x0055182F]
--> backtrace[05] vpxd[0x0055307F]
--> backtrace[06] vpxd[0x0053D37A]
--> backtrace[07] libc.so.6[0x00020590]
--> backtrace[08] vpxd[0x0053CB85]
--> [backtrace end]
2019-07-05T21:01:25.864-04:00 info vpxd[7FEE9FED2800] [Originator@6876 sub=vpxdVdb] Registry Item DB 5 value is '60'
2019-07-05T21:01:25.864-04:00 info vpxd[7FEE9FED2800] [Originator@6876 sub=vpxdVdb] Setting VDB delay statements queue size to 7000 transactions for 7 GB RAM dedicated to vpxd.
2019-07-05T21:01:25.864-04:00 info vpxd[7FEE9FED2800] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType] Logging in to DSN: VMware VirtualCenter with username vc
2019-07-05T21:01:25.864-04:00 error vpxd[7FEE9FED2800] [Originator@6876 sub=Default] [Vdb::IsRecoverableErrorCode] Unable to recover from IM002:0
2019-07-05T21:01:25.864-04:00 error vpxd[7FEE9FED2800] [Originator@6876 sub=vpxdVdb] [VpxdVdb::SetDBType]: Database error: ODBC error: (IM002) - [unixODBC][Driver Manager]Data source name not found, and no default driver specified
2019-07-05T21:01:25.864-04:00 error vpxd[7FEE9FED2800] [Originator@6876 sub=Default] Error getting configuration info from the database
2019-07-05T21:01:25.864-04:00 warning vpxd[7FEE9FED2800] [Originator@6876 sub=Main] Database not initialized. Nothing to unlock
2019-07-05T21:01:25.864-04:00 info vpxd[7FEE9FED2800] [Originator@6876 sub=Default] Forcing shutdown of VMware VirtualCenter now
  • Can login into VCDB with the username vc


Cause

The vpxd creates the backtrace when the file etc/odbc.ini is empty or not complete.

Resolution

To resolve the issue, follow the steps given below:

1. Take a snapshot/backup of the vCenter before proceeding with any of the steps 
2. Check if the below two files exists and check if they have valid size 
 
root@vcsa1 [ /opt/vmware/vpostgres/current/lib ]# ls -l /etc/odbc*
-r--r--r-- 1 root root 1630 May  4  2018 /etc/odbc.ini
-r--r--r-- 1 root root  353 May  4  2018 /etc/odbcinst.ini

3. Stop all the vcenter services by running this command: service-control --stop --all
4. Edit the odbc.ini file:  vi /etc/odbc.ini
5. Enter insert mode by pressing i, paste the below inside the file
[VMware VirtualCenter]
;DB_TYPE = PostgreSQL
;SERVER_NAME = localhost
;SERVER_PORT = 5432
;TNS_SERVICE = VCDB
;USER_ID = vc
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
BindAsFLOAT = F
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = PostgreSQL
DSN = VMware VirtualCenter
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
ForceWCHAR = F
Lobs = T
Longs = T
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName = localhost
PortNumber = 5432
Server = localhost
Port = 5432
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
DisableRULEHint = T
UserID = vc
User = vc
Database = VCDB
Logging = 0
QuotedId = Yes
AnsiNPW = Yes
Mars_Connection = No
ByteaAsLongVarBinary = 1
BoolsAsChar = 0
UseDeclareFetch = 1
Fetch = 1024
[VUMDSN]
;DB_TYPE = PostgreSQL
;SERVER_NAME = localhost
;SERVER_PORT = 5432
;TNS_SERVICE = VCDB
;USER_ID = vumuser
Application Attributes = T
Attributes = W
BatchAutocommitMode = IfAllSuccessful
BindAsFLOAT = F
CloseCursor = F
DisableDPM = F
DisableMTS = T
Driver = PostgreSQL
DSN = VUMDSN
EXECSchemaOpt =
EXECSyntax = T
Failover = T
FailoverDelay = 10
FailoverRetryCount = 10
ForceWCHAR = F
Lobs = T
Longs = T
MetadataIdDefault = F
QueryTimeout = T
ResultSets = T
ServerName = localhost
PortNumber = 5432
Server = localhost
Port = 5432
SQLGetData extensions = F
Translation DLL =
Translation Option = 0
DisableRULEHint = T
UserID = vumuser
User = vumuser
Database = VCDB
Logging = 0
QuotedId = Yes
AnsiNPW = Yes
Mars_Connection = No
ByteaAsLongVarBinary = 1
BoolsAsChar = 0
UseDeclareFetch = 1
Fetch = 1024

6. Save the file and start the Services service-control --start --all

Additional Information

Impact/Risks:
Take a backup of the vCenter before proceeding with the resolution