Forum Discussion

yasserMalah's avatar
yasserMalah
Icon for Nimbostratus rankNimbostratus
Jul 16, 2025

getting compiling error when enabling Nginx App_potect

i m trying to install NGinx plus with App_ptotect but when trying to enable app_protect module after installing it i get the following error

 

nginx: [emerg] APP_PROTECT config_set_id 1752649466-871-149162 not found within 45 seconds
nginx: [emerg] APP_PROTECT fstat() "/opt/app_protect/config/compile_error_msg.json" failed (2: No such file or directory)

 

and i can not start the nginx service, any idea about the issue?

 

5 Replies

    • yasserMalah's avatar
      yasserMalah
      Icon for Nimbostratus rankNimbostratus

      Hi 

      thanks for your reply but i am sure it is installed here is the output query for the isntalled packages 

       

      apt list --installed | grep -E 'nginx-plus|app-protect'

      WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

      app-protect-attack-signatures/stable,now 2025.07.10-1~focal amd64 [installed]
      app-protect-bot-signatures/stable,now 2025.07.09-1~focal amd64 [installed,automatic]
      app-protect-common/now 11.336.0-1~focal amd64 [installed,local]
      app-protect-compiler/now 11.336.0-1~focal amd64 [installed,local]
      app-protect-geoip/stable,now 2023.10.30-1~focal amd64 [installed,auto-removable]
      app-protect-graphql/now 0.7.0-1~focal amd64 [installed,local]
      app-protect-module-plus/stable,now 34+5.342.0-1~focal amd64 [installed]
      app-protect-plugin/stable,now 6.12.0-1~focal amd64 [installed]
      app-protect-threat-campaigns/stable,now 2025.07.13-1~focal amd64 [installed,automatic]
      nginx-plus-module-appprotect/stable,now 34+5.342.0-1~focal amd64 [installed,automatic]
      nginx-plus/stable,now 34-2~focal amd64 [installed]

  • This error usually means the NGINX App Protect compiler service is either not running or lacks the permissions to write its configuration files.

    Quick Fix Steps

    1. Restart the Services: Ensure the background agents are active. Run:
    2. sudo systemctl restart nginx-appprotect enforcerd
    3. Fix Permissions: The error compile_error_msg.json failed suggests a lock on the directory. Run:
    4. sudo chown -R nginx:nginx /opt/app_protect/
    5. Check Memory: App Protect needs at least 4GB of RAM to compile. If your VPS is low on memory, it will timeout at the 45-second mark.
    6. SELinux: If using RHEL/CentOS, temporarily run setenforce 0 to see if a security policy is blocking the fstat() call.
       i hope this will help you to fix this issue!