• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question NodeJS log file

Edi Duluman

Basic Pleskian
Hello!

I'm wondering where can I find the log file for debugging purposes in Plesk Onyx ?
Before Onyx, when we had to manually install nodeJS and Passenger's Phusion module, the logs were located in /var/log/apache/error.logs

Any ideas how can I debug my apps now ?

Cheers!
 
If you are unable to deploy the application from Plesk UI:

1. Check that the document root of the domain is set to the public/ folder of the application.
2. Make sure that the application startup file (app.js by default) can be found in the application root (on the same level as the public/ folder).
3. Enable Plesk debug (https://kb.plesk.com/120101) with the show.util_exec and show.util_exec_io options and look in /var/log/plesk/panel.log.

If the application does not work after deployment, look in the web server error log for any errors from Passenger. Switching the application mode to “development” can help produce more output.
 
Hi Igor! Thanks for the reply.

I'm sorry I did not make myself clear enough. Problem isn't about app not being able to start. It is about the realtime log file in which for examlple inside app.js I run console.log('Plesk');

This kind of logs I'm interested in because its very slow to debug in app in case app crashes due to a wrongly spelled comma.

I managed to fix the issue I was having but still if there would be any issue inside the API in the future it would take the same amount of time fixing it as it took now. Commenting code, save, restart check. Doesn't crash, uncomment some more, save, restart, check and so on up until it crashses so I have an approximate idea where the bug lies.

Hope you got my point.
 
Found the issue. Since I disabled Proxy mode for that specific website ( Socket handshake doesn't work when Apache is enabled, returns 400 Bad Request upon 101 Switching Protocols request ), the logs were not placed in /var/log/apache2/error_log but in /var/log/nginx/error.log

Code:
tail -f /var/log/nginx/error.log

An issue regarding per-domain log files can be found in passenger's git here: https://github.com/phusion/passenger/issues/1279 if you're interested in that, vote it there.

Cheers
 
Back
Top