Sonarqube 10.5.0 version Installation on aks with azure sql database connections

Hi Team, I have been trying to Deploy sonarqube 10.5.0 version on aks cluster. but it’s restarting the pod while attaching volumes pv and pvc for the path /opt/sonarqube/data, /opt/sonarqube/logs,…etc.
It is failing due to lack of permissions for sonarqube user while running an Image and deploying sonarqube pod.
Please share options to grant permission to sonarqube user with enough privileges to mount volumes for /opt/sonarqube path.
Logs from pod:

2024.05.15 07:12:48 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2024.05.15 07:12:48 ERROR app[][o.s.application.App] Startup failure
java.lang.IllegalArgumentException: Unable to create shared memory :
    at org.sonar.process.sharedmemoryfile.AllProcessesCommands.<init>(AllProcessesCommands.java:103)
    at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:63)
    at org.sonar.application.App.start(App.java:53)
    at org.sonar.application.App.main(App.java:81)
Caused by: java.io.FileNotFoundException: /opt/sonarqube/temp/sharedmemory (Permission denied)
    at java.base/java.io.RandomAccessFile.open0(Native Method)
    at java.base/java.io.RandomAccessFile.open(Unknown Source)
    at java.base/java.io.RandomAccessFile.<init>(Unknown Source)
    at java.base/java.io.RandomAccessFile.<init>(Unknown Source)
    at org.sonar.process.sharedmemoryfile.AllProcessesCommands.<init>(AllProcessesCommands.java:100)
... 3 common frames omitted

I could able to overcome the volume mounting Issue with the upgrade road map from sonar Doc. but still the sonarqube is restarting when I connect to existing azure sql db from 8.5 version when Im trying to connect new db its working perfectly fine. what logs or data need to be execlude from old db please share the details while upgrade from 8.5 to 9.9 can we use the similar database copy or how to get the settings and ocnfiguration plugins in the new version.
Thanks

Hi,

You’re pointing a brand new instance at a database from 8.5? I’m not surprised you’re having problems. The docs and your server logs should help.

 
Ann

I have taken a copy of prod env existing 8.5 sonarqube version and trying in testing env to upgrade as per the road map 8.5>8.9>9.9.

Hi,

So you’ve upgraded from 8.5 to 8.9 and then to 9.9? And each upgrade went smoothly?

Then you need to see what your server logs say.

 
Ann

When I upgrade to 8.9 I could see the login page as " is under maintenance while waiting please install sonar lint. If your admin please see the upgrade guide". The logs says database need to upgrade manually but there is no road map or steps to perform it

Hi,

You should resolve it first. The docs or even your server logs will help.

 
Ann

when upgraded to 8.9 from 8.5. the home page says sonarqube is under maintainence and logs are below. manually upgrade database steps are not given in sonarqube doc . manually upgrade database refers to what exactly is that the version of db or taking backup and upgrading sonar to further without db or what could you please help me understand the procedure with db upgrade here.
2024.05.22 16:28:47 INFO web[o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2024.05.22 16:28:48 WARN web[o.s.s.p.DatabaseServerCompatibility] The database must be manually upgraded. Please backup the database and browse /setup. For more information: Server upgrade roadmap | SonarQube Docs
2024.05.22 16:28:48 WARN app[startup] ################################################################################
2024.05.22 16:28:48 WARN app[startup] The database must be manually upgraded. Please backup the database and browse /setup. For more information: Server upgrade roadmap | SonarQube Docs
2024.05.22 16:28:48 WARN app[startup] ################################################################################
2024.05.22 16:28:48 INFO web[o.s.s.p.ServerPluginManager] Deploy plugin ABAP Code Quality and Security / 3.9.1.3127 / a62ddf6ddd7379d398a58d32c9931a2feef61e24.
the link which logs refer has no steps or details regarding 3rd point

Hi,

Emphasis added

From the docs:

  1. Browse to http://yourSonarQubeServerURL/setup and follow the setup instructions.

 
HTH,
Ann

Post restarting the pod when I tried browsing /setup it upgraded the database. works finally thanks

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