We initially first reported the issue here
But it looks like there is not much traction there, hopefully someone here has a workaround.
Thanks
PS: We also reported this issue with documentation.
Main Issue:
We’re currently running sonar developer version 8.4.1 with Postgres 12.6
If we follow the upgrade steps, sonarqube fails to start with the following error
sonarqube          | 2021.03.29 17:30:51 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
sonarqube          | 2021.03.29 17:30:51 ERROR app[][o.s.a.p.ManagedProcessHandler] Fail to launch process [es]
sonarqube          | org.sonar.process.MessageException: Property 'node.store.allow_mmapfs' is no longer supported. Use 'node.store.allow_mmap' instead.
sonarqube          | 2021.03.29 17:30:51 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
sonarqube          | 2021.03.29 17:30:51 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
sonarqube          | 2021.03.29 17:30:51 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
sonarqube exited with code 0
The issue seems to stem from Postgres
Our current docker-compose file is as follows
version: "3"
services:
###################
# SONARQUBE
###################
  sonarqube:
    container_name: sonarqube
    build:
      context: ./sonar
      dockerfile: Dockerfile.sonar
    # image: sonarqube:8.8-developer
    # depends_on:
      # - db
    networks:
      - sonarnet
    environment:
      # - SONAR_JDBC_URL=jdbc:postgresql://db:5432/sonar
      # - SONAR_JDBC_USERNAME=sonar
      # - SONAR_JDBC_PASSWORD=sonar
      # - SONAR_SEARCH_JAVAADDITIONALOPTS=-Dnode.store.allow_mmapfs=false
      - sonar.jdbc.url=jdbc:postgresql://db:5432/sonar
      - sonar.jdbc.username=sonar
      - sonar.jdbc.password=sonar
      - sonar.search.javaAdditionalOpts=-Dnode.store.allow_mmapfs=false
    volumes:
      - sonarqube_data:/opt/sonarqube/data
      - sonarqube_extensions:/opt/sonarqube/extensions
      - sonarqube_logs:/opt/sonarqube/logs
    restart: always
###################
# DB
###################
  db:
    image: postgres:12.6
    container_name: postgress
    networks:
      - sonarnet
    environment:
      - POSTGRES_USER=sonar
      - POSTGRES_PASSWORD=sonar
    volumes:
      - postgresql:/var/lib/postgresql
      # This needs explicit mapping due to https://github.com/docker-library/postgres/blob/4e48e3228a30763913ece952c611e5e9b95c8759/Dockerfile.template#L52
      - postgresql_data:/var/lib/postgresql/data
    restart: always
###################
# NGINX
###################
  nginx:
    container_name: nginx
    build:
      context: ./sonar
      dockerfile: Dockerfile.nginx
    ports:
      - "80:80"
      - "443:443"
    networks:
      - sonarnet
    restart: always
###########################################################
###########################################################
# NETWORKS
###########################################################
###########################################################
networks:
  sonarnet:
    driver: bridge
###########################################################
###########################################################
# VOLUMES
###########################################################
###########################################################
volumes:
  sonarqube_data:
    external:
      name: sonarqube_data
  sonarqube_extensions:
    external:
      name: sonarqube_extensions_8_4_1
      # name: sonarqube_extensions
  sonarqube_logs:
    external:
      name: sonarqube_logs
  postgresql:
    external:
      name: postgresql
  postgresql_data:
    external:
      name: postgresql_data
Dockerfile.sonar contents
FROM sonarqube:8.4.1-developer
#FROM sonarqube:8.8-developer
COPY sonar.properties /opt/sonarqube/conf/sonar.properties
We’ve tried with 8.6.1, 8.7.1 and 8.8, all the same behavior
For the remainder of this discussion assume that we want to upgrade to 8.8
So we changed the sonarqube environment format to match 8.8
      - SONAR_JDBC_URL=jdbc:postgresql://db:5432/sonar
      - SONAR_JDBC_USERNAME=sonar
      - SONAR_JDBC_PASSWORD=sonar
      - SONAR_SEARCH_JAVAADDITIONALOPTS=-Dnode.store.allow_mmapfs=false
instead of
      - sonar.jdbc.url=jdbc:postgresql://db:5432/sonar
      - sonar.jdbc.username=sonar
      - sonar.jdbc.password=sonar
      - sonar.search.javaAdditionalOpts=-Dnode.store.allow_mmapfs=false
In any case neither format works
If we remove the dependency on the Postgres and let the image build/run with internal db, then sonarqube runs and does not report an error,
however if we keep the Postgres dependency which is where our data resides, it fails with the above error.
Originally, we were running Postgres 11.9 and ran into the same issue, checked the latest supported Postgres version and upgraded to 12.6, Sonarqube 8.4.1 is working fine with it, but we need to upgrade.
Have we missed anything obvious? or is this a bug?
We appreciate any guidance / workaround in getting this resolved as we need to move to 8.7+ version of Sonarqube to avoid other issues.
Thanks






