ResultMapException -> SQLServerException: Connection reset

Our installation:
SQL Server 2017
SonarQube Developer Version 9.8.0
how is SonarQube deployed: Docker

We have been having the problem for some time that our jobs terminate with the following message. We were able to run the statement several times on the SQL Server without any problem.
It is noticeable that the problem only occurs temporarily/sporadically. If the same job is started again without any changes (sometimes a 3rd time is necessary), the job runs through without errors.

In the error details the following can be found, but unfortunately this did not really help us (it is only an excerpt):

Summary
org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'r_uuid' from result set.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
### The error may exist in org.sonar.db.rule.RuleMapper
### The error may involve org.sonar.db.rule.RuleMapper.selectAll
### The error occurred while handling results
### SQL: select
             rds.content as "rds_content",
		 rds.uuid as "rds_uuid",
		 rds.kee as "rds_kee",
		 rds.context_key as "rds_contextKey",
		 rds.context_display_name as "rds_contextDisplayName",
		 r.uuid as "r_uuid",
            r.plugin_rule_key as "ruleKey",
		 r.plugin_name as "repositoryKey",
		 r.description_format as "descriptionFormat",
		 r.status,
		 r.name,
		 r.plugin_config_key as "configKey",
		 r.priority as "severity",
		 r.is_template as "isTemplate",
		 r.is_external as "isExternal",
		 r.is_ad_hoc as "isAdHoc",
		 r.language as "language",
		 r.template_uuid as "templateUuid",
		 r.def_remediation_function as "defRemediationFunction",
		 r.def_remediation_gap_mult as "defRemediationGapMultiplier",
		 r.def_remediation_base_effort as "defRemediationBaseEffort",
		 r.gap_description as "gapDescription",
		 r.system_tags as "systemTagsField",
		 r.security_standards as "securityStandardsField",
		 r.rule_type as "type",
		 r.plugin_key as "pluginKey",
		 r.scope,
		 r.created_at as "createdAt",
		 r.updated_at as "updatedAt",
		 r.note_data as "noteData",
		 r.note_user_uuid as "noteUserUuid",
		 r.note_created_at as "noteCreatedAt",
		 r.note_updated_at as "noteUpdatedAt",
		 r.remediation_function as "remediationFunction",
		 r.remediation_gap_mult as "remediationGapMultiplier",
		 r.remediation_base_effort as "remediationBaseEffort",
		 r.tags as "tagsField",
		 r.ad_hoc_name as "adHocName",
		 r.ad_hoc_description as "adHocDescription",
		 r.ad_hoc_severity as "adHocSeverity",
		 r.ad_hoc_type as "adHocType",
		 r.education_principles as "educationPrinciplesField"
     from
       rules r
           left outer join rule_desc_sections rds on
       rds.rule_uuid = r.uuid
### Cause: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'r_uuid' from result set.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset
...
Caused by: org.apache.ibatis.executor.result.ResultMapException: Error attempting to get column 'r_uuid' from result set.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Connection reset

Do you have any hints/tips what this could be due to? It can’t be a special character, because then it should always fail.

Hi,

Welcome to the community!

Connection reset makes me think the problem is on the SQL Server side. Have you talked to your DBAs?

Also, and it may not be relevant, but the current version is SonarQube 9.9 LTS. You should upgrade at your earliest convenience.

 
HTH,
Ann

Hello Ann,

thx for your answer.
Yes, we looked at it with our DBAs. But they couldn’t find anything either, so I turned to the community here.
An update to the 9.9 LTS version is planned soon. But I would exclude a fix by this.

Best regards,
Annett

Hi Annett,

Do you have something between SonarQube and the database that could be “helpfully” terminating what it thinks are idle, unused connections?

 
Ann

Hello Ann,

We have not found anything on this so far. :frowning:
I would now promptly schedule the LTS update and then look at it again. I would then report a feedback here accordingly.

Best regards,
Annett

1 Like

Hi Ann,

I just see that I have not replied at all.
The problem still exists, but probably not in the quantity as before.

I’ll continue to monitor this and get back to you if there are any questions after all.

In short, upgrading to the LTS version did not fix the bug but reduced it. What I can’t understand though.

Best regards,
Annett

Hi Annett,

Is the error still the same?

 
Ann