When trying to create a Scheduler service instance in a space without any Scheduler instances existing in that space, you see the following error:
Service broker error: Only one Scheduler instance can be created per space.
The reason for this error is that the Scheduler broker database gets out of sync with the Cloud Controller (CC) database. As a result, CAPI thinks there is no Scheduler instance but the Scheduler broker rejects creating a new one because it thinks one already exists.
cf space <SPACE_NAME> --guid
cf services
cf t -o system -s scheduler cf service scheduler-broker-mysql --guid
bosh ds --column=name | grep <GUID>
bosh -d <DEPLOYMENT> ssh mysql/0 sudo -i mysql --defaults-file=/var/vcap/jobs/mysql/config/mylogin.cnf
use service_instance_db;
select guid from service_instances where space_guid='<SPACE_GUID>';
select * from service_bindings where service_instance_guid='<SERVICE_INSTANCE_GUID>';
delete from service_instances where space_guid='<SPACE_GUID>';