Installing Sonarqube in a Cpanel Server

Must-share information (formatted with Markdown):

  • SonarQube: v. 10.0.0
  • how is SonarQube deployed: zip in cPanel
  • what are you trying to achieve: Make it work
  • what have you tried so far to achieve this: 2 version of Java, several Elasticsearch mods in configuration, all the possible different solutions available in the web.

Im trying to install Sonarqube 10.0.0 in a cPanel server to test it and try it. Its been a 6 hours job until now. I have tried and configured everything I can, its obviously that Sonrqube its not intended to be hosted this way but for a testing its what I can do.

I have solved almost all issues by now except for this one,
es.log:

2023.05.29 20:09:29 INFO es[][o.e.n.Node] version[8.6.1], pid[5592], build[tar/180c9830da956993e59e2cd70eb32b5e383ea42c/2023-01-24T21:35:11.506992272Z], OS[Linux/3.10.0-1160.41.1.vz7.183.5/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/17.0.7/17.0.7+8-LTS-224]

2023.05.29 20:09:29 INFO es[][o.e.n.Node] JVM home [/usr/lib/jvm/jdk-17-oracle-x64], using bundled JDK [false]

2023.05.29 20:09:29 INFO es[][o.e.n.Node] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -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, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -XX:+UseG1GC, -Djava.io.tmpdir=/home/sonarqube/public_html/temp, -XX:ErrorFile=/home/sonarqube/public_html/logs/es_hs_err_pid%p.log, -Xlog:disable, -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=/home/sonarqube/public_html/temp, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=COMPAT, -Dcom.redhat.fips=false, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=tar, --module-path=/home/sonarqube/public_html/elasticsearch/lib, --add-modules=jdk.net, -Djdk.module.main=org.elasticsearch.server]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [aggregations]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [analysis-common]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [apm]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [lang-painless]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [old-lucene-versions]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [parent-join]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [reindex]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [x-pack-aggregate-metric]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [x-pack-core]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] loaded module [x-pack-security]

2023.05.29 20:09:30 INFO es[][o.e.p.PluginsService] no plugins loaded

2023.05.29 20:09:33 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (/dev/ploop30448p1)]], net usable_space [49.8gb], net total_space [149.8gb], types [ext4]

2023.05.29 20:09:33 INFO es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]

2023.05.29 20:09:34 INFO es[][o.e.n.Node] node name [sonarqube], node ID [WmZXIprTQBaX-gdjQPyucQ], cluster name [sonarqube], roles [data_cold, data, remote_cluster_client, master, data_warm, data_content, transform, data_hot, ml, data_frozen, ingest]

2023.05.29 20:09:35 INFO es[][o.e.x.s.Security] Security is disabled

2023.05.29 20:09:35 INFO es[][o.e.t.n.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=4mb, heap_size=512mb}]

2023.05.29 20:09:35 INFO es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]

2023.05.29 20:09:35 INFO es[][o.e.d.DiscoveryModule] using discovery type [single-node] and seed hosts providers [settings]

2023.05.29 20:09:36 INFO es[][o.e.n.Node] initialized

2023.05.29 20:09:36 INFO es[][o.e.n.Node] starting ...

2023.05.29 20:09:36 WARN es[][i.n.u.i.MacAddressUtil] Failed to find a usable hardware address from the network interfaces; using random bytes: a7:e0:84:eb:80:28:30:1c

2023.05.29 20:09:36 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:46605}, bound_addresses {127.0.0.1:46605}

2023.05.29 20:09:36 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks

2023.05.29 20:09:36 INFO es[][o.e.n.Node] stopping ...

2023.05.29 20:09:36 INFO es[][o.e.n.Node] stopped

2023.05.29 20:09:36 INFO es[][o.e.n.Node] closing ...

2023.05.29 20:09:36 INFO es[][o.e.n.Node] closed

and my sonarqube.log:

2023.05.29 20:09:25 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /home/sonarqube/public_html/temp

2023.05.29 20:09:25 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:46605]

2023.05.29 20:09:25 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/home/sonarqube/public_html/elasticsearch]: /usr/lib/jvm/jdk-17-oracle-x64/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=/home/sonarqube/public_html/elasticsearch -Des.path.conf=/home/sonarqube/public_html/temp/conf/es -Des.distribution.type=tar -cp /home/sonarqube/public_html/elasticsearch/lib/*:/home/sonarqube/public_html/elasticsearch/lib/cli-launcher/* org.elasticsearch.launcher.CliToolLauncher

2023.05.29 20:09:25 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

2023.05.29 20:09:36 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 78

2023.05.29 20:09:36 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped

2023.05.29 20:09:36 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

I havn’t find out what error 78 is in this case. I have set discovery.type: single-node option in elasticsearch.yml and I have tested the host to be:

network.host: 192.168.0.1

network.host: localhost

network.host: 127.0.0.1

network.host: [SERVER_IP]

#network.host: 192.168.0.1

With no luck on any of them. I can’t make ElasticSearch start succesfully.

Any help would be really appreciated.

Hey there.

It’s a bad idea to adjust any of the Elasticsearch configuration. So I would first suggest that you redownload SonarQube v9.9 LTS to make sure that nothing has been adjusted.

What is the first issue you face, using the vanilla download and elasticsearch settings?