I have checked the folder permissions and removed sonarqube user from sudoers and tried but still the error is below
/usr/bin/java
Running SonarQube...
2024.11.20 18:49:51 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /var/sonarqube/temp
2024.11.20 18:49:51 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:41919]
2024.11.20 18:49:51 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /usr/lib/jvm/java-17-openjdk-17.0.13.0.11-3.el9.x86_64/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=/var/sonarqube/temp/conf/es -Des.distribution.type=tar -cp /opt/sonarqube/elasticsearch/lib/*:/opt/sonarqube/elasticsearch/lib/cli-launcher/* org.elasticsearch.launcher.CliToolLauncher
2024.11.20 18:49:51 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.11.20 18:50:25 INFO es[][o.e.n.Node] version[8.11.0], pid[1093], build[tar/d9ec3fa628c7b0ba3d25692e277ba26814820b20/2023-11-04T10:04:57.184859352Z], OS[Linux/5.14.0-427.13.1.el9_4.x86_64/amd64], JVM[Red Hat, Inc./OpenJDK 64-Bit Server VM/17.0.13/17.0.13+11-LTS]
2024.11.20 18:50:25 INFO es[][o.e.n.Node] JVM home [/usr/lib/jvm/java-17-openjdk-17.0.13.0.11-3.el9.x86_64], using bundled JDK [false]
2024.11.20 18:50:25 INFO es[][o.e.n.Node] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -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, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=org.elasticsearch.preallocate, -XX:+UseG1GC, -Djava.io.tmpdir=/var/sonarqube/temp, -XX:ErrorFile=/opt/sonarqube/logs/es_hs_err_pid%p.log, -Xlog:disable, -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, -Djna.tmpdir=/var/sonarqube/temp, -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, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=COMPAT, -Dcom.redhat.fips=false, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=tar, --module-path=/opt/sonarqube/elasticsearch/lib, --add-modules=jdk.net, --add-modules=ALL-MODULE-PATH, -Djdk.module.main=org.elasticsearch.server]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [x-pack-core]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [old-lucene-versions]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [parent-join]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [lang-painless]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [rest-root]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [x-pack-redact]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [reindex]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [analysis-common]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [x-pack-security]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [apm]
2024.11.20 18:50:29 INFO es[][o.e.p.PluginsService] loaded module [aggregations]
2024.11.20 18:50:36 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (/dev/mapper/rl_vbox-root)]], net usable_space [14gb], net total_space [16.9gb], types [xfs]
2024.11.20 18:50:36 INFO es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
2024.11.20 18:50:36 INFO es[][o.e.n.Node] node name [sonarqube], node ID [vUyzHxkqTlGGef_nJljW6w], cluster name [sonarqube], roles [transform, data_content, data_warm, master, remote_cluster_client, data, data_cold, ingest, data_frozen, ml, data_hot]
2024.11.20 18:50:39 INFO es[][o.e.x.s.Security] Security is disabled
2024.11.20 18:50:39 INFO es[][o.e.t.n.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=4mb, heap_size=512mb}]
2024.11.20 18:50:39 INFO es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
2024.11.20 18:50:40 INFO es[][o.e.d.DiscoveryModule] using discovery type [single-node] and seed hosts providers [settings]
2024.11.20 18:50:41 INFO es[][o.e.n.Node] initialized
2024.11.20 18:50:41 INFO es[][o.e.n.Node] starting ...
2024.11.20 18:50:51 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:41919}, bound_addresses {127.0.0.1:41919}
2024.11.20 18:50:52 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2024.11.20 18:50:52 ERROR es[][o.e.b.Elasticsearch] node validation exception
[1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch. For more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.11/bootstrap-checks.html]
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.11/_maximum_map_count_check.html]
ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
2024.11.20 18:50:52 WARN es[][o.e.n.Node] unexpected exception while waiting for http server to close
java.util.concurrent.ExecutionException: java.lang.IllegalStateException: Can't move to stopped state when not started
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:?]
at java.util.concurrent.FutureTask.get(FutureTask.java:191) ~[?:?]
at org.elasticsearch.node.Node.prepareForClose(Node.java:1776) ~[elasticsearch-8.11.0.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.shutdown(Elasticsearch.java:468) ~[elasticsearch-8.11.0.jar:?]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
Caused by: java.lang.IllegalStateException: Can't move to stopped state when not started
at org.elasticsearch.common.component.Lifecycle.canMoveToStopped(Lifecycle.java:128) ~[elasticsearch-8.11.0.jar:?]
at org.elasticsearch.common.component.AbstractLifecycleComponent.stop(AbstractLifecycleComponent.java:73) ~[elasticsearch-8.11.0.jar:?]
at org.elasticsearch.node.Node.lambda$prepareForClose$59(Node.java:1768) ~[elasticsearch-8.11.0.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
... 1 more
2024.11.20 18:50:52 INFO es[][o.e.n.Node] stopping ...
2024.11.20 18:50:52 INFO es[][o.e.n.Node] stopped
2024.11.20 18:50:52 INFO es[][o.e.n.Node] closing ...
2024.11.20 18:50:52 INFO es[][o.e.n.Node] closed
ERROR: Elasticsearch exited unexpectedly, with exit code 78
2024.11.20 18:50:52 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 78
2024.11.20 18:50:52 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.11.20 18:50:52 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped```