Applicable to:
- Plesk for Linux
Symptoms
-
Unable to open Subscriptions > example.com > Node.js for newly migrated domain:
PLESK_ERROR: Server Error
500
Error
Call to a member function getPath() on null -
Domain
example.com
has non-existentext-nodejs-handlerPath
:# plesk db "select val from dom_param where param='ext-nodejs-handlerPath' and dom_id=(select id from domains where name='example.com' limit 1);"
+-----------------------------+
| val |
+-----------------------------+
| /opt/plesk/node/17/bin/node |
+-----------------------------+# ls -l /opt/plesk/node/17/bin/node
ls: cannot access /opt/plesk/node/17/bin/node: No such file or directory -
Other Node.js handlers versions are found on the server:
# ls -1 /opt/plesk/node/*/bin/node
/opt/plesk/node/10/bin/node
/opt/plesk/node/12/bin/node
/opt/plesk/node/14/bin/node
/opt/plesk/node/16/bin/node
Cause
Product issue:
-
#EXTNODEJS-122 "Opening the extension on domains with non-existent handlers no longer results in Internal Server Error 500."
Fixed in:- Node.js Toolkit 2.3.6 28 July 2023
Resolution
Workaround
If update is not possible for some reason you may try the following
As a workaround apply one of the following alternatives:
-
Re-install Node.js extension by removing and installing this again with this instructions.
-
Update the the
ext-nodejs-handlerPath
on the database:-
Connect to the server via SSH
-
Login to the database
# plesk db
-
Modify the
ext-nodejs-handlerPath
to /opt/plesk/node/16/bin/node:# update dom_param set val='/opt/plesk/node/16/bin/node' where dom_id=(select id from domains where name='example.com' limit 1) and param='ext-nodejs-handlerPath';
Note: Change
example.com
and the node version16
accordingly based on the versions found on the server. -
Go to Domains > example.com > Node.js.
-
Click Disable node.js button.
-
Click Enabled node.js button.
-
Comments
0 comments
Please sign in to leave a comment.