Apple silicon support SonarQube and SonarScanner

Does SonarQube support apple silicon m1 chip? I have completed setup with docker but localhost:9000 url not working.
Want to run analysis for android project.

amodkanthe@SM4025 ~ % docker pull sonarqube

Using default tag: latest

latest: Pulling from library/sonarqube

no matching manifest for linux/arm64/v8 in the manifest list entries

Used linux/amb64 image as there was no image availabe for apple silicon

Hi @amod.kanthe,

Welcome to the community!

At that point, SonarQube doesn’t support the Apple M1 system which is based on arm.
On which kind of machine do you plan to run SonarQube? Are you doing a test on your personal machine or do you plan to run SonarQube or the CI on a M1-based server?

Chris

Hi @Chris
Not the OP but I have the same issue. We already have Jenkins running on an M1 machine and would like to migrate Sonar there as well. I tried to force-install the linux/x86_64 version, but it wouldn’t boot up (somewhat expectedly). Is there no possible workaround? I suppose only some kind of a virtual machine setup on the M1?

Hi @JonatanPlesko,

I don’t know what could be the workarounds. I invite you to take a look at the Get help category and to post there if needed.
Could you please let me know which kind of M1 machine you are using (a physical server, a virtual instance in the cloud) and if there’s a specific reason for using such an architecture? For example, do you need it you to build iOS and macOS applications?

Chris

It is a physical on-site Mac Mini. We build both Android and iOS apps on it, and we see significant performance improvements for both compared to the old architecture.
I can create a new topic in the Get help category if you think that’s more relevant. I posted here to avoid opening new topics, and this does mainly seem like a feature request.

You’re at the right place to share your need for the support of M1.
Thanks for the explanations.

Same issue here. I could not pull the image on my MacBook with Apple M1 Chip.
developer: Pulling from library/sonarqube
no matching manifest for linux/arm64/v8 in the manifest list entries

On Apple M1, it’s theorically possible to run images with Rosetta by using the --platform linux/amd64 option:

docker run -it --rm --platform linux/amd64 --name sonarqube -e SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true -p 9000:9000 sonarqube:latest

I’ve tried it on my machine without success :man_shrugging:

Docker logs
Dropping Privileges
2022.02.28 17:54:17 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2022.02.28 17:54:17 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:45921]
2022.02.28 17:54:17 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2022.02.28 17:54:18 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2022.02.28 17:54:26 WARN  es[][o.e.b.JNANatives] unable to install syscall filter: 
java.lang.UnsupportedOperationException: seccomp unavailable: CONFIG_SECCOMP not compiled into kernel, CONFIG_SECCOMP and CONFIG_SECCOMP_FILTER are needed
	at org.elasticsearch.bootstrap.SystemCallFilter.linuxImpl(SystemCallFilter.java:347) ~[el	at org.elasticsearch.bootstrap.SystemCallFilter.linuxImpl(SystemCallFilter.java:347) ~[elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.SystemCallFilter.init(SystemCallFilter.java:638) ~[elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.JNANatives.tryInstallSystemCallFilter(JNANatives.java:255) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.Natives.tryInstallSystemCallFilter(Natives.java:102) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:112) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:183) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:434) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) [elasticsearch-cli-7.16.3.jar:7.16.3]
	at org.elasticsearch.cli.Command.main(Command.java:77) [elasticsearch-cli-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122) [elasticsearch-7.16.3.jar:7.16.3]
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) [elasticsearch-7.16.3.jar:7.16.3]
2022.02.28 17:54:28 INFO  es[][o.e.n.Node] version[7.16.3], pid[75], build[default/tar/4e6e4eab2297e949ec994e688dad46290d018022/2022-01-06T23:43:02.825887787Z], OS[Linux/5.10.76-linuxkit/amd64], JVM[Alpine/OpenJDK 64-Bit Server VM/11.0.14/11.0.14+9-alpine-r0]
2022.02.28 17:54:28 INFO  es[][o.e.n.Node] JVM home [/usr/lib/jvm/java-11-openjdk]
2022.02.28 17:54:28 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseG1GC, -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, -Djna.tmpdir=/opt/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, -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]
2022.02.28 17:54:30 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2022.02.28 17:54:30 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2022.02.28 17:54:30 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2022.02.28 17:54:30 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2022.02.28 17:54:30 INFO  es[][o.e.p.PluginsService] no plugins loaded
2022.02.28 17:54:30 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (overlay)]], net usable_space [33.7gb], net total_space [58.4gb], types [overlay]
2022.02.28 17:54:30 INFO  es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
2022.02.28 17:54:30 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [YwMRUA_4QwKGTHWo03OeSA], cluster name [sonarqube], roles [data_frozen, master, remote_cluster_client, data, data_content, data_hot, data_warm, data_cold, ingest]
2022.02.28 17:54:45 INFO  es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=256kb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=1mb, heap_size=512mb}]
2022.02.28 17:54:45 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2022.02.28 17:54:47 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
2022.02.28 17:54:47 INFO  es[][o.e.n.Node] initialized
2022.02.28 17:54:47 INFO  es[][o.e.n.Node] starting ...
2022.02.28 17:54:48 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:45921}, bound_addresses {127.0.0.1:45921}
2022.02.28 17:54:49 WARN  es[][o.e.b.BootstrapChecks] system call filters failed to install; check the logs and fix your configuration or disable system call filters at your own risk
2022.02.28 17:54:49 INFO  es[][o.e.c.c.Coordinator] setting initial configuration to VotingConfiguration{YwMRUA_4QwKGTHWo03OeSA}
2022.02.28 17:54:50 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{YwMRUA_4QwKGTHWo03OeSA}{7AC3MU0pTg6Mcdk_PG1N6A}{127.0.0.1}{127.0.0.1:45921}{cdfhimrsw} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 1, version: 1, delta: master node changed {previous [], current [{sonarqube}{YwMRUA_4QwKGTHWo03OeSA}{7AC3MU0pTg6Mcdk_PG1N6A}{127.0.0.1}{127.0.0.1:45921}{cdfhimrsw}]}
2022.02.28 17:54:50 INFO  es[][o.e.c.c.CoordinationState] cluster UUID set to [fhTwXGAlSR6wQwdI0GRS8Q]
2022.02.28 17:54:50 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{YwMRUA_4QwKGTHWo03OeSA}{7AC3MU0pTg6Mcdk_PG1N6A}{127.0.0.1}{127.0.0.1:45921}{cdfhimrsw}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
2022.02.28 17:54:50 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2022.02.28 17:54:50 INFO  es[][o.e.n.Node] started
2022.02.28 17:54:50 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2022.02.28 17:54:51 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2022.02.28 17:54:51 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-11-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 --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.3.0.51899.jar:/opt/sonarqube/lib/jdbc/h2/h2-1.4.199.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process1092583089813612620properties
2022.02.28 17:54:54 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2022.02.28 17:54:57 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2022.02.28 17:55:00 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://localhost:9001]
2022.02.28 17:55:02 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.3.0.51899 / 1a276267d04cd4df862d57201082413946b6b3fa
2022.02.28 17:55:03 INFO  web[][o.s.s.p.d.EmbeddedDatabase] Starting embedded database on port 9092 with url jdbc:h2:tcp://127.0.0.1:9092/sonar
2022.02.28 17:55:03 INFO  web[][o.s.s.p.d.EmbeddedDatabase] Embedded database started. Data stored in: /opt/sonarqube/data
2022.02.28 17:55:04 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://127.0.0.1:9092/sonar
2022.02.28 17:55:04 WARN  web[][o.s.db.dialect.H2] H2 database should be used for evaluation purpose only.
2022.02.28 17:55:09 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2022.02.28 17:55:09 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2022.02.28 17:55:09 INFO  web[][o.s.s.p.d.m.h.MigrationHistoryTableImpl] Creating table schema_migrations
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin C# Code Quality and Security / 8.34.0.42011 / 7e01861b987ff6ebaef0ce378b5d90a3c8012f96
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Configuration detection fot Code Quality and Security / 1.2.0.267 / 4f37ba9ffb37a96d5883e52ad392ed32c5c6eaab
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Flex Code Quality and Security / 2.7.0.2865 / 9e61d9774455b25eefd0b71bf8903cb030641864
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Go Code Quality and Security / 1.9.0.3429 / faf3c08c0ebf3a877186442cd4a0ddd50de079a8
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin HTML Code Quality and Security / 3.6.0.3106 / 963bdc9f051f5dcb698b418790364231aeea04f2
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin IaC Code Quality and Security / 1.5.0.1600 / 49f85d3bb8f38ae65ec0edf4fc109761e68fb488
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JaCoCo / 1.1.1.1157 / 83478572b9f23efac29de15e30c7758bbb0c0e47
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Java Code Quality and Security / 7.7.0.28547 / be7b25484ea63cc345b695fc5b1d40ccacc3e0b6
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JavaScript/TypeScript Code Quality and Security / 8.8.0.17228 / a3815936a51aa720d54bf0e04a9e351c3c0ad642
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Kotlin Code Quality and Security / 2.9.0.1147 / 6ce439214a685d4aabde6461fd609a9a9c1df1c6
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin PHP Code Quality and Security / 3.22.1.8626 / 68787fc2bf0b446b0fa5e3c1943ee14fd91ee79d
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Python Code Quality and Security / 3.9.0.9230 / 8241f6a6f0bdd5175741f8b4e302fc6942f2f248
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Ruby Code Quality and Security / 1.9.0.3429 / faf3c08c0ebf3a877186442cd4a0ddd50de079a8
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Scala Code Quality and Security / 1.9.0.3429 / faf3c08c0ebf3a877186442cd4a0ddd50de079a8
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Text file Code Quality and Security / 1.0.0.120 / b7539037caf5df01cc49bb7820a0c23f35196f0e
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin VB.NET Code Quality and Security / 8.34.0.42011 / 7e01861b987ff6ebaef0ce378b5d90a3c8012f96
2022.02.28 17:55:10 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin XML Code Quality and Security / 2.5.0.3376 / 3b089c16cf0736c56f4fdb2fc88ddad59e7ca45d
2022.02.28 17:55:13 WARN  web[][o.s.a.s.w.WebService$Action] Description is not set on action api/monitoring/metrics
2022.02.28 17:55:13 WARN  web[][o.s.a.s.w.WebService$Action] Since is not set on action api/monitoring/metrics
2022.02.28 17:55:13 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/monitoring/metrics
2022.02.28 17:55:13 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2022.02.28 17:55:13 INFO  web[][o.s.s.p.d.m.AutoDbMigration] Automatically perform DB migration on fresh install
2022.02.28 17:55:13 INFO  web[][DbMigrations] Executing DB migrations...
2022.02.28 17:55:13 INFO  web[][DbMigrations] #1 'Create initial schema'...
2022.02.28 17:55:14 INFO  web[][DbMigrations] #1 'Create initial schema': success | time=1008ms
2022.02.28 17:55:14 INFO  web[][DbMigrations] #2 'Populate initial schema'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #2 'Populate initial schema': success | time=959ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5001 'Drop PK on 'uuid' for 'ce_activity' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5001 'Drop PK on 'uuid' for 'ce_activity' table': success | time=45ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5002 'Drop 'ce_activity_uuid' index'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5002 'Drop 'ce_activity_uuid' index': success | time=45ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5003 'Recreate PK on 'uuid' for 'ce_activity' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5003 'Recreate PK on 'uuid' for 'ce_activity' table': success | time=41ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5004 'Drop PK on 'uuid' for 'events' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5004 'Drop PK on 'uuid' for 'events' table': success | time=18ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5005 'Drop 'events_uuid' index'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5005 'Drop 'events_uuid' index': success | time=16ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5006 'Recreate PK on 'uuid' for 'events' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5006 'Recreate PK on 'uuid' for 'events' table': success | time=20ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5007 'Drop PK on 'kee' for 'issues' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5007 'Drop PK on 'kee' for 'issues' table': success | time=17ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5008 'Drop 'issues_kee' index'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5008 'Drop 'issues_kee' index': success | time=16ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5009 'Recreate PK on 'kee' for 'issues' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5009 'Recreate PK on 'kee' for 'issues' table': success | time=8ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5010 'Drop PK on 'kee' for 'snapshots' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5010 'Drop PK on 'kee' for 'snapshots' table': success | time=14ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5011 'Drop 'analyses_uuid' index'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5011 'Drop 'analyses_uuid' index': success | time=24ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5012 'Recreate PK on 'kee' for 'snapshots' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #5012 'Recreate PK on 'kee' for 'snapshots' table': success | time=14ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #6001 'Drop 'manual_measures_component_uuid' index'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #6001 'Drop 'manual_measures_component_uuid' index': success | time=44ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #6002 'Drop 'manual_measures' table'...
2022.02.28 17:55:15 INFO  web[][DbMigrations] #6002 'Drop 'manual_measures' table': success | time=45ms
2022.02.28 17:55:15 INFO  web[][DbMigrations] #6003 'Drop custom metrics data from 'live_measures' table'...
2022.02.28 17:55:16 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 0 rows processed (0 items/sec)
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6003 'Drop custom metrics data from 'live_measures' table': success | time=391ms
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6004 'Drop custom metrics data from 'project_measures' table'...
2022.02.28 17:55:16 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 0 rows processed (0 items/sec)
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6004 'Drop custom metrics data from 'project_measures' table': success | time=169ms
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6005 'Drop custom metrics data from 'metrics' table'...
2022.02.28 17:55:16 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 0 rows processed (0 items/sec)
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6005 'Drop custom metrics data from 'metrics' table': success | time=150ms
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6006 'Drop 'user_managed' column from 'metrics' table'...
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6006 'Drop 'user_managed' column from 'metrics' table': success | time=224ms
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6007 'Create Audit table'...
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6007 'Create Audit table': success | time=38ms
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6008 'Add column 'removed' to 'plugins' table'...
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6008 'Add column 'removed' to 'plugins' table': success | time=135ms
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6009 'Alter column 'client_secret' of 'alm_settings' table to length 160'...
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6009 'Alter column 'client_secret' of 'alm_settings' table to length 160': success | time=30ms
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6010 'Alter column 'private_key' of 'alm_settings' table to length 2500'...
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6010 'Alter column 'private_key' of 'alm_settings' table to length 2500': success | time=28ms
2022.02.28 17:55:16 INFO  web[][DbMigrations] #6011 'Create 'portfolios' table'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6011 'Create 'portfolios' table': success | time=33ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6012 'Create unique index for 'kee' in 'portfolios''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6012 'Create unique index for 'kee' in 'portfolios'': success | time=21ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6013 'Create 'portfolio_references' table'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6013 'Create 'portfolio_references' table': success | time=31ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6014 'Create unique index for 'portfolio_references''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6014 'Create unique index for 'portfolio_references'': success | time=32ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6015 'Create 'portfolio_projects' table'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6015 'Create 'portfolio_projects' table': success | time=42ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6016 'Create unique index for 'portfolio_projects''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6016 'Create unique index for 'portfolio_projects'': success | time=20ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6017 'Migrate portfolios to new tables'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6017 'Migrate portfolios to new tables': success | time=24ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6018 'Create index for 'issue_changes' on 'issue_key' and 'change_type''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6018 'Create index for 'issue_changes' on 'issue_key' and 'change_type'': success | time=20ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6019 'Remove SVN related properties'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6019 'Remove SVN related properties': success | time=16ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6101 'Change size of column 'selection_expression' in 'Portfolios''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6101 'Change size of column 'selection_expression' in 'Portfolios'': success | time=25ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6102 'Migrate Bitbucket.org authentication plugin settings to built-in authentication settings'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6102 'Migrate Bitbucket.org authentication plugin settings to built-in authentication settings': success | time=12ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6103 'Create column quick_fix_available in 'issues''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6103 'Create column quick_fix_available in 'issues'': success | time=164ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6104 'Create qgate_user_permissions Table'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6104 'Create qgate_user_permissions Table': success | time=32ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6105 'Create qgate_group_permissions Table'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6105 'Create qgate_group_permissions Table': success | time=18ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6106 'Create column sonarlint_ad_seen in 'users''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6106 'Create column sonarlint_ad_seen in 'users'': success | time=123ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6107 'Upsert value of sonarlint_ad_seen in 'users''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6107 'Upsert value of sonarlint_ad_seen in 'users'': success | time=16ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6108 'Change size of column 'kee' in 'components''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6108 'Change size of column 'kee' in 'components'': success | time=32ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6109 'Create table 'portfolio_proj_branches''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6109 'Create table 'portfolio_proj_branches'': success | time=21ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6110 'Add column 'branch_key' to table 'portfolios''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6110 'Add column 'branch_key' to table 'portfolios'': success | time=98ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6111 'Change size of column 'kee' in 'components''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6111 'Change size of column 'kee' in 'components'': success | time=39ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6112 'Create 'project_badge_token' Table'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6112 'Create 'project_badge_token' Table': success | time=23ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6113 'Deprecate quality profile 'Sonar way Recommended' for js and ts'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6113 'Deprecate quality profile 'Sonar way Recommended' for js and ts': success | time=39ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6114 'Drop the 'sonar.lf.aboutText' property value'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6114 'Drop the 'sonar.lf.aboutText' property value': success | time=12ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6201 'Fix usage of deprecated column in MSSQL'...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6201 'Fix usage of deprecated column in MSSQL': success | time=4ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6202 'Drop index 'uniq_portfolio_references''...
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6202 'Drop index 'uniq_portfolio_references'': success | time=18ms
2022.02.28 17:55:17 INFO  web[][DbMigrations] #6203 'Add column 'branch_uuid' to 'portfolio_references''...
2022.02.28 17:55:18 INFO  web[][DbMigrations] #6203 'Add column 'branch_uuid' to 'portfolio_references'': success | time=215ms
2022.02.28 17:55:18 INFO  web[][DbMigrations] #6204 'Create index 'uniq_portfolio_references''...
2022.02.28 17:55:18 INFO  web[][DbMigrations] #6204 'Create index 'uniq_portfolio_references'': success | time=22ms
2022.02.28 17:55:18 INFO  web[][DbMigrations] #6205 'Create table 'new_code_reference_branch_issues''...
2022.02.28 17:55:18 INFO  web[][DbMigrations] #6205 'Create table 'new_code_reference_branch_issues'': success | time=18ms
2022.02.28 17:55:18 INFO  web[][DbMigrations] #6206 'Create index 'uniq_new_code_reference_issues''...
2022.02.28 17:55:18 INFO  web[][DbMigrations] #6206 'Create index 'uniq_new_code_reference_issues'': success | time=14ms
2022.02.28 17:55:18 INFO  web[][DbMigrations] Executed DB migrations: success | time=4815ms
2022.02.28 17:55:18 INFO  web[][o.s.s.p.Platform] Database has been automatically updated
2022.02.28 17:55:18 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@68aa5d3d [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2022.02.28 17:55:18 INFO  web[][o.s.s.p.DetectPluginChange] Detect plugin changes
2022.02.28 17:55:18 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2022.02.28 17:55:28 INFO  web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)
2022.02.28 17:55:47 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 137
2022.02.28 17:55:47 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2022.02.28 17:55:47 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2022.02.28 17:55:48 WARN  web[][o.s.p.ProcessEntryPoint$HardStopperThread] Can not stop in 1000ms
2022.02.28 17:55:48 WARN  web[][o.s.s.a.EmbeddedTomcat] Failed to stop web server
org.apache.catalina.LifecycleException: A child container failed during stop
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:1007)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:486)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:784)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
	at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:450)
	at org.sonar.server.app.EmbeddedTomcat.terminate(EmbeddedTomcat.java:112)
	at org.sonar.server.app.WebServer.hardStop(WebServer.java:84)
	at org.sonar.process.ProcessEntryPoint$HardStopperThread.lambda$new$0(ProcessEntryPoint.java:219)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
2022.02.28 17:55:50 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.es.ElasticsearchException: Fail to execute es requestES indices exists request on indices 'metadatas'
	at org.sonar.server.es.EsClient.execute(EsClient.java:313)
	at org.sonar.server.es.EsClient.indexExists(EsClient.java:187)
	at org.sonar.server.es.IndexCreator.start(IndexCreator.java:85)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:623)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
	at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.elasticsearch.ElasticsearchException: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2695)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:2171)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:2154)
	at org.elasticsearch.client.IndicesClient.exists(IndicesClient.java:1279)
	at org.sonar.server.es.EsClient.lambda$indexExists$20(EsClient.java:187)
	at org.sonar.server.es.EsClient.execute(EsClient.java:311)
	... 20 common frames omitted
Caused by: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(BaseFuture.java:257)
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:244)
	at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:75)
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2692)
	... 25 common frames omitted
Caused by: java.net.ConnectException: Connection refused
	at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:777)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
	... 1 common frames omitted
2022.02.28 17:55:52 INFO  web[][o.s.s.p.d.EmbeddedDatabase] Embedded database stopped
2022.02.28 17:55:52 WARN  web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [H2 TCP Server (tcp://localhost:9092)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@11.0.14/java.net.PlainSocketImpl.socketAccept(Native Method)\n java.base@11.0.14/java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:474)\n java.base@11.0.14/java.net.ServerSocket.implAccept(ServerSocket.java:565)\n java.base@11.0.14/java.net.ServerSocket.accept(ServerSocket.java:533)\n app//org.h2.server.TcpServer.listen(TcpServer.java:248)\n app//org.h2.tools.Server.run(Server.java:610)\n java.base@11.0.14/java.lang.Thread.run(Thread.java:829)
2022.02.28 17:56:47 INFO  app[][o.s.a.p.ManagedProcessHandler] web failed to stop in a quick fashion. Killing it.
2022.02.28 17:56:47 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [web]: 137
2022.02.28 17:56:47 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2022.02.28 17:56:47 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped

How can we help?

I could go some steps further with the following configuration:

sonarqube:
    image: sonarqube:8.9.2-community
    container_name: sonarqube
    platform: linux/amd64
    restart: always
    environment:
      SONAR_SEARCH_JAVAADDITIONALOPTS: "-Dbootstrap.system_call_filter=false"
    ports:
      - '9000:9000'
    volumes:
      - sonarqube_extensions:/opt/sonarqube/extensions

But it still failing due to some csharp issues:

2022.03.09 13:44:43 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 137

2022.03.09 13:44:43 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped

2022.03.09 13:44:44 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process

2022.03.09 13:44:44 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube

java.lang.IllegalStateException: Fail to load plugin C# Code Quality and Security [csharp]

at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:80)

at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:579)

at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)

at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)

at org.sonar.server.platform.PlatformImpl.access$500(PlatformImpl.java:46)

at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)

at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)

at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)

at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)

at java.base/java.lang.Thread.run(Unknown Source)

Caused by: java.lang.NoClassDefFoundError: org/sonarsource/dotnet/shared/plugins/PropertiesSensor

at org.sonar.plugins.csharp.CSharpPlugin.define(CSharpPlugin.java:57)

at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:70)

... 9 common frames omitted

Caused by: java.lang.ClassNotFoundException: org.sonarsource.dotnet.shared.plugins.PropertiesSensor

at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)

at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)

at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)

... 11 common frames omitted

2022.03.09 13:44:45 WARN  web[][o.s.p.ProcessEntryPoint$HardStopperThread] Can not stop in 1000ms

This seems to work:

docker run -d -p 8084:9000 mwizner/sonarqube:8.7.1-community

4 Likes

That works!

1 Like

Hi all,

as @Chris mentioned already, we do not support Apple M1 yet, but an arm64-compatible image is already under discussion and requires some adaptations in our docker release process. We’ll make our best to provide this as soon as we can compatibly with the other priorities.

However, I can tell you a reliable workaround that you can use on M1, which is building the image locally! Thanks to the fact that our base image (alpine) supports the arm64 architecture and that we install our dependencies through a package manager you get a runnable sonarqube docker container on M1 with the following steps:

git clone git@github.com:SonarSource/docker-sonarqube.git
cd docker-sonarqube/9/community
git checkout 9.7.0 # you can specify which sonarqube version to build
docker build -t sonarqube:9.7.0-community .

Please let us know if this does not work well in your context and why.

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