I can't connect SonarQube with PostgreSQL

Hello, I have installed SonarQube on my Windows 10 laptop and using the embedded database it works perfectly but when i try connecting it with PostgresSQL I am not able to make it work.

I am going to list the versions that I have installed of the programs that are required (according to the guide on how to start) in case I have done something wrong from the beginning:

And the specs of my laptop are:

  • Windows 10 Pro (Lenovo)
  • 8 GB RAM
  • Intel Core i5-7300U CPU @ 2.60GHz
  • Intel HD Graphics 620
  • HDD 250 GB

Problem:

When i try to go to my localhost:9000 chrome show me an 404 response

but… i think that Sonar is connected successfully because pgAdmin show me this:

and in my db, Sonar has created a lot of tables like:
image


Logs files:

sonar.log

–> Wrapper Started as Console

Launching a JVM...

Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org

  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2020.10.26 17:56:36 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp

2020.10.26 17:56:36 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001

2020.10.26 17:56:36 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube\elasticsearch]: C:\Program Files\Java\jdk-11.0.9\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -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 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=C:\sonarqube\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube\elasticsearch -Des.path.conf=C:\sonarqube\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch

2020.10.26 17:56:36 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

2020.10.26 17:56:37 INFO  app[][o.e.p.PluginsService] no modules loaded

2020.10.26 17:56:37 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]

2020.10.26 17:56:56 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up

2020.10.26 17:56:56 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube]: C:\Program Files\Java\jdk-11.0.9\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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djdk.http.auth.tunneling.disabledSchemes="" -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*;C:\sonarqube\lib\jdbc\postgresql\postgresql-42.2.16.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process14432228867215012775properties

2020.10.26 17:57:17 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up

2020.10.26 17:57:17 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='ce', ipcIndex=3, logFilenamePrefix=ce]] from [C:\sonarqube]: C:\Program Files\Java\jdk-11.0.9\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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*;C:\sonarqube\lib\jdbc\postgresql\postgresql-42.2.16.jar org.sonar.ce.app.CeServer C:\sonarqube\temp\sq-process15163537187359355453properties

2020.10.26 17:57:26 INFO  app[][o.s.a.SchedulerImpl] Process[ce] is up

2020.10.26 17:57:26 INFO  app[][o.s.a.SchedulerImpl] SonarQube is up
es.log
2020.10.26 17:56:42 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[System (C:)]], net usable_space [126.1gb], net total_space [237.8gb], types [NTFS]

2020.10.26 17:56:42 INFO  es[][o.e.e.NodeEnvironment] heap size [494.9mb], compressed ordinary object pointers [true]

2020.10.26 17:56:42 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [DP3HMD5zQe6ni94hxqd7OA]

2020.10.26 17:56:42 INFO  es[][o.e.n.Node] version[6.8.4], pid[12508], build[unknown/unknown/bca0c8d/2019-10-16T06:19:49.319352Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/11.0.9/11.0.9+7-LTS]

2020.10.26 17:56:42 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -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, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=C:\sonarqube\temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:+HeapDumpOnOutOfMemoryError, -Delasticsearch, -Des.path.home=C:\sonarqube\elasticsearch, -Des.path.conf=C:\sonarqube\temp\conf\es]

2020.10.26 17:56:43 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]

2020.10.26 17:56:43 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]

2020.10.26 17:56:43 INFO  es[][o.e.p.PluginsService] loaded module [mapper-extras]

2020.10.26 17:56:43 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]

2020.10.26 17:56:43 INFO  es[][o.e.p.PluginsService] loaded module [percolator]

2020.10.26 17:56:43 INFO  es[][o.e.p.PluginsService] loaded module [repository-url]

2020.10.26 17:56:43 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]

2020.10.26 17:56:43 INFO  es[][o.e.p.PluginsService] no plugins loaded

2020.10.26 17:56:47 WARN  es[][o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.

2020.10.26 17:56:49 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and host providers [settings]

2020.10.26 17:56:50 INFO  es[][o.e.n.Node] initialized

2020.10.26 17:56:50 INFO  es[][o.e.n.Node] starting ...

2020.10.26 17:56:51 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}

2020.10.26 17:56:51 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks

2020.10.26 17:56:54 INFO  es[][o.e.c.s.MasterService] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {sonarqube}{DP3HMD5zQe6ni94hxqd7OA}{5bkfx_7sTtelTYRnNZf9XQ}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}

2020.10.26 17:56:54 INFO  es[][o.e.c.s.ClusterApplierService] new_master {sonarqube}{DP3HMD5zQe6ni94hxqd7OA}{5bkfx_7sTtelTYRnNZf9XQ}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: apply cluster state (from master [master {sonarqube}{DP3HMD5zQe6ni94hxqd7OA}{5bkfx_7sTtelTYRnNZf9XQ}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])

2020.10.26 17:56:54 INFO  es[][o.e.n.Node] started

2020.10.26 17:56:54 INFO  es[][o.e.g.GatewayService] recovered [7] indices into cluster_state

2020.10.26 17:56:56 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[components][4], [components][0], [metadatas][0]] ...]).
ce.log
2020.10.26 17:57:19 INFO  ce[][o.s.p.ProcessEntryPoint] Starting ce

2020.10.26 17:57:19 INFO  ce[][o.s.ce.app.CeServer] Compute Engine starting up...

2020.10.26 17:57:20 INFO  ce[][o.e.p.PluginsService] no modules loaded

2020.10.26 17:57:20 INFO  ce[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]

2020.10.26 17:57:20 INFO  ce[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]

2020.10.26 17:57:20 INFO  ce[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]

2020.10.26 17:57:23 INFO  ce[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]

2020.10.26 17:57:23 INFO  ce[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://127.0.0.1:5432/postgres

2020.10.26 17:57:25 INFO  ce[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\sonarqube

2020.10.26 17:57:25 INFO  ce[][o.s.c.c.CePluginRepository] Load plugins

2020.10.26 17:57:26 INFO  ce[][o.s.c.c.ComputeEngineContainerImpl] Running Community edition

2020.10.26 17:57:26 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is operational

2020.10.26 17:57:28 INFO  ce[][o.s.c.t.CeWorkerImpl] worker AXVl19uP6HG5rCvtY1Ie found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
web.log
2020.10.26 17:56:58 INFO  web[][o.s.p.ProcessEntryPoint] Starting web

2020.10.26 17:56:58 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read

2020.10.26 17:56:59 WARN  web[][o.a.c.u.SessionIdGeneratorBase] Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [398] milliseconds.

2020.10.26 17:57:01 INFO  web[][o.e.p.PluginsService] no modules loaded

2020.10.26 17:57:01 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]

2020.10.26 17:57:01 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]

2020.10.26 17:57:01 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]

2020.10.26 17:57:03 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]

2020.10.26 17:57:03 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 8.5.0.37579 / 20b0f1c71ae6cf793f1607fa0d46adc574b9dbdd

2020.10.26 17:57:03 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://127.0.0.1:5432/postgres

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\sonarqube

2020.10.26 17:57:05 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin C# Code Quality and Security / 8.13.1.21947 / 6b0b8a220b9698836e5489199ca0a4e09bc778ff

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin CSS Code Quality and Security / 1.3.0.1580 / 750f1f3498bad86babd886888b2dae8a1213f8f4

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JaCoCo / 1.1.0.898 / f65b288e6c2888393bd7fb72ad7ac1425f88eebf

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Java Code Quality and Security / 6.8.0.23379 / 1eb56f1dc616bc0c52994040288593bc0170136f

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JavaScript/TypeScript Code Quality and Security / 6.5.0.13383 / 571826181a8fdfbefd8d16a8a020f48b9d74676b

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin PHP Code Quality and Security / 3.9.0.6331 / 5951b3f0be60713cb05ec3608734e2489a4b0670

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Python Code Quality and Security / 3.1.0.7619 / afa4cc5b20ce4ae18a7cba39f196ea7bee64eaa0

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin SonarFlex / 2.5.1.1831 / a0c44437f6abb0feec76edd073f91fec64db2a6c

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin SonarGo / 1.6.0.719 / edcc6a9e42fcdd30bb6f84a779c6cd7009ec72fd

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin SonarHTML / 3.2.0.2082 / 997a51b39c4d0a5399c73a8fb729030a69eb392b

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin SonarKotlin / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin SonarRuby / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin SonarScala / 1.5.0.315 / 4ff3a145a58f3f84f1b39846a205a129d742e993

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin SonarXML / 2.0.1.2020 / c5b84004face582d56f110e24c29bf9c6a679e69

2020.10.26 17:57:05 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin VB.NET Code Quality and Security / 8.13.1.21947 / 6b0b8a220b9698836e5489199ca0a4e09bc778ff

2020.10.26 17:57:06 INFO  web[][o.s.s.p.d.m.c.PostgresCharsetHandler] Verify that database charset supports UTF8

2020.10.26 17:57:06 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@3b1eb896 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]

2020.10.26 17:57:06 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000

2020.10.26 17:57:08 INFO  web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)

2020.10.26 17:57:09 INFO  web[][o.s.s.s.LogServerId] Server ID: 8D11EB71-AXVQCYL-2bsXlgBjZGtH

2020.10.26 17:57:09 WARN  web[][o.s.s.a.LogOAuthWarning] For security reasons, OAuth authentication should use HTTPS. You should set the property 'Administration > Configuration > Server base URL' to a HTTPS URL.

2020.10.26 17:57:09 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/plugins/download

2020.10.26 17:57:09 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/permissions/search_templates

2020.10.26 17:57:09 INFO  web[][o.s.s.t.TelemetryDaemon] Sharing of SonarQube statistics is enabled.

2020.10.26 17:57:09 INFO  web[][o.s.s.n.NotificationDaemon] Notification service started (delay 60 sec.)

2020.10.26 17:57:09 INFO  web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired session tokens has removed 0 elements

2020.10.26 17:57:09 INFO  web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired SAML message ids has removed 0 elements

2020.10.26 17:57:09 INFO  web[][o.s.s.s.GeneratePluginIndex] Generate scanner plugin index

2020.10.26 17:57:09 INFO  web[][o.s.s.s.RegisterPlugins] Register plugins

2020.10.26 17:57:09 INFO  web[][o.s.s.s.RegisterMetrics] Register metrics

2020.10.26 17:57:09 INFO  web[][o.s.s.r.RegisterRules] Register rules

2020.10.26 17:57:16 INFO  web[][o.s.s.q.BuiltInQProfileRepositoryImpl] Load quality profiles

2020.10.26 17:57:16 WARN  web[][o.s.p.j.JavaScriptProfilesDefinition] Adding security ruleKeys []

2020.10.26 17:57:16 WARN  web[][o.s.p.j.JavaScriptProfilesDefinition] Adding security ruleKeys []

2020.10.26 17:57:16 WARN  web[][o.s.p.j.JavaScriptProfilesDefinition] Adding security ruleKeys []

2020.10.26 17:57:16 WARN  web[][o.s.p.j.JavaScriptProfilesDefinition] Adding security ruleKeys []

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Register quality profiles

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile css/Sonar way

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile scala/Sonar way

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile jsp/Sonar way

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile kotlin/Sonar way

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile go/Sonar way

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile js/Sonar way

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile js/Sonar way Recommended

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile py/Sonar way

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile ruby/Sonar way

2020.10.26 17:57:16 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile cs/Sonar way

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile java/Sonar way

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile web/Sonar way

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile xml/Sonar way

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile flex/Sonar way

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile php/Sonar way

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile php/PSR-2

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile php/Drupal

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile vbnet/Sonar way

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile ts/Sonar way

2020.10.26 17:57:17 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile ts/Sonar way recommended

2020.10.26 17:57:17 INFO  web[][o.s.s.s.RegisterPermissionTemplates] Register permission templates

2020.10.26 17:57:17 INFO  web[][o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys

2020.10.26 17:57:17 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@75c1679d [pattern=UrlPattern{inclusions=[/api/issues/delete_comment.*, ...], exclusions=[/api/authentication/login.*, ...]}]

2020.10.26 17:57:17 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceReroutingFilter@1baf83e3 [pattern=UrlPattern{inclusions=[/api/components/bulk_update_key, ...], exclusions=[]}]

2020.10.26 17:57:17 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.InitFilter@10de51a6 [pattern=UrlPattern{inclusions=[/sessions/init/*], exclusions=[]}]

2020.10.26 17:57:17 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.OAuth2CallbackFilter@64335437 [pattern=UrlPattern{inclusions=[/oauth2/callback/*], exclusions=[]}]

2020.10.26 17:57:17 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.LoginAction@4380cf1 [pattern=UrlPattern{inclusions=[/api/authentication/login], exclusions=[]}]

2020.10.26 17:57:17 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.LogoutAction@5a698cf9 [pattern=UrlPattern{inclusions=[/api/authentication/logout], exclusions=[]}]

2020.10.26 17:57:17 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.ValidateAction@31434687 [pattern=UrlPattern{inclusions=[/api/authentication/validate], exclusions=[]}]

2020.10.26 17:57:17 INFO  web[][o.s.s.q.ProjectsInWarningDaemon] Counting number of projects in warning is not started as there are no projects in this situation.

2020.10.26 17:57:17 INFO  web[][o.s.s.p.p.PlatformLevelStartup] Running Community Edition

2020.10.26 17:57:17 INFO  web[][o.s.s.p.Platform] WebServer is operational
access.log
0:0:0:0:0:0:0:1 - - [26/oct./2020:18:02:04 +0100] "GET / HTTP/1.1" 404 - "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" "-"

0:0:0:0:0:0:0:1 - - [26/oct./2020:18:02:05 +0100] "GET /favicon.ico HTTP/1.1" 404 - "http://localhost:9000/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36" "-"

Hi,

I don’t see anything unusual in your logs (bravo for including them all without prompting. Extra points for the collapse functionality! :smile:) except the access log call for the 404 page.

Did you edit $SONARQUBE-HOME/conf/sonar.properties to run on a different port? At a different context/path?

 
Ann

Nope, I thought it could be a port problem, but I closed all the applications and even tried two different things:

  1. Use a different computer.

  2. Use docker by following this guide on GitHub

But none of that worked for me.
Tomorrow as soon as possible, I try to use another port and I will reply with the results.

At first I thought it could also be this bug, because I was running the executable from the desktop.
I tried to move it directly to C:\Sonar but from there I was not able to make it work either. Also I even tried running it as administrator. And nothing. :cry: :sob:

I’m asking for help, we should be to make things as easy as possible, but thanks :heart_eyes:

Hi,

So let’s back up. Before you start SonarQube, ports 9000 and 9001 are available. You start SonarQube (error-free) and those ports are in use.

From the same machine you point a browser at http://localhost:9000 and get… what in the browser?

 
Ann

Hi :smile:
With only SonarQube started (without PostgreSQL installed ) it works perfectly and yesterday i tried SonarScanner (again with the embeded database) and works!

Its when i try to connect SonarQube with PostgreSQL when an 404 error appear

Hi,

Can you double-check your browser console for errors? Since you’re pointing your SQ server from one DB (embedded H2) to another, messed-up Elasticsearch indices make sense here, but they wouldn’t produce a 404 AFAIK.

 
Ann

Do you mean my logs?

Hi,

No, I really meant your browser console. I’m grasping at straws here.

 
Ann

I’m sorry for answering delay
Mi chrome logs only shows this:

image

If you need my sonar.propierties:

# Property values can:

# - be overridden by environment variables. The name of the corresponding environment variable is the

#   upper-cased name of the property where all the dot ('.') and dash ('-') characters are replaced by

#   underscores ('_'). For example, to override 'sonar.web.systemPasscode' use 'SONAR_WEB_SYSTEMPASSCODE'.

# - be encrypted. See https://redirect.sonarsource.com/doc/settings-encryption.html

#--------------------------------------------------------------------------------------------------

# DATABASE

#

# IMPORTANT:

# - The embedded H2 database is used by default. It is recommended for tests but not for

#   production use. Supported databases are Oracle, PostgreSQL and Microsoft SQLServer.

# - Changes to database connection URL (sonar.jdbc.url) can affect SonarSource licensed products.

# User credentials.

# Permissions to create tables, indices and triggers must be granted to JDBC user.

# The schema must be created first.

sonar.jdbc.username=postgres

sonar.jdbc.password=SecretPassword

#----- Embedded Database (default)

# H2 embedded database server listening port, defaults to 9092

#sonar.embeddedDatabase.port=9092

#----- Oracle 11g/12c/18c/19c

# The Oracle JDBC driver must be copied into the directory extensions/jdbc-driver/oracle/.

# Only the thin client is supported, and we recommend using the latest Oracle JDBC driver. See

# https://jira.sonarsource.com/browse/SONAR-9758 for more details.

# If you need to set the schema, please refer to http://jira.sonarsource.com/browse/SONAR-5000

#sonar.jdbc.url=jdbc:oracle:thin:@localhost:1521/XE

#----- PostgreSQL 9.3 or greater

# By default the schema named "public" is used. It can be overridden with the parameter "currentSchema".

sonar.jdbc.url=jdbc:postgresql://127.0.0.1:5432/postgres

#----- Microsoft SQLServer 2014/2016/2017 and SQL Azure

# A database named sonar must exist and its collation must be case-sensitive (CS) and accent-sensitive (AS)

# Use the following connection string if you want to use integrated security with Microsoft Sql Server

# Do not set sonar.jdbc.username or sonar.jdbc.password property if you are using Integrated Security

# For Integrated Security to work, you have to download the Microsoft SQL JDBC driver package from

# https://www.microsoft.com/en-us/download/details.aspx?id=55539

# and copy sqljdbc_auth.dll to your path. You have to copy the 32 bit or 64 bit version of the dll

# depending upon the architecture of your server machine.

#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true

# Use the following connection string if you want to use SQL Auth while connecting to MS Sql Server.

# Set the sonar.jdbc.username and sonar.jdbc.password appropriately.

#sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=sonar

#----- Connection pool settings

# The maximum number of active connections that can be allocated

# at the same time, or negative for no limit.

# The recommended value is 1.2 * max sizes of HTTP pools. For example if HTTP ports are

# enabled with default sizes (50, see property sonar.web.http.maxThreads)

# then sonar.jdbc.maxActive should be 1.2 * 50 = 60.

#sonar.jdbc.maxActive=60

# The maximum number of connections that can remain idle in the

# pool, without extra ones being released, or negative for no limit.

#sonar.jdbc.maxIdle=5

# The minimum number of connections that can remain idle in the pool,

# without extra ones being created, or zero to create none.

#sonar.jdbc.minIdle=2

# The maximum number of milliseconds that the pool will wait (when there

# are no available connections) for a connection to be returned before

# throwing an exception, or <= 0 to wait indefinitely.

#sonar.jdbc.maxWait=5000

#sonar.jdbc.minEvictableIdleTimeMillis=600000

#sonar.jdbc.timeBetweenEvictionRunsMillis=30000

#--------------------------------------------------------------------------------------------------

# WEB SERVER

# Web server is executed in a dedicated Java process. By default heap size is 512MB.

# Use the following property to customize JVM options.

#    Recommendations:

#

#    The HotSpot Server VM is recommended. The property -server should be added if server mode

#    is not enabled by default on your environment:

#    http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html

#

#    Startup can be long if entropy source is short of entropy. Adding

#    -Djava.security.egd=file:/dev/./urandom is an option to resolve the problem.

#    See https://wiki.apache.org/tomcat/HowTo/FasterStartUp#Entropy_Source

#

# sonar.web.javaOpts=-Xmx1024m -XX: -XX:+HeapDumpOnOutOfMemoryError

sonar.web.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djdk.http.auth.tunneling.disabledSchemes=""

# Same as previous property, but allows to not repeat all other settings like -Xmx

#sonar.web.javaAdditionalOpts=

# Binding IP address. For servers with more than one IP address, this property specifies which

# address will be used for listening on the specified ports.

# By default, ports will be used on all IP addresses associated with the server.

sonar.web.host=0.0.0.0

# Web context. When set, it must start with forward slash (for example /sonarqube).

# The default value is root context (empty value).

sonar.web.context=/sonarqube-dev

# TCP port for incoming HTTP connections. Default value is 9000.

sonar.web.port=9000

# The maximum number of connections that the server will accept and process at any given time.

# When this number has been reached, the server will not accept any more connections until

# the number of connections falls below this value. The operating system may still accept connections

# based on the sonar.web.connections.acceptCount property. The default value is 50.

#sonar.web.http.maxThreads=50

# The minimum number of threads always kept running. The default value is 5.

#sonar.web.http.minThreads=5

# The maximum queue length for incoming connection requests when all possible request processing

# threads are in use. Any requests received when the queue is full will be refused.

# The default value is 25.

#sonar.web.http.acceptCount=25

# By default users are logged out and sessions closed when server is restarted.

# If you prefer keeping user sessions open, a secret should be defined. Value is

# HS256 key encoded with base64. It must be unique for each installation of SonarQube.

# Example of command-line:

# echo -n "type_what_you_want" | openssl dgst -sha256 -hmac "key" -binary | base64

#sonar.auth.jwtBase64Hs256Secret=

# The inactivity timeout duration of user sessions, in minutes. After the configured

# period of time, the user is logged out.

# The default value is set to 3 days (4320 minutes).

# It must be set between 5 minutes and 3 months.

# Value must be strictly positive.

#sonar.web.sessionTimeoutInMinutes=4320

# A passcode can be defined to access some web services from monitoring

# tools without having to use the credentials of a system administrator.

# Check the Web API documentation to know which web services are supporting this authentication mode.

# The passcode should be provided in HTTP requests with the header "X-Sonar-Passcode".

# By default feature is disabled.

#sonar.web.systemPasscode=

#--------------------------------------------------------------------------------------------------

# SSO AUTHENTICATION

# Enable authentication using HTTP headers

#sonar.web.sso.enable=false

# Name of the header to get the user login.

# Only alphanumeric, '.' and '@' characters are allowed

#sonar.web.sso.loginHeader=X-Forwarded-Login

# Name of the header to get the user name

#sonar.web.sso.nameHeader=X-Forwarded-Name

# Name of the header to get the user email (optional)

#sonar.web.sso.emailHeader=X-Forwarded-Email

# Name of the header to get the list of user groups, separated by comma (optional).

# If the sonar.sso.groupsHeader is set, the user will belong to those groups if groups exist in SonarQube.

# If none of the provided groups exists in SonarQube, the user will only belong to the default group.

# Note that the default group will always be set.

#sonar.web.sso.groupsHeader=X-Forwarded-Groups

# Interval used to know when to refresh name, email and groups.

# During this interval, if for instance the name of the user is changed in the header, it will only be updated after X minutes.

#sonar.web.sso.refreshIntervalInMinutes=5

#--------------------------------------------------------------------------------------------------

# LDAP CONFIGURATION

# Enable the LDAP feature

# sonar.security.realm=LDAP

# Set to true when connecting to a LDAP server using a case-insensitive setup.

# sonar.authenticator.downcase=true

# URL of the LDAP server. Note that if you are using ldaps, then you should install the server certificate into the Java truststore.

# ldap.url=ldap://localhost:10389

# Bind DN is the username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory (optional)

# ldap.bindDn=cn=sonar,ou=users,o=mycompany

# Bind Password is the password of the user to connect with. Leave this blank for anonymous access to the LDAP directory (optional)

# ldap.bindPassword=secret

# Possible values: simple | CRAM-MD5 | DIGEST-MD5 | GSSAPI See http://java.sun.com/products/jndi/tutorial/ldap/security/auth.html (default: simple)

# ldap.authentication=simple

# See :

#   * http://java.sun.com/products/jndi/tutorial/ldap/security/digest.html

#   * http://java.sun.com/products/jndi/tutorial/ldap/security/crammd5.html

# (optional)

# ldap.realm=example.org

# Context factory class (optional)

# ldap.contextFactoryClass=com.sun.jndi.ldap.LdapCtxFactory

# Enable usage of StartTLS (default : false)

# ldap.StartTLS=true

# Follow or not referrals. See http://docs.oracle.com/javase/jndi/tutorial/ldap/referral/jndi.html (default: true)

# ldap.followReferrals=false

# USER MAPPING

# Distinguished Name (DN) of the root node in LDAP from which to search for users (mandatory)

# ldap.user.baseDn=cn=users,dc=example,dc=org

# LDAP user request. (default: (&(objectClass=inetOrgPerson)(uid={login})) )

# ldap.user.request=(&(objectClass=user)(sAMAccountName={login}))

# Attribute in LDAP defining the user’s real name. (default: cn)

# ldap.user.realNameAttribute=name

# Attribute in LDAP defining the user’s email. (default: mail)

# ldap.user.emailAttribute=email

# GROUP MAPPING

# Distinguished Name (DN) of the root node in LDAP from which to search for groups. (optional, default: empty)

# ldap.group.baseDn=cn=groups,dc=example,dc=org

# LDAP group request (default: (&(objectClass=groupOfUniqueNames)(uniqueMember={dn})) )

# ldap.group.request=(&(objectClass=group)(member={dn}))

# Property used to specifiy the attribute to be used for returning the list of user groups in the compatibility mode. (default: cn)

# ldap.group.idAttribute=sAMAccountName

#--------------------------------------------------------------------------------------------------

# COMPUTE ENGINE

# The Compute Engine is responsible for processing background tasks.

# Compute Engine is executed in a dedicated Java process. Default heap size is 512MB.

# Use the following property to customize JVM options.

#    Recommendations:

#

#    The HotSpot Server VM is recommended. The property -server should be added if server mode

#    is not enabled by default on your environment:

#    http://docs.oracle.com/javase/8/docs/technotes/guides/vm/server-class.html

#

#sonar.ce.javaOpts=-Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError

# Same as previous property, but allows to not repeat all other settings like -Xmx

#sonar.ce.javaAdditionalOpts=

#--------------------------------------------------------------------------------------------------

# ELASTICSEARCH

# Elasticsearch is used to facilitate fast and accurate information retrieval.

# It is executed in a dedicated Java process. Default heap size is 512MB.

#

# --------------------------------------------------

# Word of caution for Linux users on 64bits systems

# --------------------------------------------------

# Please ensure Virtual Memory on your system is correctly configured for Elasticsearch to run properly

# (see https://www.elastic.co/guide/en/elasticsearch/reference/5.5/vm-max-map-count.html for details).

#

# When SonarQube runs standalone, a warning such as the following may appear in logs/es.log:

#      "max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]"

# When SonarQube runs as a cluster, however, Elasticsearch will refuse to start.

#

# JVM options of Elasticsearch process

#sonar.search.javaOpts=-Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError

# Same as previous property, but allows to not repeat all other settings like -Xmx

#sonar.search.javaAdditionalOpts=

# Elasticsearch port. Default is 9001. Use 0 to get a free port.

# As a security precaution, should be blocked by a firewall and not exposed to the Internet.

#sonar.search.port=9001

# Elasticsearch host. The search server will bind this address and the search client will connect to it.

# Default is loopback address.

# As a security precaution, should NOT be set to a publicly available address.

#sonar.search.host=

#--------------------------------------------------------------------------------------------------

# UPDATE CENTER

# Update Center requires an internet connection to request https://update.sonarsource.org

# It is enabled by default.

#sonar.updatecenter.activate=true

# HTTP proxy (default none)

#http.proxyHost=

#http.proxyPort=

# HTTPS proxy (defaults are values of http.proxyHost and http.proxyPort)

#https.proxyHost=

#https.proxyPort=

# NT domain name if NTLM proxy is used

#http.auth.ntlm.domain=

# SOCKS proxy (default none)

#socksProxyHost=

#socksProxyPort=

# Proxy authentication (used for HTTP, HTTPS and SOCKS proxies)

#http.proxyUser=

#http.proxyPassword=

# Proxy exceptions: list of hosts that can be accessed without going through the proxy

#                   separated by the '|' character, wildcard character '*' can be used for pattern matching

#                   used for HTTP and HTTPS (default none)

#                   (note: localhost and its literal notations (127.0.0.1, ...) are always excluded)

#http.nonProxyHosts=

#--------------------------------------------------------------------------------------------------

# LOGGING

# SonarQube produces logs in 4 logs files located in the same directory (see property sonar.path.logs below),

# one per process:

#   Main process (aka. App) logs in sonar.log

#   Web Server (aka. Web) logs in web.log

#   Compute Engine (aka. CE) logs in ce.log

#   Elasticsearch (aka. ES) logs in es.log

#

# All 4 files follow the same rolling policy (see sonar.log.rollingPolicy and sonar.log.maxFiles) but it applies

# individually (eg. if sonar.log.maxFiles=4, there can be at most 4 of each files, ie. 16 files in total).

#

# All 4 files have logs in the same format:

#           1           2    3           4                       5                                                   6

# |-----------------| |---| |-|--------------------||------------------------------| |------------------------------------------------------------------------------------------------------------------------------|

# 2016.11.16 16:47:00 INFO  ce[AVht0dNXFcyiYejytc3m][o.s.s.c.t.CeWorkerCallableImpl] Executed task | project=org.sonarqube:example-java-maven | type=REPORT | id=AVht0dNXFcyiYejytc3m | submitter=admin | time=1699ms

#

# 1: timestamp. Format is YYYY.MM.DD HH:MM:SS

#    YYYY: year on 4 digits

#    MM: month on 2 digits

#    DD: day on 2 digits

#    HH: hour of day on 2 digits in 24 hours format

#    MM: minutes on 2 digits

#    SS: seconds on 2 digits

# 2: log level.

#    Possible values (in order of descending criticality): ERROR, WARN, INFO, DEBUG and TRACE

# 3: process identifier. Possible values: app (main), web (Web Server), ce (Compute Engine) and es (Elasticsearch)

# 4: SQ thread identifier. Can be empty.

#    In the Web Server, if present, it will be the HTTP request ID.

#    In the Compute Engine, if present, it will be the task ID.

# 5: logger name. Usually a class canonical name.

#    Package names are truncated to keep the whole field to 20 characters max

# 6: log payload. Content of this field does not follow any specific format, can vary in length and include line returns.

#    Some logs, however, will follow the convention to provide data in payload in the format " | key=value"

#    Especially, log of profiled pieces of code will end with " | time=XXXXms".

# Global level of logs (applies to all 4 processes).

# Supported values are INFO (default), DEBUG and TRACE

#sonar.log.level=INFO

# Level of logs of each process can be controlled individually with their respective properties.

# When specified, they overwrite the level defined at global level.

# Supported values are INFO, DEBUG and TRACE

#sonar.log.level.app=INFO

#sonar.log.level.web=INFO

#sonar.log.level.ce=INFO

#sonar.log.level.es=INFO

# Path to log files. Can be absolute or relative to installation directory.

# Default is <installation home>/logs

sonar.path.logs=logs

# Rolling policy of log files

#    - based on time if value starts with "time:", for example by day ("time:yyyy-MM-dd")

#      or by month ("time:yyyy-MM")

#    - based on size if value starts with "size:", for example "size:10MB"

#    - disabled if value is "none".  That needs logs to be managed by an external system like logrotate.

#sonar.log.rollingPolicy=time:yyyy-MM-dd

# Maximum number of files to keep if a rolling policy is enabled.

#    - maximum value is 20 on size rolling policy

#    - unlimited on time rolling policy. Set to zero to disable old file purging.

#sonar.log.maxFiles=7

# Access log is the list of all the HTTP requests received by server. If enabled, it is stored

# in the file {sonar.path.logs}/access.log. This file follows the same rolling policy as other log file

# (see sonar.log.rollingPolicy and sonar.log.maxFiles).

#sonar.web.accessLogs.enable=true

# Format of access log. It is ignored if sonar.web.accessLogs.enable=false. Possible values are:

#    - "common" is the Common Log Format, shortcut to: %h %l %u %user %date "%r" %s %b

#    - "combined" is another format widely recognized, shortcut to: %h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}"

#    - else a custom pattern. See http://logback.qos.ch/manual/layouts.html#AccessPatternLayout.

# The login of authenticated user is not implemented with "%u" but with "%reqAttribute{LOGIN}" (since version 6.1).

# The value displayed for anonymous users is "-".

# The SonarQube's HTTP request ID can be added to the pattern with "%reqAttribute{ID}" (since version 6.2).

# If SonarQube is behind a reverse proxy, then the following value allows to display the correct remote IP address:

#sonar.web.accessLogs.pattern=%i{X-Forwarded-For} %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" "%reqAttribute{ID}"

# Default value (which was "combined" before version 6.2) is equivalent to "combined + SQ HTTP request ID":

#sonar.web.accessLogs.pattern=%h %l %u [%t] "%r" %s %b "%i{Referer}" "%i{User-Agent}" "%reqAttribute{ID}"

#--------------------------------------------------------------------------------------------------

# OTHERS

# Delay in seconds between processing of notification queue. Default is 60 seconds.

#sonar.notifications.delay=60

# Paths to persistent data files (embedded database and search index) and temporary files.

# Can be absolute or relative to installation directory.

# Defaults are respectively <installation home>/data and <installation home>/temp

sonar.path.data=data

sonar.path.temp=temp

# Telemetry - Share anonymous SonarQube statistics

# By sharing anonymous SonarQube statistics, you help us understand how SonarQube is used so we can improve the product to work even better for you.

# We don't collect source code or IP addresses. And we don't share the data with anyone else.

# To see an example of the data shared: login as a global administrator, call the WS api/system/info and check the Statistics field.

#sonar.telemetry.enable=true

#--------------------------------------------------------------------------------------------------

# DEVELOPMENT - only for developers

# The following properties MUST NOT be used in production environments.

# Elasticsearch HTTP connector

#sonar.search.httpPort=-1

Hi,

Thanks for providing your server properties.

Your screenshot shows that you’re trying to access localhost:9000, which is the default address for SonarQube. However, you’re not operating with default configs:

I’ve never uncommented the host address before, but the interwebs tells me that should be okay.

You’ve uncommented the port but left it at the default value, so you’re good there. But you did also edit the context. I asked about that earlier because it alters the path on which you’ll find SonarQube.

The fact that you’ve been getting a 404 indicates that a web server is up an listening. Now we know that it is SonarQube’s underlying Tomcat & we’re just not asking for the right thing. You should apparently be asking for:

http://localhost:9000/sonarqube-dev

 
HTH,
Ann

1 Like

Indeed, this was the problem. Sorry, I know it was a very silly and noob mistake, but right now I am starting in the world of technology and with sonar at the same time.

Many thanks <3

1 Like

We all started somewhere and believe me, I’ve asked pleeenty of noob questions in my time. :smiley:

Feel free to come back when you have more questions. The underlying idea behind SonarQube (and its sister products) is to help people be better developers. That’s why we put so much effort into writing teaching rule descriptions. I’m glad I could help you.

 
:slightly_smiling_face:
Ann

1 Like

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