SonarQube 8.8 Community Edition starts and immediately shuts down in AWS ECS deployment

Hello!

I’m trying to get SonarQube deployed into AWS ECS. I’m using:

  • SonarQube 8.8 community edition
  • AWS ECS Deployment (via Terraform)

Everything looks good but I’m getting a security warning and then the SonarQube shuts down. Here’s the startup log:

2021.04.08 12:27:31 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021.04.08 12:27:31 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:42855]
2021.04.08 12:27:31 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2021.04.08 12:27:31 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
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021.04.08 12:27:35 INFO  es[][o.e.n.Node] version[7.11.2], pid[30], build[default/tar/3e5a16cfec50876d20ea77b075070932c6464c7d/2021-03-06T05:54:38.141101Z], OS[Linux/4.14.225-169.362.amzn2.x86_64/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/11.0.10/11.0.10+9]
2021.04.08 12:27:35 INFO  es[][o.e.n.Node] JVM home [/opt/java/openjdk]
2021.04.08 12:27:35 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/opt/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, -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, -Djava.locale.providers=COMPAT, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Dnode.store.allow_mmap=false, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2021.04.08 12:27:36 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2021.04.08 12:27:36 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2021.04.08 12:27:36 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2021.04.08 12:27:36 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2021.04.08 12:27:36 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021.04.08 12:27:36 INFO  es[][o.e.p.PluginsService] no plugins loaded
2021.04.08 12:27:36 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (overlay)]], net usable_space [24.7gb], net total_space [29.4gb], types [overlay]
2021.04.08 12:27:36 INFO  es[][o.e.e.NodeEnvironment] heap size [503.6mb], compressed ordinary object pointers [true]
2021.04.08 12:27:36 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [Ibqvs_B0TZemkR_AHMMFYg], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021.04.08 12:27:41 INFO  es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=false, g1gc_region_size=0b, heap_size=503.6mb}]
2021.04.08 12:27:42 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021.04.08 12:27:42 INFO  es[][o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
2021.04.08 12:27:43 INFO  es[][o.e.n.Node] initialized
2021.04.08 12:27:43 INFO  es[][o.e.n.Node] starting ...
2021.04.08 12:27:43 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:42855}, bound_addresses {127.0.0.1:42855}
2021.04.08 12:27:43 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.04.08 12:27:43 INFO  es[][o.e.c.c.Coordinator] setting initial configuration to VotingConfiguration{Ibqvs_B0TZemkR_AHMMFYg}
2021.04.08 12:27:44 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{Ibqvs_B0TZemkR_AHMMFYg}{eWo2m5guQU6jto9a7nmSfg}{127.0.0.1}{127.0.0.1:42855}{dimr}{rack_id=sonarqube} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 1, version: 1, delta: master node changed {previous [], current [{sonarqube}{Ibqvs_B0TZemkR_AHMMFYg}{eWo2m5guQU6jto9a7nmSfg}{127.0.0.1}{127.0.0.1:42855}{dimr}{rack_id=sonarqube}]}
2021.04.08 12:27:44 INFO  es[][o.e.c.c.CoordinationState] cluster UUID set to [zL_MUdtNSw6ondX0peMwgg]
2021.04.08 12:27:44 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{Ibqvs_B0TZemkR_AHMMFYg}{eWo2m5guQU6jto9a7nmSfg}{127.0.0.1}{127.0.0.1:42855}{dimr}{rack_id=sonarqube}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
2021.04.08 12:27:44 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2021.04.08 12:27:44 INFO  es[][o.e.n.Node] started
2021.04.08 12:27:44 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2021.04.08 12:27:44 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2021.04.08 12:27:44 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /opt/java/openjdk/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/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 -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.19.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process6420031660881745623properties
2021.04.08 12:27:45 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2021.04.08 12:27:46 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2021.04.08 12:27:47 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://localhost:9001]
2021.04.08 12:27:48 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 8.8.0.42792 / 8ea4b78e406a28fece1dbce33ae74e87c26f59ed
2021.04.08 12:27:48 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://terraform-20210408115531447300000004.c76iqw8evgoa.us-east-1.rds.amazonaws.com:5432/sonar
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2021.04.08 12:27:50 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin C# Code Quality and Security / 8.19.0.28253 / 43bcae4fd8532e1edd55c8e7af3357431bbd7240
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin CSS Code Quality and Security / 1.4.0.1899 / 00c77dfd101c06a6181f0c3f024957a42eba9b8e
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Flex Code Quality and Security / 2.6.0.2294 / 64746e0c588ddd44f3216ae1ee02a01bcf6b2dac
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Go Code Quality and Security / 1.8.2.1946 / e5d905c22abff18761b80fa66a2d92c2aeb6dcf7
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin HTML Code Quality and Security / 3.3.0.2534 / 18c0ca03dae915ebe9bc9bd71345b3290db1d5a5
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JaCoCo / 1.1.0.898 / f65b288e6c2888393bd7fb72ad7ac1425f88eebf
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Java Code Quality and Security / 6.14.0.25463 / b79132dcad3a5774922be73bdfbf455fdb8a66ff
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JavaScript/TypeScript Code Quality and Security / 7.3.0.15071 / 62d9b763a54933850abed9c51c088e5c456fe963
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Kotlin Code Quality and Security / 1.8.2.1946 / e5d905c22abff18761b80fa66a2d92c2aeb6dcf7
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin PHP Code Quality and Security / 3.16.0.7320 / 20c2a2e768cf58fffb17816091f4c8f333bd2d1e
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Python Code Quality and Security / 3.4.0.7980 / ed304c18d2838aa56be0f734e975c497c56bb534
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Ruby Code Quality and Security / 1.8.2.1946 / e5d905c22abff18761b80fa66a2d92c2aeb6dcf7
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Scala Code Quality and Security / 1.8.2.1946 / e5d905c22abff18761b80fa66a2d92c2aeb6dcf7
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin VB.NET Code Quality and Security / 8.19.0.28253 / 43bcae4fd8532e1edd55c8e7af3357431bbd7240
2021.04.08 12:27:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin XML Code Quality and Security / 2.1.0.2861 / b718c01f1720379b8080d16437de4d9198a84683
2021.04.08 12:27:51 INFO  web[][o.s.s.p.d.m.c.PostgresCharsetHandler] Verify that database charset supports UTF8
2021.04.08 12:27:51 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@1df9eb50 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2021.04.08 12:27:52 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2021.04.08 12:27:54 INFO  web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)
2021.04.08 12:27:55 INFO  web[][o.s.s.e.IndexCreator] Create index [metadatas]
2021.04.08 12:27:55 INFO  es[][o.e.c.m.MetadataCreateIndexService] [metadatas] creating index, cause [api], templates [], shards [1]/[0]
2021.04.08 12:27:56 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[metadatas][0]]]).
2021.04.08 12:27:56 INFO  web[][o.s.s.e.IndexCreator] Create type metadatas/metadata
2021.04.08 12:27:56 INFO  es[][o.e.c.m.MetadataMappingService] [metadatas/8RFwYAZjRSezKzeDKvjp1Q] create_mapping [metadata]
2021.04.08 12:27:57 INFO  web[][o.s.s.e.IndexCreator] Create index [components]
2021.04.08 12:27:57 INFO  es[][o.e.c.m.MetadataCreateIndexService] [components] creating index, cause [api], templates [], shards [5]/[0]
2021.04.08 12:27:57 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[components][4]]]).
2021.04.08 12:27:57 INFO  web[][o.s.s.e.IndexCreator] Create type components/auth
2021.04.08 12:27:57 INFO  es[][o.e.c.m.MetadataMappingService] [components/QPfAAnLNSyCHki0uV97WXw] create_mapping [auth]
2021.04.08 12:27:58 INFO  web[][o.s.s.e.IndexCreator] Create index [projectmeasures]
2021.04.08 12:27:58 INFO  es[][o.e.c.m.MetadataCreateIndexService] [projectmeasures] creating index, cause [api], templates [], shards [5]/[0]
2021.04.08 12:27:58 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[projectmeasures][4]]]).
2021.04.08 12:27:58 INFO  web[][o.s.s.e.IndexCreator] Create type projectmeasures/auth
2021.04.08 12:27:58 INFO  es[][o.e.c.m.MetadataMappingService] [projectmeasures/QatDG1pZQJeZrVrf8w7pZA] create_mapping [auth]
2021.04.08 12:27:58 INFO  web[][o.s.s.e.IndexCreator] Create index [rules]
2021.04.08 12:27:58 INFO  es[][o.e.c.m.MetadataCreateIndexService] [rules] creating index, cause [api], templates [], shards [2]/[0]
2021.04.08 12:27:59 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[rules][0]]]).
2021.04.08 12:27:59 INFO  web[][o.s.s.e.IndexCreator] Create type rules/rule
2021.04.08 12:27:59 INFO  es[][o.e.c.m.MetadataMappingService] [rules/gEA8PZ4sRZeooPIRUoaxqQ] create_mapping [rule]
2021.04.08 12:27:59 INFO  web[][o.s.s.e.IndexCreator] Create index [issues]
2021.04.08 12:27:59 INFO  es[][o.e.c.m.MetadataCreateIndexService] [issues] creating index, cause [api], templates [], shards [5]/[0]
2021.04.08 12:27:59 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[issues][4]]]).
2021.04.08 12:27:59 INFO  web[][o.s.s.e.IndexCreator] Create type issues/auth
2021.04.08 12:27:59 INFO  es[][o.e.c.m.MetadataMappingService] [issues/Ic1jor3jQ9604T9mQKz6vQ] create_mapping [auth]
2021.04.08 12:27:59 INFO  web[][o.s.s.e.IndexCreator] Create index [users]
2021.04.08 12:27:59 INFO  es[][o.e.c.m.MetadataCreateIndexService] [users] creating index, cause [api], templates [], shards [1]/[0]
2021.04.08 12:28:00 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[users][0]]]).
2021.04.08 12:28:00 INFO  web[][o.s.s.e.IndexCreator] Create type users/user
2021.04.08 12:28:00 INFO  es[][o.e.c.m.MetadataMappingService] [users/yxw4-jiaTeelFFv5bPt6iQ] create_mapping [user]
2021.04.08 12:28:00 INFO  web[][o.s.s.e.IndexCreator] Create index [views]
2021.04.08 12:28:00 INFO  es[][o.e.c.m.MetadataCreateIndexService] [views] creating index, cause [api], templates [], shards [5]/[0]
2021.04.08 12:28:00 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[views][4]]]).
2021.04.08 12:28:00 INFO  web[][o.s.s.e.IndexCreator] Create type views/view
2021.04.08 12:28:00 INFO  es[][o.e.c.m.MetadataMappingService] [views/lB41ZWmIQFiQv-U2xsx9xg] create_mapping [view]
2021.04.08 12:28:00 INFO  web[][o.s.s.s.LogServerId] Server ID: 29D4A711-AXixYZGpnFYXWv0g4Ufl
2021.04.08 12:28:00 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.
2021.04.08 12:28:01 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 137
2021.04.08 12:28:01 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021.04.08 12:28:01 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2021.04.08 12:28:01 WARN  app[][startup] ####################################################################################################################
2021.04.08 12:28:01 WARN  app[][startup] Default Administrator credentials are still being used. Make sure to change the password or deactivate the account.
2021.04.08 12:28:01 WARN  app[][startup] ####################################################################################################################
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/plugins/download
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/permissions/search_templates
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/list_bitbucketserver_projects
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/check_pat
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/list_azure_projects
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/search_bitbucketserver_repos
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/search_azure_repos
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/list_github_organizations
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/list_github_repositories
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/get_github_client_id
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_settings/get_binding
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_settings/list
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_settings/list_definitions
2021.04.08 12:28:01 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_settings/validate
2021.04.08 12:28:01 INFO  web[][o.s.s.t.TelemetryDaemon] Sharing of SonarQube statistics is enabled.
2021.04.08 12:28:01 INFO  web[][o.s.s.n.NotificationDaemon] Notification service started (delay 60 sec.)
2021.04.08 12:28:01 INFO  web[][o.s.s.n.NotificationDaemon] Notification service stopped
2021.04.08 12:28:01 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2021.04.08 12:28:01 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

What am I doing wrong/missing?

Thank you in advance,
Chuck

Seems the issue was memory. When I doubled the container memory from 1024 to 2048 everything is working.

Chuck