cf jobs command errors out when scheduler jobs are present but succeeds when all jobs are deleted.
search cancel

cf jobs command errors out when scheduler jobs are present but succeeds when all jobs are deleted.

book

Article ID: 389589

calendar_today

Updated On: 03-11-2025

Products

VMware Tanzu Application Service

Issue/Introduction

cf jobs command throws an error when executed in a certain space.

The output of 

cf target -o system -s scheduler
cf logs scheduler-broker --recent

may show an error like this:

2025-02-26T20:54:07.78-0300 [APP/PROC/WEB/1] OUT {"level":"info","ts":1740614047.784752,"caller":"log/logger.go:25","msg":"gorp: multiple rows returned for: SELECT * FROM service_bindings WHERE app_guid=? - [########-####-####-####-############] service binding repo

Cause

Root cause is multiple entries in the service_bindings table. The scheduler app is designed to only support and allow one instance per space.

Resolution

We do not understand why duplicate service bindings are created, so the best way forward is to gather the following artifacts:

  • cf target -o system -s scheduler
  • cf /v2/service_bindings | jq
  • CF_TRACE=true cf services
  • cf logs scheduler --recent 
  • log bundle for cloud_controller
  • log bundle for router

This should provide R&D will enough data to start an investigation on the root cause.

While deleting all apps and re-pushing them has been shown to remove the duplicate service bindings, this brute-force approach is not suitable to every situation.