na basta C:\sonarqube\bin\windows-x86-64, cliquei e executei o arquivo StartSonar.bat
Starting SonarQube...
2023.01.11 18:41:16 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp
2023.01.11 18:41:16 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:51813]
2023.01.11 18:41:16 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\sonarqube\elasticsearch]: C:\Program Files\Java\jdk-11.0.10\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\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 -Djna.tmpdir=C:\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 -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube\elasticsearch -Des.path.conf=C:\sonarqube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2023.01.11 18:41:16 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.01.11 18:41:17 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.01.11 18:41:17 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\sonarqube]: C:\Program Files\Java\jdk-11.0.10\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.8.0.63668.jar;C:\sonarqube\lib\jdbc\h2\h2-2.1.214.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process14730392411754190022properties
uncaught exception in thread [main]
java.lang.IllegalStateException: failed to obtain node locks, tried [[C:\sonarqube\data\es7]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:328)
at org.elasticsearch.node.Node.<init>(Node.java:429)
at org.elasticsearch.node.Node.<init>(Node.java:309)
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:434)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:169)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
For complete error details, refer to the log at C:\sonarqube\logs\sonarqube.log
2023.01.11 18:41:20 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.01.11 18:41:20 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
Parece que você não tem um banco de dados configurado para o sonar!
O uso do sonar em on premise você precisa tanto do server do sonar como também do server de banco, na documentação eles trazem detalhes: Install the server
Outra opção seria utilizar o sonar cloud, aí você utilizaria como serviço e a gestão de infra não fica sob sua responsabilidade, diferente do modelo server que é o que você está seguindo aparentemente.
2023.01.11 20:58:01 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp
2023.01.11 20:58:01 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:51915]
2023.01.11 20:58:02 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\sonarqube\elasticsearch]: C:\Program Files\Java\jdk-11.0.10\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\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 -Djna.tmpdir=C:\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 -Delasticsearch -Des.path.home=C:\sonarqube\elasticsearch -Des.path.conf=C:\sonarqube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2023.01.11 20:58:02 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.01.11 20:58:04 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.01.11 20:58:04 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\sonarqube]: C:\Program Files\Java\jdk-11.0.10\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.8.0.63668.jar;C:\sonarqube\lib\jdbc\postgresql\postgresql-42.5.1.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process2730009529263711586properties
uncaught exception in thread [main]
java.lang.IllegalStateException: failed to obtain node locks, tried [[C:\sonarqube\data\es7]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:328)
at org.elasticsearch.node.Node.<init>(Node.java:429)
at org.elasticsearch.node.Node.<init>(Node.java:309)
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:434)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:169)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
For complete error details, refer to the log at C:\sonarqube\logs\sonarqube.log
2023.01.11 20:58:17 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.01.11 20:58:17 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
Starting SonarQube...
2023.01.12 06:40:52 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp
2023.01.12 06:40:52 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:51191]
2023.01.12 06:40:52 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\sonarqube\elasticsearch]: C:\Program Files\Java\jdk-11.0.10\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\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 -Djna.tmpdir=C:\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 -Delasticsearch -Des.path.home=C:\sonarqube\elasticsearch -Des.path.conf=C:\sonarqube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2023.01.12 06:40:52 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.01.12 06:40:53 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2023.01.12 06:40:53 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\sonarqube]: C:\Program Files\Java\jdk-11.0.10\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.8.0.63668.jar;C:\sonarqube\lib\jdbc\postgresql\postgresql-42.5.1.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process10106369022665362043properties
uncaught exception in thread [main]
java.lang.IllegalStateException: failed to obtain node locks, tried [[C:\sonarqube\data\es7]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:328)
at org.elasticsearch.node.Node.<init>(Node.java:429)
at org.elasticsearch.node.Node.<init>(Node.java:309)
at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:234)
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:434)
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:169)
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160)
at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
at org.elasticsearch.cli.Command.main(Command.java:77)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
For complete error details, refer to the log at C:\sonarqube\logs\sonarqube.log
2023.01.12 06:40:58 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2023.01.12 06:40:58 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
log
2023.01.12 06:40:55 INFO web[][o.s.p.ProcessEntryPoint] Starting Web Server
2023.01.12 06:40:58 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.8.0.63668 / 6498415c5112d868f6206d8bcc043a1dac92d1c4
2023.01.12 06:40:58 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost:5432/sonarqube
2023.01.12 06:40:58 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
2023.01.12 06:40:58 INFO web[][c.z.h.p.HikariPool] HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@30501e60
2023.01.12 06:40:58 INFO web[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
2023.01.12 06:40:58 WARN web[][o.s.d.d.PostgreSql] Upgrading PostgreSQL to 9.5 or greater is recommended for better performances
2023.01.12 06:40:58 INFO web[][o.s.p.ProcessEntryPoint] Hard stopping process
2023.01.12 06:40:59 WARN web[][o.s.p.ProcessEntryPoint$HardStopperThread] Can not stop in 1000ms
2023.01.12 06:41:00 INFO web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\sonarqube
2023.01.12 06:41:00 INFO web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy C# Code Quality and Security / 8.50.0.58025 / b62663db2d01b29e5ead5073eeedc844afa9f810
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Configuration detection fot Code Quality and Security / 1.2.0.267 / 4f37ba9ffb37a96d5883e52ad392ed32c5c6eaab
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Flex Code Quality and Security / 2.8.0.3166 / 01f66bdddc678966c81a9064ed139156a6a89c97
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Go Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy HTML Code Quality and Security / 3.7.1.3306 / d720acc6860c6d8b69ec4d17570a398a1e216da1
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy IaC Code Quality and Security / 1.9.2.2279 / f946157f4bbec5a6a1d40cf3418a0360c8c9c1f6
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy JaCoCo / 1.1.1.1157 / 83478572b9f23efac29de15e30c7758bbb0c0e47
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Java Code Quality and Security / 7.15.0.30507 / 38560b895cd402ea27f83282bd3a70f932e4ba5b
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy JavaScript/TypeScript/CSS Code Quality and Security / 9.12.0.20319 / a7588a17b691ac320d92028de2a67c8b408948a9
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Kotlin Code Quality and Security / 2.12.0.1956 / a6df1ae252bd62d63f8673c28f87ad14258a7904
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy PHP Code Quality and Security / 3.25.0.9077 / 62146fca3dce550eb1dde73881a14c7af4988269
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Python Code Quality and Security / 3.21.0.10628 / 1f02297794b3358650c48d069eb8ef4d7dd0f63c
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Ruby Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Scala Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy Text file Code Quality and Security / 1.2.0.510 / 376c635a3c13737fa70b3dd30e2d6ac39e4a9f9e
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy VB.NET Code Quality and Security / 8.50.0.58025 / b62663db2d01b29e5ead5073eeedc844afa9f810
2023.01.12 06:41:38 INFO web[][o.s.s.p.ServerPluginManager] Deploy XML Code Quality and Security / 2.6.1.3686 / 8935c6f8341cd50defba2d8245d91dc4d07e24d0
O problema que ele acusa ainda parece ser o mesmo, aparentemente pode ser falta permissão de escrita no diretório ou pode ser que haja mais de uma instância tentando tentando escrever no diretório.
Veja nos arquivos de configurações se algum deles apresenta a propriedade da mensagem de erro.