Installation onclean version of AWS Workspace Linux 2. Installed PostgreSQL 10 server, OpenJDK 11, and Sonarqube 8.1.0 to test Mulesoft plug-ins and create rules for analysis. Setting up as a POC.
How did you edited that sonar.sh file ? Looks like something is wrong with it. You can try to re-download SonarQube somewhere, extract only that file, copy it to your current SonarQube location, and try again.
I found the major issue was a lack of memory. I moved the installation to a t3 small server instance in AWS. The installation was successful, but the sonarqube service continued to fail with java insufficient memory errors. Upgrading the server to a T3 Large instance with 8 GB RAM, and the start up was successful.
Google was very helpful as well. The failure due to insufficient memory pointed to Elasticsearch engine issues, so I was able to convince my manager to increase server memory. Thanks for the assist.