catch exception in start and stop server api

this catches exception.InstanceIsLocked in start and stop
server api.

Closes-Bug: #1233026

Change-Id: Ibb882178ab0770837702d503ef88c6510072e33f
(cherry picked from commit aa8938d696e6e2ecf23709f748de825dc2d07fd0)