Failed to mark memory page as executable - check if grsecurity/PaX is enabled

Hi everyone, I’m new to ALMALINUX, I’ve worked on Centos7 but now I’m facing the task of migrating all the servers to ALMALINUX 8. I have some Java applications, Jar files, but when I run one of them that requires connecting to a signalR server, it sends me this error
Error occurred during initialization of VM
Failed to mark memory page as executable - check if grsecurity/PaX is enabled

Can anyone help me?

the error is startteleiosradar.sh[4024]: Failed to mark memory page as executable - check if grsecurity/PaX is enabled

the code into sh
JAVA_HOME=“/usr/java/jdk-19”
[ -z “${JAVA_HOME:-}” ] && JAVA_HOME=“$SQLANY17/bin64/jre180”
export JAVA_HOME
LD_LIBRARY_PATH=“$SQLANY17/lib64:${LD_LIBRARY_PATH:-}”
export LD_LIBRARY_PATH

echo “Starting application.”
#exec java -cp $SQLANY17/java/jodbc4.jar ianywhere.ml.jdbcodbc.jdbc4.IBuildNum
exec “$JAVA_HOME”/bin/java -jar /opt/radar_1000.jar

the service code

[Unit]
Description=Start Java Application
After=network.target
StartLimitIntervalSec=10

[Service]
Type=simple
Restart=on-failure
RestartSec=1
User=root
ExecStart=/etc/init.d/startteleiosradar.sh

[Install]
WantedBy=multi-user.target

some one else to help me?

Hi,

The issue seems to be related to the security features of grsecurity/PaX, which are designed to enhance system security by preventing certain types of memory exploits. This can sometimes interfere with applications that need to mark memory pages as executable. You should either disable grsecurity/PaX if you do not need it, or use “paxctl” tool to modify the PaX flags on your executable. Are you using your own kernel where the grsecurity/PaX is enabled?