'Glassfish 4.1 does not stop

I have a problem where glassfish instance does not stop from GUI or Command line.When trying a message appears saying there is no server instance running but there is, i can login to localhost:4848. I have killed all the process on 8080 but the behavior is still same. Any help would be much appreciated.

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source