NodeJS Selector not Working with an Error "Can't acquire lock for app" | | Gotmyhost

If you see the “Can’t acquire lock for an app:” error message, this probably means that some processes use the “.lock” file of your NodeJS application.

This usually happens because a daemon script was previously started via NodeJS Selector -> Run NPM Script.

When you start a script this way, you have no way of stopping it via UI.

Moreover, it keeps running in the background holding a lock for the application. That is why when you try to perform any actions with an App after starting such a daemon script, you get “Can’t acquire lock for app” error.

mceclip1.png

Solution

To solve the problem, you need to do the following:

  1.  As root user run the lsof command:
    lsof -u username | grep lock
  2. You should see a list of lock processes that you will need to kill (where XXXXXX is the process number):kill -9 XXXXXX

If you have multiple processes, you may list their IDs.

To prevent this problem from coming back don’t start daemon scripts via NodeJS Selector UI.

You can also submit a support ticket to our support team and provide access to the server, so we can assist you in resolving the issue

Leave a Reply

Your email address will not be published. Required fields are marked *