DB migration is failing with the #6608 in sonarqube 9.9

  • What version are you upgrading from?
    I am not upgrading. I am installing 9.9 community version for the first time.

  • System information (Operating system, Java version, Database provider/version)
    OS: Windows 10
    Java version: 17.0.6
    Database Provider: Microsoft SQL Server 2019 - 15.0.4236.7
    Type: Standard Edition

  • What’s the issue you’re facing?
    SonarQube is stopping with the following error:
    #6608 Remove branch information from ‘kee’ in ‘components’ ': failure | time=1146ms”

I have replicated with same configuration in the second machine with Express Edition of MSSQL DB, It installed properly. So I have a doubt whether the standard edition of MSSQL will support to use or not.

I went through the sonar docs. I didn’t find any comment on standard Edition.
Could anyone please help me to fix this issue ??

Hey there.

Can you upload your full web.log log file?

web.log (44.2 KB)

Hello @Vinay_Kumar_Matam

In that specific migration, we need to connect to the elasticsearch to update the index.
It seems in your setup that ElasticSearch was not started properly.

Caused by: org.elasticsearch.ElasticsearchException: java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: no further information

Could you please upload elastic search logs (es.log)?

es.log (9.0 KB)

Here is the es.log file. I didn’t see any ERROR logs in this. And also I can see Elasticsearch is running in port 9001 properly in the web.log file.

I forgot to mention one thing. The SonarQube server and DB server are different instances.

→ SonarQube server is hosted in AWS EC2 and
→ DB server is hosted in AWS RDS.

It seems ElasticSearch has started properly, but you can also check other log files (such as sonar.log) to find out if the ES process has terminated unexpectedly: Process exited with exit value [ElasticSearch]

I would assume this is not related to the kind of database you are using but more to the machine, since the query to ElasticSearch is required for migration step to 6608 in any case

I see in your log:
2023.03.13 12:23:07 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://XXXXXXXXX:9001]

Did you change the default host of ElasticSearch (which is ‘localhost’)? Are you sure this host is accessible from the machine?

Other than this ERROR log, I didn’t find any ERROR logs in any log file.

The Elasticsearch is running in the localhost only. As the server has a DNS name, It would be like http://{DNS_NAME}:9001/. I have just masked it with ‘xxxxxxxx’ as posting it in community.

Are you asking about the network connectivity between Elasticsearch and DB server or Elasticsearch and EC2 server.

If it is Elasticsearch-EC2, Both are in same server. So They can communicate with each other.

If it is elasticsearch-DB server, I have also same doubt. I am checking with Network & Firewall rules.

If I need to establish the network rules, How should I do ??
Is it from elasticsearch to DB ?? or
Is it from DB to elasticsearch ?? or
Is it bi-directional between both ??

In a community edition, I would expect the log to show the connection to elasticsearch in localhost:

2023.03.13 12:23:07 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://localhost:9001]

since we use the loopback hostname (localhost/ to resolve Elastic search by default.
Did you make any change in the configuration to use a different hostname for elasticsearch?
or use a specific entry for in “/etc/hosts” (c:\Windows\System32\Drivers\etc\hosts on windows)?

And normally the connection should go from the WEB process (main application) to elasticsearch only

So my assumption is the WEB process have issue to reach http://{DNS_NAME}:9001/, even if it is effectively localhost

Yes, There are some changes in etc/host configuration file. we have some other application running in the server and which is used to expose by a DNS_NAME.

But, I am able to see the elasticsearch running in 9001 port from browser using the http://DNS_NAME:9001/ in that server itself.

So, Do you want me to change in configuration file as localhost/ ?? Or

Do you want me to check any network related settings ?

Yes, you could change/add the following property in your sonar.properties: sonar.search.host= see if it is working or not (calls will be rooted to localhost even if your etc/host is different)

Also check for configuration of proxy in sonar.properties: http.proxyHost and https.proxyHost, or any other proxy in between

Hi, Leo Thank you for your patience.

I have added sonar.search.host= in sonar.properties

And http.proxy and https.proxy are commented.

Still, the issue is not resolved. I have faced same errors. And Elasticsearch is up in http://DNS_NAME:9001/ only but not I have seen these in web.log file.

Sorry I’m running out of idea
es.log stated that it is started on, so it should be accessible:
2023.03.13 12:23:00 INFO es[][o.e.h.AbstractHttpServerTransport] publish_address {}, bound_addresses {}

Maybe worth changing etc/host to see if this is the cause

On web.log, there is also this message:
Caused by: java.nio.file.FileSystemException: C:\DevOps\Sonar\sonarqube-\data\web\deploy\plugins\config\sonar-config-plugin- The process cannot access the file because it is being used by another process
Maybe two SQ processes are running at the same time and are conflicted?