• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Issue Node.js using plesk extension

jtthemarine

New Pleskian
I have been working on a node.js webapp on my server for a while. I recently updated my plesk to onyx and noticed they had an extension.

So I backed up my node.js app, uninstalled node.js from the server and proceeded to add the extension.

I re-uploaded the app and added it via the plesk panel. However it never starts.

I figured I messed something up so I uploaded a fresh simple "Hello world" as the how to explains. Still nothing.

ps x shows no case of node running even after the panel says it is running.
 
That is actually the article I was referring to.

node_js_not_starting.png


The server.js contains

Code:
const http = require('http');

http.createServer(function(request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end("Hello, World!\n");
}).listen(process.env.PORT);

console.log('App is running...');

Going to the url displays an apache2 test page.

ps x shows no instance of node running
 
After re-reading the article again, I noticed that it mention errors are posted to the main error_log and not the domains. So after pulling that up I found there is a permission error.

Code:
[Tue Jan 24 23:00:30 2017] [notice] caught SIGTERM, shutting down
[Tue Jan 24 23:00:30 2017] [notice] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Tue Jan 24 23:00:30 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jan 24 23:00:30 2017] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog (/usr/lib64/passenger/support-binaries/PassengerAgent): Permission denied (errno=13)

I have tried
Code:
chcon -v --type=httpd_sys_content_t server.js

However the same error persists
 
Last edited:
Just set Selinux to permissive and it does function. However shouldn't of setting the type of allowed it to run with Selinux enabled?
 
You can leave selinux in enabled mode if you set the following two selinux booleans;

Code:
setsebool -P httpd_run_stickshift 1
setsebool -P httpd_execmem 1

However, I think this issue should be resolved in the psa-selinux package as that comes with a custom Plesk selinux policy.
 
Back
Top