Upgrade to 8.9LTS

Hi team,
When I’m trying to upgrade the sonarqube 8.1 to 8.9LTS, I’m getting below error. Could you please help me out with how to fix this error… I’m attaching the log file for reference.

org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.apache.http.ParseException: Not a valid protocol version: This is not an HTTP port

sonar.20220317.log (876.8 KB)

Hey there :wave:

Looks like elasticsearch is not starting correctly. Can you post the es.log file?

Ah there we go. Something is already running on port 9001 which is the default port that is used by the embedded elasticsearch. You should free this port or configure another one to be used by sonarqube by setting sonar.search.port in your sonar.properties file

Hi,

Thank you for checking that.
I have one more doubt. I have sonarqube and database on different servers, will I have all the projects and the analysis if I upgrade it to the latest version?

Using a dedicated server for running Sonarqube is best practice.
Just ensure the connection to your database, maybe there are firewalls, proxies … involved.
And, just like with any other application, you should make a regular backup of your database -
in case something goes wrong.
The update doesn’t delete existing data.

Ok, no errors or eceptions at first glance.
Please increase the loglevel to DEBUG via sonar.log.level=DEBUG in %SONARQUBE_HOME\sonar.properties, restart and attach the sonar.log, web.log

We need also the web.log

OK, the database connect fails.

2022.03.25 04:07:41 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed
java.lang.IllegalStateException: Fail to connect to database

It seems to be the wrong version of the dll, Sonarqube 8.9.7 ships with
mssql-jdbc-9.2.0.jre11.jar , get it here
and put it on path, i.e. simply to the /bin folder of your jdk Sonarqube runs with

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

Could you please help me with the exact path where it needs to be placed? is it Sonarqube path or JDK path?

Simply put the mssql-jdbc_auth-9.2.0.x64.dll into the \bin folder of the jdk Sonarqube runs with.

For checking the status of db connection we need to look at web.log
this

2022.03.27 23:30:48 DEBUG app[o.e.c.RestClient] request [GET http://127.0.0.1:9001/] failed
java.net.ConnectException: Timeout connecting to [/127.0.0.1:9001]

is related to Elasticsearch.
Seems port 9001 is already in use, maybe another process is already using 9001 or another Sonarqube processs still running after failed start.

My bad, I downloaded the wrong .dll. Now it went further and says

jvm 1 | 2022.03.28 00:13:52 WARN app[startup] ################################################################################
jvm 1 | 2022.03.28 00:13:52 WARN app[startup] The database must be manually upgraded. Please backup the database and browse /setup. For more information: Upgrade Guide | SonarQube Docs
jvm 1 | 2022.03.28 00:13:52 WARN app[startup] ################################################################################

Great, now you have to use the url https://$yoursonarhost/setup and confirm the database migration.

Thank you so much! Sonarqube is up and running. Do I have to run StartNTService.bat to run sonarqube as a service?

Glad it works now :slight_smile:
If you have installed Sonarqube service, see
https://docs.sonarqube.org/8.9/setup/operate-server/#header-1

you normally configure it to run automatically, so no need to run it manually.
If you also use a reverse proxy service, i.e. Apache httpd it’s like that

Apache httpd service = run automatically
Sonarqube service = run automatically delayed

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