Sonarqube init fail in Openshift cluster with VPC

Hi Team.

We setup sonarqube DeploymentConfig in our OCP Cluster, and setup NFS vpc. Yamls as below. The init process is stopped at starting es(2022.03.23 12:42:09 INFO es[o.e.p.PluginsService] no plugins loaded), not any more error message.
IF we run sonarqude use our hostpath pvs, it will run normally.

We don’t get any idea for this, cloud you please help for us.
Where can we get detail error message for sonarqube ? We don’t why it stop here and not go on.
We think maybe the issue is for NFS VPC, what’s the IO require for NFS vpc in sonarqube.

[root@master1 nodes]# oc logs dso-sonarqube-1-jddpn -f
2022.03.23 12:42:06 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2022.03.23 12:42:06 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:41403]
2022.03.23 12:42:06 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2022.03.23 12:42:06 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2022.03.23 12:42:09 INFO  es[][o.e.n.Node] version[7.11.2], pid[38], build[default/tar/3e5a16cfec50876d20ea77b075070932c6464c7d/2021-03-06T05:54:38.141101Z], OS[Linux/3.10.0-1160.59.1.el7.x86_64/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/11.0.10/11.0.10+9]
2022.03.23 12:42:09 INFO  es[][o.e.n.Node] JVM home [/opt/java/openjdk]
2022.03.23 12:42:09 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/opt/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2022.03.23 12:42:09 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2022.03.23 12:42:09 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2022.03.23 12:42:09 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2022.03.23 12:42:09 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2022.03.23 12:42:09 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2022.03.23 12:42:09 INFO  es[][o.e.p.PluginsService] no plugins loaded
not any more error
apiVersion: apps.openshift.io/v1
kind: DeploymentConfig
metadata:
  name: ***-sonarqube
  namespace: ***-devops
  labels:
    app: ***-sonarqube
    deploymentconfig: ***-sonarqube
spec:
  replicas: 1
  selector:
    app: ***-sonarqube
    deploymentconfig: ***-sonarqube
  strategy:
    resources: {}
    rollingParams:
      intervalSeconds: 1
      maxSurge: 25%
      maxUnavailable: 25%
      timeoutSeconds: 600
      updatePeriodSeconds: 1
  template:
    metadata:
      labels:
        app: ***-sonarqube
        deploymentconfig: ***-sonarqube
    spec:
      serviceAccountName: ***-sa
      securityContext:
        privileged: true
      terminationGracePeriodSeconds: 30
      initContainers:
        - name: init-sysctl
          image:  ***/openshift/busybox:v1
          imagePullPolicy: Always
          command: ["/bin/sh"]
          args:
            - -c
            - >-
                sysctl -w vm.max_map_count=524288  &&
                sysctl -w fs.file-max=131072 &&
                ulimit -n 131072 &&
                ulimit -u 8192
          securityContext:
            privileged: true
      containers:
        - name: ***-sonarqube
          image: ***/openshift/sonarqube:8.8-community
          imagePullPolicy: Always
          ports:
            - containerPort: 9000
              protocol: TCP
          resources:
            limits:
              cpu: 2000m
              memory: 2048Mi
            requests:
              cpu: 1000m
              memory: 1024Mi
          env:
            - name: TZ
              value: Asia/Tokyo
            - name: SONARQUBE_JDBC_PASSWORD
              value: "sonarqube123456"
            - name: SONARQUBE_JDBC_URL
              value: jdbc:postgresql://***-postgresql-sonarqube:5432/sonarqube
            - name: SONARQUBE_JDBC_USERNAME
              value: sonarqube
          volumeMounts:
            - mountPath: /opt/sonarqube/data
              name: data
              subPath: data
            - mountPath: /opt/sonarqube/logs
              name: data
              subPath:  logs
            - mountPath: /opt/sonarqube/extensions
              name: data
              subPath:  extensions
      volumes:
        - name: data
          persistentVolumeClaim: 
            claimName: sonarqube-data
      nodeSelector: 
        node: worknode-dev

There are only es.log and sonar.log
Error02

Hi @JoannaWH and welcome to the community :wave:

This is actually not an error message. We don’t load any additional plugins into elasticsearch. In theory the next log message should read something like

2022.03.23 07:34:39 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (overlay)]], net usable_space [107.4gb], net total_space [467.6gb], types [overlay]
2022.03.23 07:34:39 INFO  es[][o.e.e.NodeEnvironment] heap size [494.9mb], compressed ordinary object pointers [true]

as it seems like this is not happening for you with the NFS PVC i can only guess that elastic fails to query the available net space of the data volume, so you assumption that it’s related to NFS is correct. ES might just need more time to query the available space over the network or do you no ship the information about the available space of the VPC?

in any case you should use at least SonarQube 8.9 which is the current LTS or 9.3 with is the latest release as of writing. 8.8 is EOL.