Devices are always online in the local server even if the server or the device is not connected to the internet.This device which is online cannot be deleted .
It seems that you abruptly stopped the server. Your option right now is to enter in the MongoDB database with some client, and change the flag status by yourself.