Current Setup of SonarQube:
- We are using the Community Edition of SonarQube.
- We have one server for SonarQube, one server for the PostgreSQL database, and one server for GitLab runners.
Issue: We decided to move Elasticsearch to a new fourth server. After installing Elasticsearch on the new server and updating the sonar.properties
file with the following settings:
sonar.search.hosts= new server IP
sonar.search.port=9200
our SonarQube setup has failed and is no longer working.
Could you help troubleshoot this issue?
sonar.log
2024.09.17 12:42:40 INFO app[o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.09.17 12:42:40 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2024.09.17 12:42:40 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.09.17 12:42:40 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
2024.09.17 12:42:41 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2024.09.17 12:42:41 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: -------------, TCP: -----------------]
2024.09.17 12:42:41 INFO app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2024.09.17 12:42:41 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.09.17 12:42:42 INFO app[o.s.a.SchedulerImpl] Process[es] is up
web.log
2024.09.17 12:44:48 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2024.09.17 12:44:48 INFO web[c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated…
2024.09.17 12:44:48 INFO web[c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.
2024.09.17 12:44:48 WARN web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [SQ starter] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:\n java.base@17.0.7/java.lang.ClassLoader.defineClass1(Native Method)\n java.base@17.0.7/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)\n java.base@17.0.7/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)\n java.base@17.0.7/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)\n java.base@17.0.7/jdk.internal.loader.BuiltinClassLoader$4.run(BuiltinClassLoader.java:773)\n java.base@17.0.7/jdk.internal.loader.BuiltinClassLoader$4.run(BuiltinClassLoader.java:768)\n java.base@17.0.7/java.security.AccessController.executePrivileged(AccessController.java:776)\n java.base@17.0.7/java.security.AccessController.doPrivileged(AccessController.java:318)\n java.base@17.0.7/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:781)\n java.base@17.0.7/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)\n java.base@17.0.7/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)\n java.base@17.0.7/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)\n java.base@17.0.7/java.lang.ClassLoader.loadClass(ClassLoader.java:520)\n app//org.sonar.server.qualitygate.QualityGateModule.configureModule(QualityGateModule.java:27)\n app//org.sonar.core.platform.Module.configure(Module.java:31)\n app//org.sonar.core.platform.SpringComponentContainer.add(SpringComponentContainer.java:99)\n app//org.sonar.server.platform.platformlevel.PlatformLevel.add(PlatformLevel.java:103)\n app//org.sonar.server.platform.platformlevel.PlatformLevel4.configureLevel(PlatformLevel4.java:289)\n app//org.sonar.server.platform.platformlevel.PlatformLevel.configure(PlatformLevel.java:70)\n app//org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:193)\n app//org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:177)\n app//org.sonar.server.platform.PlatformImpl$1$$Lambda$632/0x00000008010c8250.run(Unknown Source)\n app//org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:344)\n app//org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:105)\n app//org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:328)\n java.base@17.0.7/java.lang.Thread.run(Thread.java:833)
2024.09.17 12:44:48 INFO web[o.s.s.app.WebServer] Web Server stopped
ce.log
2024.09.17 12:30:28 INFO ce[o.s.p.ProcessEntryPoint] Gracefully stopping process
2024.09.17 12:30:28 INFO ce[o.s.ce.app.CeServer] Compute Engine is stopping…
2024.09.17 12:30:28 INFO ce[o.s.c.t.CeProcessingSchedulerImpl] Gracefully stopping workers…
2024.09.17 12:30:28 INFO ce[c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated…
2024.09.17 12:30:28 INFO ce[c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.
2024.09.17 12:30:28 INFO ce[o.s.ce.app.CeServer] Compute Engine is stopped
These were the logs taken from server, can you help us in this how can we acheive an elastic search server running on different server.