Migrating Sonarqube from RHEL7 to RHEL8 server

Must-share information (formatted with Markdown):

  • which versions are you using: Sonarqube Developer Edition, version 8.9.6 Stand-alone (yes, I know it’s “old” and I will upgrade it if I can ever get it off of RHEL7)
  • how is SonarQube deployed: Zip (I think)
  • what are you trying to achieve: Migrate to new server
  • what have you tried so far to achieve this:

I followed the suggested tips on the following three community forums (one was posted by me):

All of which seemed to indicate that there was nothing to worry about and it will be as easy as flipping a switch - which apparently is not the case. I am unable to get Sonarqube up and running on my new server - the sonarqube service shows as being started but the service status does state “Waiting for Elasticsearch to be up and running” I am re-using the same external MS SQL database so no data migration should be needed (as far as I know of).

The nginx log is filled with “connect() failed (111: Connection refused) while connecting to upstream” which would indicate something with the proxy setup but I copied over the exact sonar.properties and all nginx config files from my old server - so all configs are exactly the same.

The sonar.log file just keeps repeating over and over again:

2024.06.10 19:28:33 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.06.10 19:28:34 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2024.06.10 19:28:34 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2024.06.10 19:28:34 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.06.10 19:28:35 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /var/sonarqube/temp
2024.06.10 19:28:35 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:39131]
2024.06.10 19:28:35 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube-8.9.10.61524/elasticsearch]: /opt/sonarqube-8.9.10.61524/elasticsearch/bin/elasticsearch

There are no other log files in the (sonar_home)/logs/ directory - only the sonar.log and nothing else. I have added ports 9000 and 9001 to the firewall and also tried with local firewall ON and also OFF. I have tried with SELinux in ‘permissive’ and also ‘enforcing’ mode. All with no luck.

Please help! Nothing ever seems to be as “easy” as it indicates. Thanks!

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

Does anyone have any suggestions at all? It’s definitely something with how Sonarqube is listening (or should I say NOT listening) on the specified port. Nginx and Sonarqube come up just fine, but whenever you try to hit it from a client the following is logged:

2024/06/11 17:48:57 [error] 1043508#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: <CLIENT_IP>, server: sonarqube., request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:9000/”, host: “<SERVER_IP>”

Anyone ever see this?

My RHEL7 server shows that sonarqube is listening on port 9001. My RHEL8 server shows NOTHING listening on port 9001, and they have the same exact config and sonar.properties file.

THE. SAME. EXACT. CONFIGURATIONS.

Hi,

I technically can’t help you with 8.9.

And… there are more logs in that directory than just sonar.log.

If you keep getting

maybe you should check es.log?

Elasticsearch wants a minimum number of files and threads that is higher than the default in some OSes…

 
HTH,
Ann

Thanks for the suggestion - but as stated previously in the original post there are no other log files in that directory other than the sonar.log.

Everyone can call off the dogs on this one - I figured it out. My RHEL8 server has FIPS enabled so that is the issue. See:

So… C’mon Sonarqube - FIPS 140-2 has been out for 13 years now - you can’t be FIPS compliant in that timeframe???

It’s not like we’re alone on this one.

However, good news for you, SonarQube will be able to run in a FIPS environment in SonarQube v10.6 (coming this month)