DatabaseException - AddBank fail - Errors storing or creating database

Hi Team,

I am facing DatabaseException when launching the XProtect Management Client with a new MIP custom driver I’ve written. I’ve tried reinstalling the VMS Suite as well.

Below are the relevant logs:

MediaDb:

2024-03-04 14:52:55.199-08:00 [     4] INFO       - ******************************* Starting logger *******************************
2024-03-04 14:52:59.705-08:00 [    37] INFO       - ApplyConfiguration()
2024-03-04 14:52:59.709-08:00 [    37] INFO       - ApplyConfiguration() ... done
2024-03-04 14:52:59.770-08:00 [    37] INFO       - ApplyConfiguration()
2024-03-04 14:52:59.771-08:00 [    37] INFO       - ApplyConfiguration() ... done
2024-03-04 14:52:59.809-08:00 [    60] INFO       - AddBank(), Directory: C:\Users\teja.moolamalla\Documents\MediaDatabase\d2d4cc7c-4166-403f-98da-00f6e8649767; Storage id: d2d4cc7c-4166-403f-98da-00f6e8649767; Alternate id: 4e4a0263-c302-42e2-9ecb-fec276694b99
2024-03-04 14:52:59.839-08:00 [    60] INFO       - AddBank() ... Exception: VideoOS.Database.DatabaseException: Cannot create a file when that file already exists.
,  ---> VideoOS.Database.ConnectionException: NmDatabase::CmClientConnection::AddBank (line C:\w1\2e333172d4710577\prod\lib\src\Client\ClientConnection.cpp, 653): Error adding bank 'C:\Users\teja.moolamalla\Documents\MediaDatabase\d2d4cc7c-4166-403f-98da-00f6e8649767' to database! ---> VideoOS.Database.ConnectionException: NmDatabase::CmServerClient::AddBank (line C:\w1\2e333172d4710577\prod\lib\src\Server\ServerClient.cpp, 651): Error adding bank 'C:\Users\teja.moolamalla\Documents\MediaDatabase\d2d4cc7c-4166-403f-98da-00f6e8649767' to database! ---> VideoOS.Database.DatabaseException: NmDatabase::BankLoader::AddBankInternal (line C:\w1\2e333172d4710577\prod\lib\src\Core\BankLoader.cpp, 274): Error adding bank to database! ---> VideoOS.Database.DatabaseException: C:\w1\2e333172d4710577\prod\lib\src\Server\DatabaseStorage.cpp(line 677): Error ensuring that the parent directory for a storage exists. ---> VideoOS.Database.DatabaseException: NmFile::MakeSingleDirectory (line C:\w1\102e09352e4040b6\prod\lib\src\File\win32\File-OSD.cpp, 1686): Error making new directory 'C:\Users\teja.moolamalla\Documents'! ---> VideoOS.Database.DatabaseException: NmFile::MakeSingleDirectory (line C:\w1\102e09352e4040b6\prod\lib\src\File\win32\File-OSD.cpp, 1686):  : Cannot create a file when that file already exists.
 
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at VideoOS.Database.Connection.AddBank(String directory, String alternateId, String masterPassword)
   at VideoOS.Recorder.MediaDb.AddDatabase(StorageConfigurationBanks config, Guid storageId, Guid bankId, String storagePath, String folderName, RawDbChannel channel)
2024-03-04 14:52:59.846-08:00 [    60] INFO       - Storage availability changed. Id: d2d4cc7c-4166-403f-98da-00f6e8649767; Available: False

RecorderEngine:

2024-03-04 14:52:59.253-08:00 [    33] INFO       - Initializing media database, inProcess=True
2024-03-04 14:52:59.253-08:00 [    34] INFO       - RecorderModule: LoadConfigurationFromDisk
2024-03-04 14:52:59.254-08:00 [    34] INFO       - Loading cached recording server configuration
2024-03-04 14:52:59.488-08:00 [    34] INFO       - Loading cached security configuration
2024-03-04 14:52:59.534-08:00 [    33] INFO       - Media database initialized
2024-03-04 14:52:59.543-08:00 [    34] INFO       - Using cached configuration
2024-03-04 14:52:59.545-08:00 [    34] INFO       - Configuring license module
2024-03-04 14:52:59.548-08:00 [    34] INFO       - License module configured
2024-03-04 14:52:59.548-08:00 [    34] INFO       - Configuring rule processor
2024-03-04 14:52:59.692-08:00 [    34] INFO       - Rule processor configured
2024-03-04 14:52:59.695-08:00 [    38] INFO       - Applying recording server configuration
2024-03-04 14:52:59.696-08:00 [    39] INFO       - Configuring audio message manager
2024-03-04 14:52:59.697-08:00 [    37] INFO       - Configuring media database, inProcess=True
2024-03-04 14:52:59.697-08:00 [    40] INFO       - Starting patrolling controller
2024-03-04 14:52:59.698-08:00 [    39] INFO       - Audio message manager configured
2024-03-04 14:52:59.699-08:00 [    41] INFO       - Starting status module
2024-03-04 14:52:59.702-08:00 [    42] INFO       - Starting smart search module
2024-03-04 14:52:59.703-08:00 [    43] INFO       - Starting driver event listener
2024-03-04 14:52:59.704-08:00 [    44] INFO       - Starting driver services
2024-03-04 14:52:59.705-08:00 [    42] INFO       - Smart search module started
2024-03-04 14:52:59.705-08:00 [    44] INFO       - Driver services started
2024-03-04 14:52:59.708-08:00 [    45] INFO       - Starting SNMP module
2024-03-04 14:52:59.715-08:00 [    40] INFO       - Patrolling controller started
2024-03-04 14:52:59.717-08:00 [    43] INFO       - Driver event listener started
2024-03-04 14:52:59.794-08:00 [    37] INFO       - Media database configured
2024-03-04 14:52:59.805-08:00 [    38] INFO       - Driver manager - load driver. Hardware id: 7a4f886f-79d5-48df-915d-31a0c58884b0, Name: Machine name (localhost)
2024-03-04 14:52:59.843-08:00 [    35] INFO       - Unhandled MediaDb event: FAILURE_EVENT__ADDING_BANK_FAILED
2024-03-04 14:52:59.878-08:00 [    41] INFO       - Status module started
2024-03-04 14:52:59.878-08:00 [     4] INFO       - Bank directory is unavailable "Local default" (path: C:\Users\teja.moolamalla\Documents\MediaDatabase)

DeviceHandling

2024-03-04 14:52:59.973-08:00 [    38] INFO       - ******************************* Starting logger *******************************
2024-03-04 14:53:02.986-08:00 [    74] INFO       - 19a6448f-bc89-4293-9245-6cd52d10c77e  Machine name (localhost) - First camera  Starting frame group media db consumer (table: 19a6448f-bc89-4293-9245-6cd52d10c77e)
2024-03-04 14:53:02.986-08:00 [    74] INFO       - 19a6448f-bc89-4293-9245-6cd52d10c77e  Machine name (localhost) - First camera  Creating performance counter for device frame group media db consumer (table: 19a6448f-bc89-4293-9245-6cd52d10c77e)
2024-03-04 14:53:04.483-08:00 [    76] INFO       - 19a6448f-bc89-4293-9245-6cd52d10c77e  Machine name (localhost) - First camera  Device communication established
2024-03-04 14:53:05.473-08:00 [    77] ERROR      - 19a6448f-bc89-4293-9245-6cd52d10c77e  Machine name (localhost) - First camera  Bank is offline, thus not able to configure table: 19a6448f-bc89-4293-9245-6cd52d10c77e
2024-03-04 14:53:05.499-08:00 [    77] INFO       - 19a6448f-bc89-4293-9245-6cd52d10c77e  Machine name (localhost) - First camera  OnWriteGopStateChanged, failureWritingGop=True (table: 19a6448f-bc89-4293-9245-6cd52d10c77e)

To add to above, I don’t see any Documents\MediaDatabase folder created and I’m running 2023 R3 version.

Thanks!

As this is not related to software development with the MIP SDK, which is the focus of this forum, please ask again in the support community, you should get better help from the partners using the support community.

https://supportcommunity.milestonesys.com