Cloud Controller lost connection (timed out) to the database during a migration
search cancel

Cloud Controller lost connection (timed out) to the database during a migration

book

Article ID: 298044

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

Cloud Controller timed out and lost connection to the database during a schema migration. This issue can show up during upgrades or when running errands. In this case, we'll be focusing on the Usage Service Errand failing due to the error below. It fails because it's trying to add a column that already exists to the table.
2020-07-23T17:33:08.66+0000 [APP/TASK/ea6178eb/0] ERR rake aborted!
2020-07-23T17:33:08.66+0000 [APP/TASK/ea6178eb/0] ERR StandardError: An error has occurred, all later migrations canceled:
2020-07-23T17:33:08.66+0000 [APP/TASK/ea6178eb/0] ERR Mysql2::Error: Duplicate column name 'event_created_at': ALTER TABLE `latest_app_usage_event_guids` ADD `event_created_at` datetim


Environment

Product Version: 2.8

Resolution

Please contact Tanzu Support and provide this KB Article ID to assist with the resolution.