2

SQ 5.6, LDAP plugin 2.0.

I've successfully installed the LDAP plugin and restarted the SQ server. In the log (/opt/sonar/logs/sonar.log) the plugin is apparently deployed, but seemingly no attempt is made to initialize/enable it or connect to the LDAP server.

INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin LDAP / 2.0 / 2910f3981167a70a201ccfae01471dfd26c794b7
.
.
INFO  web[o.s.s.p.RailsAppsDeployer] Deploying app: ldap

These are the only mentions of ldap/LDAP in the log.

Relevant part of the conf/sonar.properties file:

sonar.security.realm=LDAP
ldap.url=ldap://myldap:389
ldap.user.baseDn=ou=mycompany,ou=People,dc=myurl,dc=com

I believe I've verified ldap.url and ldap.user.baseDn via JXplorer (an LDAP browser).

What really puzzles me is that I don't see anything like the following in the logs, which is what I'd expect from the SQ docs:

INFO org.sonar.INFO Security realm: LDAP ...
INFO o.s.p.l.LdapContextFactory Test LDAP connection: OK

No errors of any kind are noted in the log.

Any idea why SQ is not even apparently trying to kick off LDAP authentication on a restart?

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
Darrin
  • 55
  • 1
  • 3
  • 1
    Once you specify `sonar.security.realm=LDAP` in `sonar.properties` and restart your server then the LDAP Plugin should definitely kick-in and log stuff in the logs. Did you just double-check that the right `sonar.properties` is used ? If needed then share your full startup logs and `sonar.properties`. – Nicolas B. Oct 20 '16 at 07:06
  • How can I verify that the sonar.properties file I'm editing really is being used (/opt/sonar/conf/sonar.properties)? I am suspicious of this, because changes to it (including putting in a bogus value for sonar.security.realm) elicit no response (i.e. no error or warning message). Administration->System Info indicates my Sonar Home Dir is /opt/sonar. And the active log file is /opt/sonar/logs/sonar.log, so it seems like that is the correct home dir. – Darrin Oct 20 '16 at 18:13

2 Answers2

1

I had the same problem. I'm running Sonarqube using docker. It did not pick up on changes when I restart the server from the Sonarqube UI. Only after restarting the docker image it could pick up the changed file.

David
  • 853
  • 8
  • 24
  • This was also for me the case and should be the accepted answer! Although I'm not using docker, restarting the sonarqube via command line did the trick for me. – Marty Mar 12 '18 at 16:14
0

Well, now it just started working. I don't have an answer as to why though. Maybe something changed with my LDAP server, or there was some latency that needed to be overcome. I didn't change anything on my end that I'm aware of. In any case, thanks to those that responded.

Darrin
  • 55
  • 1
  • 3