• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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