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

Hi,

No need to restart from the UI. You are already successfully restarting from the command line. There is no need to query for status since you can simply access the URL and verify the server is up.

 
Ann

Hello,
From command line after passing the start command, it states that sonarqube started but upon passing the status command, it states that Sonarqube is not running (which means it did not start).
How do I knw that the connection between Sonarqube and ldap has taken into effect? How do I know it is working, given that the Sonarqube is not running per command line sonar.sh status?

Is this problem happening because we are using but SonarQube Developer Edition? Do you think we need to upgrade to Enterprise edition? If yes, what do you recommend? Please advice, because we really need to integrate sonarqube with ldap and after editing the sonar.properties file what do we need to do? I followed the documentation but nothing is working.

Hi,

I don’t know how much more plainly I can say this, but I’ll try.

Do not run the status command to check whether SonarQube is up. Instead, access the SonarQube URL.

To determine whether your LDAP integration was successful, try logging in with your LDAP credentials. If you succeed, then it worked.

You do not need to upgrade to Enterprise Edition for this.

 
Ann

Hello, below is a part of my ldap configuration. Loggin in wth the credentials into Sonarqube UI does not authenticate me. Does it mean my ldap configuration in sonar.properties file is not correct?

# Bind DN is the username of an LDAP user to connect (or bind) with. Leave this blank for anonymous access to the LDAP directory (optional)
  ldap.bindDn=xxxx

# Bind Password is the password of the user to connect with. Leave this blank for anonymous access to the LDAP directory (optional)
  ldap.bindPassword=xxxx


# Distinguished Name (DN) of the root node in LDAP from which to search for users (mandatory)
  ldap.user.baseDn=cu=Acounts,dc=compsych-ad,dc=int

# LDAP user request. (default: (&(objectClass=inetOrgPerson)(uid={login})) )
  ldap.user.request=(&(objectClass=inetOrgPerson)(uid={login}))

# Attribute in LDAP defining the user’s real name. (default: cn)
  ldap.user.realNameAttribute=cn

# Attribute in LDAP defining the user’s email. (default: mail)
  ldap.user.emailAttribute=mail

# GROUP MAPPING

# Distinguished Name (DN) of the root node in LDAP from which to search for groups. (optional, default: empty)
  ldap.group.baseDn=ou=Groups,dc=compsych-ad,dc=int

# LDAP group request (default: (&(objectClass=groupOfUniqueNames)(uniqueMember={dn})) )
  ldap.group.request=(&(objectClass=posixGroup)(memberUid={uid}))

Hi,

For this you need to check your web.log server logs.

 
Ann

Hi,

BTW, another user helpfully flagged your last post because it contained confidential information. I’ve edited to remove it, but you should update those values anyway.

 
Ann

Hello Ann,
I did some editing in the sonar.properties file and sonarqube can not run on the browser again. Please help. The error message is below

Hi,

You should check your server logs

 
Ann

Hi,

it seems you did a version update and you need to initiate and confirm the DB migration,
see Upgrade guide
=> Upgrading from a zip and

Your $SONARQUBE_HOME/sonar.log will show such an entry

2022.12.06 06:11:33 WARN app[startup] ################################################################################
2022.12.06 06:11:33 WARN app[startup] The database must be manually upgraded. Please backup the database and browse /setup. For more information: Upgrade guide
2022.12.06 06:11:33 WARN app[startup] ################################################################################

1 Like