Trying to establish a connection between Sonar and AD via LDAPS connection

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Developer edition, Version 9.6.1.59531)
  • what are you trying to achieve
    Trying to establish a connection between Sonar and AD via LDAPS connection
  • what have you tried so far to achieve this
    I don’t know what to do? It is my first time using Sonarqube

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Hi,

Welcome to the community!

The docs should get you started. You may need to collaborate with your local LDAP administrator to get the proper configuration values to use for SonarQube.

 
HTH,
Ann

Hello Campbell,
I have edited the sonar.properties file per documentation, and tried starting sonarqube using “sh sonar.sh start”. It gives a response that “started sonarqube” but when I try to check the status of sonaqube using “sh sonar.sh status” I keep getting the message, “sonaqube is not running.” Then I equally see the statement “Removed stale pid file: ./SonarQube.pid” and I don’t understand this statement. I need help to restart sonarqube for the configuration I just did to take effect.

Hi,

What do your server logs say?

 
Ann


That is what sonar.log says.

Hi,

Can you copy/paste the text of the logs? Your screenshot isn’t readable. Also please make sure you check all your logs for errors.

 
Ann

Below is the sonar.log info:

2023.01.24 00:52:55 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.01.24 00:52:56 INFO  app[][o.s.a.SchedulerImpl] Process[Compute Engine] is stopped
2024.01.24 00:52:56 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.01.24 00:52:56 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.01.24 00:52:56 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2023.01.24 00:52:56 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2023.01.24 00:52:56 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:46463]
2023.01.24 00:52:56 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2023.01.24 00:52:57 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.01.24 00:53:03 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2023.01.24 00:53:03 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el8_7.x86_64/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.6.1.59531.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.4.0.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process5878094340282992391properties
2023.01.24 00:53:09 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up
2023.01.24 00:53:09 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[COMPUTE_ENGINE] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el8_7.x86_64/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-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.lang=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 -Xmx1024m -Xms256m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.6.1.59531.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.4.0.jar org.sonar.ce.app.CeServer /opt/sonarqube/temp/sq-process3697932378210619462properties
2023.01.24 00:53:13 INFO  app[][o.s.a.SchedulerImpl] Process[ce] is up
2023.01.24 00:53:13 INFO  app[][o.s.a.SchedulerImpl] SonarQube is operational
2023.01.24 00:54:19 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2023.01.24 00:54:19 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:36933]
2023.01.24 00:54:19 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2023.01.24 00:54:19 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.01.24 00:54:19 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2023.01.24 00:54:19 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el8_7.x86_64/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.6.1.59531.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.4.0.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process2400853464942058813properties
2023.01.24 00:54:20 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.01.24 00:54:21 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.01.24 00:54:21 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped

Hi,

Thanks for the log text. What’s in your other server logs? There’s likely an error in web.log or es.log.

 
Ann

Hello Ann,
The web.log info below:

2023.01.25 01:07:37 INFO  web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired session tokens has removed 0 elements
2023.01.25 01:07:37 INFO  web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired SAML message ids has removed 0 elements
2023.01.25 08:30:31 ERROR web[AYXim0m2EvRLQ+tDAAfZ][o.s.s.a.CredentialsExternalAuthentication] Error during authentication
org.sonar.auth.ldap.LdapException: Unable to retrieve details for user aschaechter in <default>
        at org.sonar.auth.ldap.LdapUsersProvider.getUserDetails(LdapUsersProvider.java:84)
        at org.sonar.auth.ldap.LdapUsersProvider.doGetUserDetails(LdapUsersProvider.java:58)
        at org.sonar.server.authentication.CredentialsExternalAuthentication.doAuthenticate(CredentialsExternalAuthentication.java:95)
        at org.sonar.server.authentication.CredentialsExternalAuthentication.authenticate(CredentialsExternalAuthentication.java:89)
        at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:67)
        at org.sonar.server.authentication.CredentialsAuthentication.authenticate(CredentialsAuthentication.java:54)
        at org.sonar.server.authentication.ws.LoginAction.authenticate(LoginAction.java:121)
        at org.sonar.server.authentication.ws.LoginAction.doFilter(LoginAction.java:100)
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
        at org.sonar.server.platform.web.SonarLintConnectionFilter.doFilter(SonarLintConnectionFilter.java:66)
        at org.sonar.server.platform.web.MasterServletFilter$GodFilterChain.doFilter(MasterServletFilter.java:139)
        at org.sonar.server.platform.web.MasterServletFilter.doFilter(MasterServletFilter.java:108)
        at jdk.internal.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:187)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
        at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:81)
        at org.sonar.server.platform.web.UserSessionFilter.doFilter(UserSessionFilter.java:68)
        at jdk.internal.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.catalina.security.SecurityUtil.lambda$execute$0(SecurityUtil.java:280)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.base/javax.security.auth.Subject.doAsPrivileged(Subject.java:550)
        at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:311)
        at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:253)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:187)
        at org.apache.catalina.core.ApplicationFilterChain.lambda$doFilter$0(ApplicationFilterChain.java:145)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:143)
        at org.sonar.server.platform.web.CacheControlFilter.doFilter(CacheControlFilter.java:76)

Our es.log info below:

2023.01.24 00:52:56 INFO  es[][o.e.n.Node] stopping ...
2023.01.24 00:52:56 INFO  es[][o.e.n.Node] stopped
2023.01.24 00:52:56 INFO  es[][o.e.n.Node] closing ...
2023.01.24 00:52:56 INFO  es[][o.e.n.Node] closed
2023.01.24 00:52:58 INFO  es[][o.e.n.Node] version[7.17.4], pid[2100440], build[default/tar/79878662c54c886ae89206c685d9f1051a9d6411/2022-05-18T18:04:20.964345128Z], OS[Linux/4.18.0-372.26.1.el8_6.x86_64/amd64], JVM[Red Hat, Inc./OpenJDK 64-Bit Server VM/11.0.18/11.0.18+10-LTS]
2023.01.24 00:52:58 INFO  es[][o.e.n.Node] JVM home [/usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el8_7.x86_64]
2023.01.24 00:52:58 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, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Dbootstrap.system_call_filter=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]
2023.01.24 00:52:58 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2023.01.24 00:52:58 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2023.01.24 00:52:58 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2023.01.24 00:52:58 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2023.01.24 00:52:58 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2023.01.24 00:52:58 INFO  es[][o.e.p.PluginsService] no plugins loaded
2023.01.24 00:52:58 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/opt (/dev/mapper/AppVG-opt)]], net usable_space [54.7gb], net total_space [58.8gb], types [ext4]
2023.01.24 00:52:58 INFO  es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
2023.01.24 00:52:58 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [v0tnDF5OSK-bYU3TA0vqcw], cluster name [sonarqube], roles [data_frozen, master, remote_cluster_client, data, data_content, data_hot, data_warm, data_cold, ingest]
2023.01.24 00:53:00 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}]
2023.01.24 00:53:00 INFO  es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
2023.01.24 00:53:01 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2023.01.24 00:53:01 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
2023.01.24 00:53:01 INFO  es[][o.e.n.Node] initialized
2023.01.24 00:53:01 INFO  es[][o.e.n.Node] starting ...
2023.01.24 00:53:01 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:46463}, bound_addresses {127.0.0.1:46463}
2023.01.24 00:53:01 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2023.01.24 00:53:01 INFO  es[][o.e.c.c.Coordinator] cluster UUID [cCP2bdgZQryb-wKQT_qyVg]
2023.01.24 00:53:01 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{v0tnDF5OSK-bYU3TA0vqcw}{FFNKJGhUSzGBOO-0hAvybQ}{127.0.0.1}{127.0.0.1:46463}{cdfhimrsw} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 384, version: 9071, delta: master node changed {previous [], current [{sonarqube}{v0tnDF5OSK-bYU3TA0vqcw}{FFNKJGhUSzGBOO-0hAvybQ}{127.0.0.1}{127.0.0.1:46463}{cdfhimrsw}]}
2023.01.24 00:53:01 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{v0tnDF5OSK-bYU3TA0vqcw}{FFNKJGhUSzGBOO-0hAvybQ}{127.0.0.1}{127.0.0.1:46463}{cdfhimrsw}]}, term: 384, version: 9071, reason: Publication{term=384, version=9071}
2023.01.24 00:53:01 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2023.01.24 00:53:01 INFO  es[][o.e.n.Node] started

ce.log info below:

2023.01.24 00:52:55 INFO  ce[][o.s.p.ProcessEntryPoint] Hard stopping process
2023.01.24 00:52:55 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is stopping...
2023.01.24 00:52:55 INFO  ce[][o.s.c.t.CeProcessingSchedulerImpl] Hard stopping workers...
2023.01.24 00:52:55 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is stopped
2023.01.24 00:53:10 INFO  ce[][o.s.p.ProcessEntryPoint] Starting Compute Engine
2023.01.24 00:53:10 INFO  ce[][o.s.ce.app.CeServer] Compute Engine starting up...
2023.01.24 00:53:10 INFO  ce[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost/sonarqubedb?currentSchema=sonarqube
2023.01.24 00:53:11 INFO  ce[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2023.01.24 00:53:11 INFO  ce[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.01.24 00:53:11 INFO  ce[][o.s.c.c.CePluginRepository] Load plugins
2023.01.24 00:53:12 INFO  ce[][o.s.c.c.ComputeEngineContainerImpl] Running Developer edition
2023.01.24 00:53:12 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is started
2023.01.24 00:54:22 INFO  ce[][o.s.p.ProcessEntryPoint] Hard stopping process
2023.01.24 00:54:22 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is stopping...
2023.01.24 00:54:22 INFO  ce[][o.s.c.t.CeProcessingSchedulerImpl] Hard stopping workers...
2023.01.24 00:54:22 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is stopped
2023.01.24 00:54:53 INFO  ce[][o.s.p.ProcessEntryPoint] Starting Compute Engine
2023.01.24 00:54:53 INFO  ce[][o.s.ce.app.CeServer] Compute Engine starting up...
2023.01.24 00:54:53 INFO  ce[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost/sonarqubedb?currentSchema=sonarqube
2023.01.24 00:54:54 INFO  ce[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2023.01.24 00:54:54 INFO  ce[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.01.24 00:54:54 INFO  ce[][o.s.c.c.CePluginRepository] Load plugins
2023.01.24 00:54:55 INFO  ce[][o.s.c.c.ComputeEngineContainerImpl] Running Developer edition
2023.01.24 00:54:55 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is started
2023.01.24 01:07:23 INFO  ce[][o.s.p.ProcessEntryPoint] Hard stopping process
2023.01.24 01:07:23 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is stopping...
2023.01.24 01:07:23 INFO  ce[][o.s.c.t.CeProcessingSchedulerImpl] Hard stopping workers...
2023.01.24 01:07:23 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is stopped
2023.01.24 01:07:37 INFO  ce[][o.s.p.ProcessEntryPoint] Starting Compute Engine
2023.01.24 01:07:37 INFO  ce[][o.s.ce.app.CeServer] Compute Engine starting up...
2023.01.24 01:07:38 INFO  ce[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost/sonarqubedb?currentSchema=sonarqube
2023.01.24 01:07:38 INFO  ce[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2023.01.24 01:07:39 INFO  ce[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.01.24 01:07:39 INFO  ce[][o.s.c.c.CePluginRepository] Load plugins
2023.01.24 01:07:40 INFO  ce[][o.s.c.c.ComputeEngineContainerImpl] Running Developer edition
2023.01.24 01:07:40 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is started
~

Hi,

The server logs you’ve provided do not reflect the “sonarqube is not running” status you reported earlier. When you try to access the SonarQube URL in a browser, what do you get?

 
Ann

Hi there,
I can access sonarqube from the browser with no problem. I did edit the sonar.properties file with ldap configuration properties and wanted to start the sonarqube from the command line so that the configurations I did take effect but I see that sonarqube is not running. Check my steps below please:

[jenkins@eg-sonar-p01 linux-x86-64]$ ls
sonar.sh
[jenkins@eg-sonar-p01 linux-x86-64]$ sh sonar.sh status
/usr/bin/java
SonarQube is not running.
[jenkins@eg-sonar-p01 linux-x86-64]$ sh sonar.sh start
/usr/bin/java
Starting SonarQube…
Started SonarQube.
[jenkins@eg-sonar-p01 linux-x86-64]$ sh sonar.sh status
/usr/bin/java
Removed stale pid file: ./SonarQube.pid
SonarQube is not running.
[jenkins@eg-sonar-p01 linux-x86-64]$

Do it mean “sh sonar.sh start” command can not start my sonarqube?

Hi,

If you can access the SonarQube URL successfully, then the commandline “not running” message is a red herring - unless you can’t access the URL after you execute the status command?

 
Ann

After doing the command “sh sonar.sh start”
And later doing the command “sh sonar.sh status”
I expect to see the message, “SonarQube is running” but I instead see the message “SonarQube is not running”
Why is is so?
How do I make sure the configurations I did in the “sonar.properties” file have taken effect?
Please I need help

Hi,

Yeah, I expect that too, but the fact that you don’t isn’t germane to the problem if you’re able to access the SonarQube URL.

Have you tried logging in?

 
Ann

Yes, I have tried logging in to the sonarqube user interface and there is no problem.
But in the sonarqube box, the status still shows “Sonarqube not running”

Hi,

So SonarQube is up and you logged in just fine. I think you need to let that status message go.

 
Ann

Hello,
From the docs Shelby sent to me:

Please check this link she sent. How do I restart sonarqube amd check the Log file? :point_down:

Setup

  1. Configure LDAP by editing <SONARQUBE_HOME>/conf/sonar.properties (see table below).
  2. Restart the SonarQube server and check the log file for:
    INFO org.sonar.INFO Security realm: LDAP ...INFO o.s.p.l.LdapContextFactory Test LDAP connection: OK
  3. Log in to SonarQube.
  4. On log out users will be presented with a login page (/sessions/login), where they can choose to log in as a technical user or a domain user by passing the appropriate credentials.

From (2) above, how do I restart SonarQube from the the User Interface or Browser if I can not start from the command line using “sh sonar.sh start” ?