Config-server fails with InvalidObjectIdException-Invalid id: main
search cancel

Config-server fails with InvalidObjectIdException-Invalid id: main

book

Article ID: 368211

calendar_today

Updated On:

Products

VMware Tanzu Spring Runtime

Issue/Introduction

After upgrading to Spring Cloud Service for TAS to v3.2.4 or older, config-server backend application fails to start with InvalidObjectIdException-Invalid id: main error message.

In SCS v3.2.4 and older, Config Server uses main as default label, instead of master in earlier versions.

This error is encountered if your service instances are configured without a label explicitly defined after upgrading to v3.2.4 or older.

Environment

  • Spring Cloud Service for TPCF to v3.2.4 and older
  • Tanzu Platform for Cloud Foundry

Cause

The issue is due to SCS v3.2.x Breaking changes. Please review related to a config-server.

 

Resolution

Option 1:  Migrate master to main branch - If you were using master branch before the upgrade and wanted to use main branch going forward.

  • Git backends: You can rename the master branch to main or create a new branch called main from the master branch.
  • CredHub backends: You need to update all secrets by replacing master with main in their path.

 

Option 2: Your want to keep using the master branch

  • Git backends: You can update all service instances by setting label to master explicitly.
  • CredHub backends: You need to update all secrets by replacing master with main in their path.

 

Update: This issue have beed fixed in SCS v3.2.5. Fallback to master is now functional