SonarQube Authentication error

Hi Team,
We are using Sonarqube 10.5 Enterprise edition. and sql database version MSSQL 16 , we are facing login issue every 2nd day it says authenication failed.
We dont find any logs in server , but after restarting services we encounter below error

-- ERROR web[073c09f6-fdf9-44be-af6f-5e98486896f1][o.s.s.a.LdapCredentialsAuthentication] Error during authentication
org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.
### The error may exist in org.sonar.db.user.UserMapper
### The error may involve org.sonar.db.user.UserMapper.selectByExternalIdAndIdentityProvider
### The error occurred while executing a query
### SQL: SELECT           sa.scm_account as "scm_account",               u.uuid as uuid,         u.login as login,         u.name as name,         u.email as email,         u.active as "active",         u.salt as "salt",         u.crypted_password as "cryptedPassword",         u.hash_method as "hashMethod",         u.external_id as "externalId",         u.external_login as "externalLogin",         u.external_identity_provider as "externalIdentityProvider",         u.user_local as "local",         u.reset_password as "resetPassword",         u.homepage_type as "homepageType",         u.homepage_parameter as "homepageParameter",         u.last_connection_date as "lastConnectionDate",         u.last_sonarlint_connection as "lastSonarlintConnectionDate",         u.created_at as "createdAt",         u.updated_at as "updatedAt"               FROM users u             left outer join scm_accounts sa on         sa.user_uuid = u.uuid                 WHERE u.external_id=? AND u.external_identity_provider=?
### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed.

It takes 30min to be opertional , could you please suggest what can be done on this ?
Anyhelp is appreciated!!!
web.log (7.9 MB)

Hi,

Welcome to the community!

It looks like DB connections are being timed out and closed on the database side. You need to sync your settings between SonarQube and the DB to that MSSQL isn’t killing your connections.

On the SonarQube side, the docs should help.

 
Ann

Hello Ann,

We are using “sonar.jdbc.url=jdbc:sqlserver://servername;databaseName=SonarQube;integratedSecurity=true;encrypt=false”

to sync between sonarqube and database , It was working fine without any issues but recently from a week we are encountering this issue more frequently. Please suggest on this .

Thanks and Regards!

Vedashree

Sonar_properties.txt (22.8 KB)

Hi,

It sounds like something on the DB or the network side changed. You should talk to your DBAs and your network folks.

 
HTH,
Ann