Scheduler error when trying to create a job: "Error creating job: Validation of resource failed. Name must be unique within a space."
search cancel

Scheduler error when trying to create a job: "Error creating job: Validation of resource failed. Name must be unique within a space."

book

Article ID: 405892

calendar_today

Updated On:

Products

VMware Tanzu Application Service VMware Tanzu Platform - Cloud Foundry VMware Tanzu Platform

Issue/Introduction

In Tanzu Platform for Cloud Foundry, when trying to create a Scheduler job in the Apps Manager UI, this error was shown:

Error creating job: Validation of resource failed. Name must be unique within a space.

 

Even though the name of the job that is being tried to be created was not found in the list of jobs, both in the Apps Manager UI or from the output of `cf jobs` command, the error persist.

When checked in the database, the particular job is existing in the "jobs" table and a related record (by job "guid") is also existing in the "scheduleables" table.

Environment

VMware Tanzu Platform For Cloud Foundry

VMware Tanzu Application Service

Resolution

Run the following command to remove the orphaned job.

cf delete-job $JOB-NAME

 

This should delete the job from the scheduler's database tables.  Once the above command completes successfully, then the job creation can be retried.