How to remove a broken service in Mission Control

Patrick Russell
2018-12-11 21:47

Subject 

In Mission Control, you can usually click the "X" button to delete a service. However, if there is a problem with the downstream service (Such as a system wipe or deletion), the GUI and REST API will not allow the deletion.

Resolution

You'll need to get onto the MongoDB and erase the bad service. These steps use the Mongo shell, which comes installed with Mission Control:
#Log onto the Mission Control MongoDB
mongo –port 27017 -u "mission_platform" -p "password" –authenticationDatabase "mission_platform"

#The services are in the "mission_platform" database
#Use "show databases" to confirm it exists
use mission_platform

#List all services
db.instances.find()

#Identify the service by it's URL or name, then copy the _id
#Run a db.instances.remove command using the format below
db.instances.remove({"_id" : "b4570f6a-6123-4462-8904-feca7a258516"})

After running the "remove" command, the service will be deleted permanently from Mission Control. These actions do not require a restart.