Plesk for Linux
kb: how-to
Applicable to:
- Plesk for Linux
Question
Where are the Node.js logs located?
Answer
Since Node.js extension version 2.1, all records are stored in the following file:
CONFIG_TEXT: /var/log/passenger/passenger.log
For earlier Node.js extension versions:
- Global log
/var/log/apache2/error_log
for Apache+nginx as a reverse-proxy on Debian/Ubuntu/var/log/httpd/error_log
for Apache+nginx as a reverse-proxy on CentOS/RHEL/CloudLinux/AlmaLinux/RockyLinux/var/log/nginx/error.log
for nginx-only hosting on any OS
- Domain-level log
-
Use the domain log browser to check Node.js logs per domain via Domains > example.com > Logs menu
Note: Node.js can also records logs directly into
/var/www/vhosts/system/example.com/logs/
directory, but this functionality is a part of Passenger Enterprise which is not included into the free edition that is provided by Plesk.
-
Additional information
It is also possible to troubleshoot the application using the Debugging Guide. However, this isn't supported by Plesk and has to run only from CLI (stopping the web server beforehand).
Comments
4 comments
I just installed nodejs, but i don't get any logfile messages from errors or console.logs within my app.js (which runs as it should). I see the checkbox for Node.js under logs, which seems connected to /var/log/passenger/passenger.log, but the file keeps empty. And there is another new folder under [files]/logs/[node-js-server-domain], but it is empty at all.
I'm running a Linux with Plesk v18.0.46 Update 1. (21. September 2022)
Same as Matt above exactly. My node app is running but no logs show up anywhere.
Node logs do not show up here, see comments
The domain log browser is fragile and hangs up frequently. Please include information on how to get at logs from cli. Passenger enterprise is not ideal, but these instructions would be better than nothing.
Please sign in to leave a comment.