ap-hotspot error "Another process is already running"

ap-hotspot is configured, when i first entered the command sudo ap-hotspot it said starting wireless hotspot which took long time but didn't start. Afterwards it displays following errors:

enter image description here


I found the solution to my problem from Internet. By removing the pid file in /tmp I got rid of this error "Another process is already running"

sudo rm /tmp/hotspot.pid

then start ap-hotspot as,

sudo ap-hotspot start