This site can't be reached after running ./sonar.sh start

Hi I’m trying to install and run with a Developer edition license. I downloaded the zip file, unzipped it and run ./sonar.sh start inside the bin folder. The terminal showed that sonarqube is started but when I went to localhost:9000 it says this site can’t be reached. I didn’t change anything else. What should I do to run it properly?

These are the error logs:

2022.05.03 12:13:43 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/zack.tzeng/workspace/sonarqube-developer-9.4/temp
2022.05.03 12:13:43 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:49169]
2022.05.03 12:13:43 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/Users/zack.tzeng/workspace/sonarqube-developer-9.4/elasticsearch]: /Users/zack.tzeng/workspace/sonarqube-developer-9.4/elasticsearch/bin/elasticsearch
2022.05.03 12:13:43 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:416)
	at org.elasticsearch.bootstrap.Security.setSecurityManager(Security.java:99)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)
2022.05.03 12:13:43 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2022.05.03 12:13:43 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2022.05.03 12:13:43 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.


WARNING - Unable to load the Wrapper's native library because none of the
          following files:
            libwrapper-macosx-aarch64-64.dylib
            libwrapper-macosx-universal-64.dylib
            libwrapper.dylib
          could be located on the following java.library.path:
            /Users/zack.tzeng/workspace/sonarqube-developer-9.4/bin/macosx-universal-64/./lib
          Please see the documentation for the wrapper.java.library.path
          configuration property.
          System signals will not be handled correctly.

2022.05.03 12:26:51 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/zack.tzeng/workspace/sonarqube-developer-9.4/temp
2022.05.03 12:26:51 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:49364]
2022.05.03 12:26:52 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/Users/zack.tzeng/workspace/sonarqube-developer-9.4/elasticsearch]: /Users/zack.tzeng/workspace/sonarqube-developer-9.4/elasticsearch/bin/elasticsearch
2022.05.03 12:26:52 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Exception in thread "main" java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
	at java.base/java.lang.System.setSecurityManager(System.java:416)
	at org.elasticsearch.bootstrap.Security.setSecurityManager(Security.java:99)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:70)
2022.05.03 12:26:52 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 1
2022.05.03 12:26:52 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2022.05.03 12:26:52 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

These three files are not in the right folder:

libwrapper-macosx-aarch64-64.dylib
libwrapper-macosx-universal-64.dylib
libwrapper.dylib

Does anyone know how to get these?

Hey there.

You probably have Java 17 installed rather than Java 11, which is the required JVM to run SonarQube. Can you check this? (java -version)

Thanks @Colin I do indeed. I will downgrade my Java and see if that works.

If I have multiple versions of Java, how do I tell Sonarqube to reference a specific version?

With Java 11 set as the default Java version, I no longer received the same files not found in the folder error like before. However, I still can’t access the Sonarqube login page.

Here are the logs:

--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2022.05.04 09:57:02 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/zack.tzeng/Documents/tmp-0504/sonarqube-8.9.8.54436/temp
2022.05.04 09:57:02 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:49644]
2022.05.04 09:57:02 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/Users/zack.tzeng/Documents/tmp-0504/sonarqube-8.9.8.54436/elasticsearch]: /Users/zack.tzeng/Documents/tmp-0504/sonarqube-8.9.8.54436/elasticsearch/bin/elasticsearch
2022.05.04 09:57:02 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
2022.05.04 09:57:03 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2022.05.04 09:57:03 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/Users/zack.tzeng/Documents/tmp-0504/sonarqube-8.9.8.54436]: /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/zack.tzeng/Documents/tmp-0504/sonarqube-8.9.8.54436/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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-8.9.8.54436.jar:/Users/zack.tzeng/Documents/tmp-0504/sonarqube-8.9.8.54436/lib/jdbc/h2/h2-1.4.199.jar org.sonar.server.app.WebServer /Users/zack.tzeng/Documents/tmp-0504/sonarqube-8.9.8.54436/temp/sq-process9629889771863654467properties
2022.05.04 09:57:05 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2022.05.04 09:57:05 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2022.05.04 09:57:05 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2022.05.04 09:57:05 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

I cannot tell what’s wrong in my setting from this.

I appreciate any helps.

What do the different files in your /logs/ folder say?

It turned out that I had to change the min and max heap size of sonar.web.javaOpts, sonar.ce.javaOpts and sonar.search.javaOpts to 1024m. I also need to change the port numbers used by sonar.search.port, sonar.web.port and sonar.embeddedDatabase.port. They are probably in used by another application. After that Sonarqube was able to run.

@Colin thanks so much for your help!!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.