i moved your post to a new topic so the two cases don’t get mixed up.
i can see that this tutorial is based on sonarqube 7.5 which is rather old and was supporting mysql. the version that you try to deploy is not supporting mysql anymore. you can see the requirements for sonarqube listed here and we also have a installation guide in our docs, and a little more docs on how to use sonarqube with systemd.
if this does not help you, please post the output of the log files so we can have a look together
thank you for a prompt install. I swapped MySQL for PostgreSQL and also updated the systemd config for the service.
I think the service won’t start because of issues with Elasticsearch. Here’s what I found in /opt/sonarqube/logs/sonar.log. Do you know what needs to be changed to get it up and running?
Thanks
2020.10.16 11:56:17 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2020.10.16 11:56:17 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2020.10.16 11:56:17 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2020.10.16 11:56:18 INFO app[][o.e.p.PluginsService] no modules loaded
2020.10.16 11:56:18 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
ERROR: [2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2020.10.16 11:56:26 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2020.10.16 11:56:26 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2020.10.16 11:56:26 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
It might be helpful to put the correct numbers in here as well:
Now there is nothing in logs (I deleted them before restarting the server and thus the service).
The service status now changed to the following. Any advice?
● sonarqube.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2020-10-16 12:59:27 UTC; 2min 52s ago
Process: 1145 ExecStart=/bin/nohup /opt/java/bin/java -Xms32m -Xmx32m -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/lib/sonar-application-7.4.jar (code=exit
Main PID: 1145 (code=exited, status=203/EXEC)
Oct 16 12:59:27 martin systemd[1145]: sonarqube.service: Failed at step EXEC spawning /bin/nohup: No such file or directory
Oct 16 12:59:27 martin systemd[1]: sonarqube.service: Main process exited, code=exited, status=203/EXEC
Oct 16 12:59:27 martin systemd[1]: sonarqube.service: Failed with result 'exit-code'.
Oct 16 12:59:27 martin systemd[1]: sonarqube.service: Service hold-off time over, scheduling restart.
Oct 16 12:59:27 martin systemd[1]: sonarqube.service: Scheduled restart job, restart counter is at 5.
Oct 16 12:59:27 martin systemd[1]: Stopped SonarQube service.
Oct 16 12:59:27 martin systemd[1]: sonarqube.service: Start request repeated too quickly.
Oct 16 12:59:27 martin systemd[1]: sonarqube.service: Failed with result 'exit-code'.
Oct 16 12:59:27 martin systemd[1]: Failed to start SonarQube service.
Thanks, @Tobias_Trabelsi. I change the path to nohup, java as well as the sonar application jar. However, I still cannot connect to the application on localhost using curl.
curl http://127.0.0.1:9000
This is preventing me from using nginx as a proxy. There is nothing explanatory in any of the sonar logs. It it OK to use it behind nginx proxy? I also tried telnet to connect with no success.
can you provide the log files as well as your sonar.properties file? you should be able to reach sonarqube at http://127.0.0.1:9000 if you have not modified something like sonar.web.host, sonar.web.port or sonar.web.context
I decided to start from scratch and managed install SonarQube successfully behing nginx proxy. I put together a mix of your installation guidelines with some stuff from Digital Ocean guides. I am sending my a step by step installation guide that worked for me. Feel free to update your notes or maybe post a single article for SonarQube + PostgreSQL + nginx proxy + SSL