Articles in this section

NodeJS applications do not start on AlmaLinux 10 using apache mod_passenger in Plesk: Check failed: 12

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • Plesk is installed on Almalinux 10
  • A Node.js application is deployed on the server. e.g from this repository
  • Proxy mode is engaged for the domain, under which application was deployed.
  • Application doesn't start, the following errors appear in /var/log/passenger/passenger.log:

    # [ 66023/T6 age/Cor/SecurityUpdateChecker.h:505 ]: Security update check failed: rate limit hit for your IP, try again later (next check in 24 hours)
    App 66547 output:
    App 66547 output:
    App 66547 output: #
    App 66547 output: # Fatal error in , line 0
    App 66547 output: # Check failed: 12 == (*__errno_location ()).
    App 66547 output: #
    App 66547 output: #
    App 66547 output: #
    App 66547 output: #FailureMessage Object: 0x7ffdc9d9d470
    App 66547 output: ----- Native stack trace -----
    App 66547 output:
    App 66547 output:  1: 0x115bcb1  [/opt/plesk/node/24/bin/node]
    App 66547 output:  2: 0x2e8b2e3 V8_Fatal(char const*, ...) [/opt/plesk/node/24/bin/node]
    App 66547 output:  3: 0x2e95fc6 v8::base::OS::SetPermissions(void*, unsigned long, 
    .
    .
    .
    [ E 66023/Tg age/Cor/App/Implementation.cpp:218 ]: Could not spawn process for application /var/www/vhosts/example.com/passenger-nodejs-connect:

  • The following is being logged under /var/log/messages:

    # kernel: traps: MainThread[66547] trap int3 ip:2e9640c sp:7ffdc9d9d440 error:0 in node[2a9640c,f3e000+27e4000]
    Sep 11 08:52:30 10-69-43-244 systemd-coredump[66585]: Process 66547 (MainThread) of user 10000 terminated abnormally with signal 5/TRAP, processing...
    systemd[1]: Started systemd-coredump@3-66585-0.service - Process Core Dump (PID 66585/UID 0).
     systemd-coredump[66586]: Process 66547 (MainThread) of user 10000 dumped core.#012#012Stack trace of thread 66547:#012#0  0x0000000002e9640c n/a (n/a + 0x0)#012#1  0x0000000002e8b2f4 n/a (n/a + 0x0)#012#2  0x0000000002e95fc6 n/a (n/a + 0x0)#012#3  0x00000000015a5c2c n/a (n/a + 0x0)#012#4  0x000000000164b65f n/a (n/a + 0x0)#012#5  0x000000000157c7de n/a (n/a + 0x0)#012#6  0x0000000001b56043 n/a (n/a + 0x0)#012#7  0x00000000013d02d6 n/a (n/a + 0x0)#012#8  0x0000000000f9947f n/a (n/a + 0x0)#012#9  0x00000000011193d9 n/a (n/a + 0x0)#012#10 0x000000000105a846 n/a (n/a + 0x0)#012#11 0x00007f31edf77348 __libc_start_call_main (libc.so.6 + 0x2a348)#012#12 0x00007f31edf7740b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a40b)#012#13 0x0000000000f908be n/a (n/a + 0x0)#012ELF object binary architecture: AMD x86-64
     systemd[1]: systemd-coredump@3-66585-0.service: Deactivated successfully.

Cause

Product defect with ID EXTPLESK-9287 which will be fixed in the future Plesk updates. A directive "MemoryDenyWriteExecute=yes" in Apache service configuration was introduced in AlmaLinux 10, which forbids any memory mappings that are both writable and executable in processes started by Apache.

Resolution

Until a fix is released, apply the following workaround.

  1. Connect to the Plesk server via SSH.
  2. Disable MemoryDenyWriteExecute Apache directive by creating a drop-in under /usr/lib/systemd/system/httpd.service.d/nodejs.conf with the following command:

    # echo -e "[Service]\nMemoryDenyWriteExecute=no" > /usr/lib/systemd/system/httpd.service.d/nodejs.conf

  3. Reload services:

    # systemctl daemon-reload
    # systemctl restart httpd

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.