Login Failure After Configuring LDAP Service

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

Version : sonarqube:9.9.5-lts-community

  • how is SonarQube deployed: zip, Docker, Helm

docker-compose


version: "3"

services:
  sonarqube:
    image: sonarqube:9.9.5-lts-community
    depends_on:
      - sonar_db
    environment:
      SONAR_JDBC_URL: jdbc:postgresql://sonar_db:5432/sonar
      SONAR_JDBC_USERNAME: name
      SONAR_JDBC_PASSWORD: password
    ports:
      - "9000:9000"
    volumes:
      - ./sonarqube_conf:/opt/sonarqube/conf
      - ./sonarqube_data:/opt/sonarqube/data
#      - sonarqube_extensions:/opt/sonarqube/extensions
      - ./sonarqube_logs:/opt/sonarqube/logs
      - ./sonarqube_temp:/opt/sonarqube/temp

  sonar_db:
    image: postgres:16.3-alpine3.20
    environment:
      POSTGRES_USER: name
      POSTGRES_PASSWORD: password
      POSTGRES_DB: sonar
    ports:
      - "5432:5432"
    volumes:
      - ./sonar_db:/var/lib/postgresql
      - ./sonar_data:/var/lib/postgresql/data
  • what are you trying to achieve

Configure the LDAP service to enable login through the LDAP service

  • what have you tried so far to achieve this

I configured the LDAP part of the sonarqube configuration file, but after restarting the sonarqube service, the LDAP user login is still invalid, as if the LDAP service has not been configured.

sonarqube@3573e2fdccbd:/opt/sonarqube/conf$ grep -Ev '^#|^$' sonar.properties

sonar.security.realm=LDAP
sonar.authenticator.downcase=true
ldap.url=ldap://ldap-serv.mydomain.com.cn:389
ldap.bindDn=cn=admin,dc=mydomain,dc=com,dc=cn
ldap.bindPassword=Password
ldap.authentication=simple
ldap.user.baseDn=ou=people,dc=mydomain,dc=com,dc=cn
ldap.user.request=(&(objectClass=user)(sAMAccountName={login}))
ldap.user.realNameAttribute=cn
ldap.user.LastNameAttribute=sn
ldap.user.firstNameAttribute=givenName
ldap.user.emailAttribute=mail
ldap.group.baseDn=ou=wecomroot,dc=mydomain,dc=com,dc=cn
ldap.group.request=(&(objectClass=group)(member={dn}))
ldap.group.idAttribute=cn

The configuration information reference link is: Sonar LDAP Plugin is not available in sonarqube 9.2.3 - #5 by Rebse

First of all, I want to explain:
There is no problem with my LDAP service. I have configured GitLab and Jenkins. Users who use LDAP for testing can log in normally.
After SonarQube is configured, the login using LDAP user fails, or only local users can log in.

May I ask what went wrong? Thank you!

Hi,

Do you see any logs when SonarQube is starting ?

An other option is also to use environment var for the container configuration (similar to your postgres)

environment:
...
  LDAP_BINDDN: cn=admin,dc=mydomain,dc=com,dc=cn
  LDAP:BINDPASSWORD: .....
...

See: Environment variables

Thank you for your reply. The startup log information of SonarQube is as follows, among which the LDAP test shown in line 85 is normal.

sonarqube-1  | 2024.06.21 05:43:24 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
sonarqube-1  | 2024.06.21 05:43:24 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:41726]
sonarqube-1  | 2024.06.21 05:43:24 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
sonarqube-1  | 2024.06.21 05:43:24 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.n.Node] version[7.17.15], pid[26], build[default/tar/0b8ecfb4378335f4689c4223d1f1115f16bef3ba/2023-11-10T22:03:46.987399016Z], OS[Linux/3.10.0-1160.108.1.el7.x86_64/amd64], JVM[Eclipse Adoptium/OpenJDK 64-Bit Server VM/17.0.11/17.0.11+9]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.n.Node] JVM home [/opt/java/openjdk]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseG1GC, -Djava.io.tmpdir=/opt/sonarqube/temp, -XX:ErrorFile=/opt/sonarqube/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, -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]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.p.PluginsService] no plugins loaded
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/opt/sonarqube/data (/dev/mapper/centos-root)]], net usable_space [185.1gb], net total_space [200gb], types [xfs]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
sonarqube-1  | 2024.06.21 05:43:26 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [DuT2s8crTm2H1f0W2SBE6w], cluster name [sonarqube], roles [data_frozen, master, remote_cluster_client, data, data_content, data_hot, data_warm, data_cold, ingest]
sonar_db-1   |
sonar_db-1   | PostgreSQL Database directory appears to contain a database; Skipping initialization
sonar_db-1   |
sonar_db-1   | 2024-06-21 05:43:24.091 UTC [1] LOG:  starting PostgreSQL 16.3 on x86_64-pc-linux-musl, compiled by gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309, 64-bit
sonar_db-1   | 2024-06-21 05:43:24.092 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
sonar_db-1   | 2024-06-21 05:43:24.092 UTC [1] LOG:  listening on IPv6 address "::", port 5432
sonar_db-1   | 2024-06-21 05:43:24.092 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
sonar_db-1   | 2024-06-21 05:43:24.096 UTC [24] LOG:  database system was shut down at 2024-06-21 05:41:58 UTC
sonar_db-1   | 2024-06-21 05:43:24.102 UTC [1] LOG:  database system is ready to accept connections
sonarqube-1  | 2024.06.21 05:43:29 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}]
sonarqube-1  | 2024.06.21 05:43:29 INFO  es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
sonarqube-1  | 2024.06.21 05:43:29 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
sonarqube-1  | 2024.06.21 05:43:29 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
sonarqube-1  | 2024.06.21 05:43:29 INFO  es[][o.e.n.Node] initialized
sonarqube-1  | 2024.06.21 05:43:29 INFO  es[][o.e.n.Node] starting ...
sonarqube-1  | 2024.06.21 05:43:29 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:41726}, bound_addresses {127.0.0.1:41726}
sonarqube-1  | 2024.06.21 05:43:30 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
sonarqube-1  | 2024.06.21 05:43:30 INFO  es[][o.e.c.c.Coordinator] cluster UUID [fFXu7feKRgaMFZ49QSSgew]
sonarqube-1  | 2024.06.21 05:43:30 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{DuT2s8crTm2H1f0W2SBE6w}{VI3uB26cRvKEu5hLWYd5iw}{127.0.0.1}{127.0.0.1:41726}{cdfhimrsw} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 9, version: 206, delta: master node changed {previous [], current [{sonarqube}{DuT2s8crTm2H1f0W2SBE6w}{VI3uB26cRvKEu5hLWYd5iw}{127.0.0.1}{127.0.0.1:41726}{cdfhimrsw}]}
sonarqube-1  | 2024.06.21 05:43:30 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{DuT2s8crTm2H1f0W2SBE6w}{VI3uB26cRvKEu5hLWYd5iw}{127.0.0.1}{127.0.0.1:41726}{cdfhimrsw}]}, term: 9, version: 206, reason: Publication{term=9, version=206}
sonarqube-1  | 2024.06.21 05:43:30 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
sonarqube-1  | 2024.06.21 05:43:30 INFO  es[][o.e.n.Node] started
sonarqube-1  | 2024.06.21 05:43:30 INFO  es[][o.e.g.GatewayService] recovered [7] indices into cluster_state
sonarqube-1  | 2024.06.21 05:43:31 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[components][0], [components][2], [metadatas][0]]]).
sonarqube-1  | 2024.06.21 05:43:31 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
sonarqube-1  | 2024.06.21 05:43:31 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /opt/java/openjdk/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.9.5.90363.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.5.1.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process11823865034672687446properties
sonarqube-1  | WARNING: A terminally deprecated method in java.lang.System has been called
sonarqube-1  | WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/opt/sonarqube/lib/sonar-application-9.9.5.90363.jar)
sonarqube-1  | WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
sonarqube-1  | WARNING: System::setSecurityManager will be removed in a future release
sonarqube-1  | 2024.06.21 05:43:31 INFO  web[][o.s.p.ProcessEntryPoint] Starting Web Server
sonarqube-1  | 2024.06.21 05:43:32 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.9.5.90363 / dfc7d8d716ea13cce42ab9d806d74568f3f4693f
sonarqube-1  | 2024.06.21 05:43:32 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://sonar_db:5432/sonar
sonarqube-1  | 2024.06.21 05:43:32 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
sonarqube-1  | 2024.06.21 05:43:32 INFO  web[][c.z.h.p.HikariPool] HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@1763992e
sonarqube-1  | 2024.06.21 05:43:32 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy C# Code Quality and Security / 8.51.0.59060 / e14c642f118958f22fd08841dc42f9aae480366a
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Configuration detection fot Code Quality and Security / 1.2.0.267 / 4f37ba9ffb37a96d5883e52ad392ed32c5c6eaab
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Flex Code Quality and Security / 2.8.0.3166 / 01f66bdddc678966c81a9064ed139156a6a89c97
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Go Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy HTML Code Quality and Security / 3.7.1.3306 / d720acc6860c6d8b69ec4d17570a398a1e216da1
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy IaC Code Quality and Security / 1.11.0.2847 / 6892bd3a7320b3c110717acfdb18c4c7451069fd
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy JaCoCo / 1.3.0.1538 / 74a7798c7cea687c72ed9df40c93eb7ea2a58c49
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Java Code Quality and Security / 7.16.0.30901 / 4b1436558dfd5fc00c8d9aae8bb0364ba122c73e
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy JavaScript/TypeScript/CSS Code Quality and Security / 9.13.0.20537 / 68ff7657415044b86033814795ed95fc1f1558f1
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Kotlin Code Quality and Security / 2.12.0.1956 / a6df1ae252bd62d63f8673c28f87ad14258a7904
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy PHP Code Quality and Security / 3.27.1.9352 / 3ddc5a03e1a7e3729d41e7c1a30a37d5715958c7
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Python Code Quality and Security / 3.24.1.11916 / cc8f4fa745eb33d31c3869bdfdfd45514e67c1fe
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Ruby Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Scala Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Text Code Quality and Security / 2.0.2.1090 / 7eb026363b98f5f98b43c603772b5177869c2c6a
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy VB.NET Code Quality and Security / 8.51.0.59060 / e14c642f118958f22fd08841dc42f9aae480366a
sonarqube-1  | 2024.06.21 05:43:33 INFO  web[][o.s.s.p.ServerPluginManager] Deploy XML Code Quality and Security / 2.7.0.3820 / 656bccc1910d50c8984536bd2dfd917066b858e6
sonarqube-1  | 2024.06.21 05:43:34 INFO  web[][o.s.s.p.d.m.c.PostgresCharsetHandler] Verify that database charset supports UTF8
sonarqube-1  | 2024.06.21 05:43:34 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://localhost:9001]
sonarqube-1  | 2024.06.21 05:43:35 WARN  web[][o.s.a.s.w.WebService$Action] Description is not set on action api/monitoring/metrics
sonarqube-1  | 2024.06.21 05:43:35 WARN  web[][o.s.a.s.w.WebService$Action] Since is not set on action api/monitoring/metrics
sonarqube-1  | 2024.06.21 05:43:35 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/monitoring/metrics
sonarqube-1  | 2024.06.21 05:43:35 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
sonarqube-1  | 2024.06.21 05:43:35 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@8e99809 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
sonarqube-1  | 2024.06.21 05:43:35 INFO  web[][o.s.s.p.DetectPluginChange] Detect plugin changes
sonarqube-1  | 2024.06.21 05:43:35 INFO  web[][o.s.s.p.DetectPluginChange] No plugin change detected
sonarqube-1  | 2024.06.21 05:43:35 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
sonarqube-1  | 2024.06.21 05:43:36 INFO  web[][o.s.s.s.LogServerId] Server ID: 3B38533C-AZAQ5pfEvuUCrrc90VCt
sonarqube-1  | 2024.06.21 05:43:36 WARN  web[][o.s.s.a.LogOAuthWarning] For security reasons, OAuth authentication should use HTTPS. You should set the property 'Administration > Configuration > Server base URL' to a HTTPS URL.
sonarqube-1  | 2024.06.21 05:43:36 INFO  web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties
sonarqube-1  | 2024.06.21 05:43:36 INFO  web[][o.s.a.l.LdapSettingsManager] User mapping: LdapUserMapping{baseDn=ou=people,dc=mydomain,dc=com,dc=cn, request=(&(objectClass=user)(sAMAccountName={0})), realNameAttribute=cn, emailAttribute=mail}
sonarqube-1  | 2024.06.21 05:43:36 INFO  web[][o.s.a.l.LdapSettingsManager] Group mapping: LdapGroupMapping{baseDn=ou=wecomroot,dc=mydomain,dc=com,dc=cn, idAttribute=cn, requiredUserAttributes=[dn], request=(&(objectClass=group)(member={0}))}
sonarqube-1  | 2024.06.21 05:43:36 INFO  web[][o.s.a.l.LdapContextFactory] Test LDAP connection on ldap://ldap-serv.mydomain.com.cn:389: OK
sonarqube-1  | 2024.06.21 05:43:37 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action saml/validation_init
sonarqube-1  | 2024.06.21 05:43:37 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
sonarqube-1  | 2024.06.21 05:43:37 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/plugins/download
sonarqube-1  | 2024.06.21 05:43:37 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/analysis_cache/get
sonarqube-1  | 2024.06.21 05:43:37 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/check_pat
sonarqube-1  | 2024.06.21 05:43:37 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/push/sonarlint_events
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired session tokens has removed 0 elements
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.n.NotificationDaemon] Notification service started (delay 60 sec.)
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired SAML message ids has removed 0 elements
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.t.TelemetryDaemon] Sharing of SonarQube statistics is enabled.
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.s.GeneratePluginIndex] Generate scanner plugin index
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.s.RegisterPermissionTemplates] Register permission templates
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.s.RegisterPlugins] Register plugins
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.SonarLintConnectionFilter@733c1353 [pattern=UrlPattern{inclusions=[/api/*], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@187aa52b [pattern=UrlPattern{inclusions=[/api/issues/delete_comment.*, ...], exclusions=[/api/authentication/login.*, ...]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceReroutingFilter@72b8155d [pattern=UrlPattern{inclusions=[/api/components/bulk_update_key, ...], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.DefaultAdminCredentialsVerifierFilter@4955ca43 [pattern=UrlPattern{inclusions=[/*], exclusions=[*.css, ...]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.InitFilter@5a60feb1 [pattern=UrlPattern{inclusions=[/sessions/init/*], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.SamlValidationRedirectionFilter@17fe5b2b [pattern=UrlPattern{inclusions=[/oauth2/callback/saml], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.OAuth2CallbackFilter@25dea674 [pattern=UrlPattern{inclusions=[/oauth2/callback/*], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ResetPasswordFilter@42be675e [pattern=UrlPattern{inclusions=[/*], exclusions=[*.css, ...]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.LoginAction@6a08168 [pattern=UrlPattern{inclusions=[/api/authentication/login], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.LogoutAction@4838a535 [pattern=UrlPattern{inclusions=[/api/authentication/logout], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.ws.ValidateAction@6bb02c7d [pattern=UrlPattern{inclusions=[/api/authentication/validate], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.saml.ws.ValidationInitAction@6656ba4d [pattern=UrlPattern{inclusions=[/saml/validation_init], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.saml.ws.ValidationAction@3ac2c3f7 [pattern=UrlPattern{inclusions=[/saml/validation], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.user.ws.ChangePasswordAction@1f769cce [pattern=UrlPattern{inclusions=[/api/users/change_password], exclusions=[]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.plugins.PluginsRiskConsentFilter@7a34ab08 [pattern=UrlPattern{inclusions=[/*], exclusions=[*.css, ...]}]
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.q.ProjectsInWarningDaemon] Counting number of projects in warning is not started as there are no projects in this situation.
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.p.PlatformLevelStartup] Running Community Edition
sonarqube-1  | 2024.06.21 05:43:37 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up
sonarqube-1  | 2024.06.21 05:43:37 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[COMPUTE_ENGINE] from [/opt/sonarqube]: /opt/java/openjdk/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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.9.5.90363.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.5.1.jar org.sonar.ce.app.CeServer /opt/sonarqube/temp/sq-process11953164764784945818properties
sonarqube-1  | 2024.06.21 05:43:37 INFO  web[][o.s.s.p.Platform] Web Server is operational
sonarqube-1  | WARNING: A terminally deprecated method in java.lang.System has been called
sonarqube-1  | WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/opt/sonarqube/lib/sonar-application-9.9.5.90363.jar)
sonarqube-1  | WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
sonarqube-1  | WARNING: System::setSecurityManager will be removed in a future release
sonarqube-1  | 2024.06.21 05:43:38 INFO  ce[][o.s.p.ProcessEntryPoint] Starting Compute Engine
sonarqube-1  | 2024.06.21 05:43:38 INFO  ce[][o.s.ce.app.CeServer] Compute Engine starting up...
sonarqube-1  | 2024.06.21 05:43:38 INFO  ce[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://sonar_db:5432/sonar
sonarqube-1  | 2024.06.21 05:43:38 INFO  ce[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
sonarqube-1  | 2024.06.21 05:43:38 INFO  ce[][c.z.h.p.HikariPool] HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@49c09a18
sonarqube-1  | 2024.06.21 05:43:38 INFO  ce[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
sonarqube-1  | 2024.06.21 05:43:39 INFO  ce[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
sonarqube-1  | 2024.06.21 05:43:39 INFO  ce[][o.s.c.c.CePluginRepository] Load plugins
sonarqube-1  | 2024.06.21 05:43:40 INFO  ce[][o.s.c.c.ComputeEngineContainerImpl] Running Community edition
sonarqube-1  | 2024.06.21 05:43:40 INFO  ce[][o.s.ce.app.CeServer] Compute Engine is started
sonarqube-1  | 2024.06.21 05:43:40 INFO  app[][o.s.a.SchedulerImpl] Process[ce] is up
sonarqube-1  | 2024.06.21 05:43:40 INFO  app[][o.s.a.SchedulerImpl] SonarQube is operational

Can you login with a local admin user and enable DEBUG logs (See an other thread when I was experiencing issue with LDAP: Upgrade from 10.4.1 to 10.5.0 broke LDAP authentication - #3 by Colin)

According to this last thread you see

sonarqube-1  | 2024.06.21 05:43:36 INFO  web[][o.s.a.l.LdapContextFactory] Test LDAP connection on ldap://ldap-serv.mydomain.com.cn:389: OK

Even if the bindn and bindpassword are wrong… (It’s confusing that you need to enable DEBUG logs to see errors)


6475 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.a.l.LdapContextFactory] Initializing LDAP context {java.naming.referral=follow, java.naming.securit      y.principal=cn=admin,dc=mydomain,dc=com,dc=cn, com.sun.jndi.ldap.connect.pool=true, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, java.      naming.provider.url=ldap://ldap-serv.mydomain.com.cn:389, java.naming.security.authentication=simple}
 6476 sonarqube-1  | 2024.06.21 07:04:33 INFO  web[][o.s.a.l.LdapContextFactory] Test LDAP connection on ldap://ldap-serv.mydomain.com.cn:389: OK
 6477 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.LdapCredentialsAuthentication' via constructor to bean named 'Configuration'
 6478 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.LdapCredentialsAuthentication' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppCl      assLoader@34a875b3-org.sonar.server.authentication.UserRegistrarImpl'
 6479 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.LdapCredentialsAuthentication' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppCl      assLoader@34a875b3-org.sonar.server.authentication.event.AuthenticationEventImpl'
 6480 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.LdapCredentialsAuthentication' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppCl      assLoader@34a875b3-org.sonar.auth.ldap.LdapRealm'
 6481 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.CredentialsAuthentication' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassL      oader@34a875b3-org.sonar.db.DbClient'
 6482 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.CredentialsAuthentication' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassL      oader@34a875b3-org.sonar.server.authentication.event.AuthenticationEventImpl'
 6483 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.CredentialsAuthentication' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassL      oader@34a875b3-org.sonar.server.authentication.CredentialsExternalAuthentication'
 6484 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.CredentialsAuthentication' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassL      oader@34a875b3-org.sonar.server.authentication.CredentialsLocalAuthentication'
 6485 sonarqube-1  | 2024.06.21 07:04:33 DEBUG web[][o.s.c.p.PriorityBeanFactory] Autowiring by type from bean name 'jdk.internal.loader.ClassLoaders$AppCla      ssLoader@34a875b3-org.sonar.server.authentication.CredentialsAuthentication' via constructor to bean named 'jdk.internal.loader.ClassLoaders$AppClassL      oader@34a875b3-org.sonar.server.authentication.LdapCredentialsAuthentication'

Hello Everyone.

Up.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.