SonarQube 2025.1 LTA Developer edition NOT using SONAR_SEARCH_JAVAADDITIONALOPTS

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension): SonarQube Server 2025.1 LTA Developer Edition
  • how is SonarQube deployed: zip, Docker, Helm: Deployed inside an AWS EKS kubernetes pod with docker build image
  • what are you trying to achieve: Successful deployment in EKS fargate with the options used in SONAR_SEARCH_JAVAADDITIONALOPTS.
  • what have you tried so far to achieve this: elasticsearch.yml, sonar.properties, ENV xxx inside Dockerfile
    Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
    The SONAR_SEARCH_JAVAADDITIONALOPTS is NOT being used by the Sonar internal process: o.s.a.c.CommandFactoryImpl.

** The SONAR_SEARCH_JAVAADDITIONALOPTS** had been set

kubectl exec -ti pod/sonarqube-764b878
777-6ls52 -n sonarqube -c sonarqube -- env
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HOSTNAME=sonarqube-764b878777-6ls52
TZ=Asia/Kuala_Lumpur
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=en_US.UTF-8
JAVA_VER=java-17
JAVA_HOME=/opt/java-17
SONARQUBE_HOME=/opt/sonarqube
SONAR_VERSION=2025.1.1.104738
SQ_DATA_DIR=/opt/sonarqube/data
SQ_EXTENSIONS_DIR=/opt/sonarqube/extensions
SQ_LOGS_DIR=/opt/sonarqube/logs
SQ_TEMP_DIR=/opt/sonarqube/temp
SONAR_SEARCH_JAVAADDITIONALOPTS=-Xlog:all=warning:stderr:utctime,level,tags
JAVA_OPTS=-Duser.timezone=Asia/Kuala_Lumpur -Xmx2048m

2025.04.24 14:31:50 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2025.04.24 14:31:50 WARN  app[][o.s.a.c.CommandFactoryImpl] ES_JAVA_OPTS is defined but will be ignored. Use properties sonar.search.javaOpts and/or sonar.search.javaAdditionalOpts in sonar.properties to change SQ JVM processes options
2025.04.24 14:31:50 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:{}]
2025.04.24 14:31:50 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/java-17/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=/opt/sonarqube/elasticsearch -Des.path.conf=/opt/sonarqube/temp/conf/es -Des.distribution.type=tar -cp /opt/sonarqube/elasticsearch/lib/*:/opt/sonarqube/elasticsearch/lib/cli-launcher/* org.elasticsearch.launcher.CliToolLauncher
2025.04.24 14:31:51 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Standard Commons Logging discovery in action with spring-jcl: please remove commons-logging.jar from classpath in order to avoid potential conflicts
2025.04.24 14:32:00 INFO  es[][o.e.n.NativeAccess] Using [jna] native provider and native methods for [Linux]
2025.04.24 14:32:00 ERROR es[][o.e.b.Elasticsearch] fatal exception while booting Elasticsearch
java.lang.UnsupportedOperationException: seccomp(BOGUS_OPERATION): Operation not permitted
        at org.elasticsearch.nativeaccess.LinuxNativeAccess.tryInstallExecSandbox(LinuxNativeAccess.java:191) ~[elasticsearch-native-8.16.1.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.initializeNatives(Elasticsearch.java:296) ~[elasticsearch-8.16.1.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.initPhase2(Elasticsearch.java:169) ~[elasticsearch-8.16.1.jar:?]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:74) ~[elasticsearch-8.16.1.jar:?]
ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log

ERROR: Elasticsearch died while starting up, with exit code 1
2025.04.24 14:32:00 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2025.04.24 14:32:00 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2025.04.24 14:32:00 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

Hello @matthew.mexchg thanks a lot for your message and detailed logs.

According to what you shared there is an error even before starting completely elasticsearch.

seccomp(BOGUS_OPERATION): Operation not permitted

I validated locally within our helm chart on the same version as you are, with this value file and confirm the SONAR_SEARCH_JAVAADDITIONALOPTS works:

env:
  - name: SONAR_SEARCH_JAVAADDITIONALOPTS
    value: "-Djava.net.preferIPv4Stack=true"
Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/java/openjdk/bin/java │
│  -Xms4m -Xmx64m Other Default Parameter

│ 2025.05.14 15:13:12 INFO  es[][o.e.n.Node] JVM arguments [-Djava.net.preferIPv4Stack=true ....

Please note the additionalOps are shown on the second line only.

We can now go back to debugging your case, which is probably due to Fargate, which is not a supported installation system.

It is very likely linked to a seccomp profile being too restrictive to run es, we can take a deeper look in this direction.

Cheers,
Jeremy.