6

Trying to setup SonarQube on EC2 using what should be basic install settings.

  1. List item
  2. Setup a standard EC2 AWS LINUX Ami attached to M4 large
  3. SSH into EC2 instance
  4. Install JAVA
  5. Set to use JAVA8
  6. wget https://sonarsource.bintray.com/Distribution/sonarqube/sonarqube-6.4.zip
  7. unzip into the /etc dir
  8. run sudo ./sonar.sh start
  9. Instance starts

But when I try to go to the app it never comes up when I try either the IPv4 Public IP 187.187.87.87:9000 (ex not real IP) or try ec2-134-73-134-114.compute-1.amazonaws.com:9000 (not real IP either just for example)

Perhaps it is my ignorance or me not configuring something correctly as it pertains to the initial EC2 setup.

If anyone has any ideas, please let me know.

G. Ann - SonarSource Team
  • 22,346
  • 4
  • 40
  • 76
isaac weathers
  • 1,436
  • 4
  • 27
  • 52

2 Answers2

3

Issue was that SonarQube default port is 9000. and by default this port is not open in the security group if you dont apply the default security group in which all the ports are open(which is Not recommended).

As suggested in comment @Issac, opened the 9000 port to allow incoming request to SonarQube, in AWS security group setting of instance. Which solved the issue.

Amit
  • 30,756
  • 6
  • 57
  • 88
  • I am getting this error, even I have configured this port 9000 with the security group. What I am missing here ? 2019.08.19 04:44:51 ERROR web[][o.a.c.h.Http11NioProtocol] Failed to initialize end point associated with ProtocolHandler ["http-nio-3.223.70.23-9000"] java.net.BindException: Cannot assign requested address – JDGuide Aug 19 '19 at 04:45
  • @JDGuide, were u able to open a `9000` port in security group and did you allow to access this port from anywhere ? – Amit Aug 19 '19 at 06:01
  • Thanks Amit, I have open all the TCP port range and I am able to start the sonar. But, now the issue is I am not able to access the sonar from my browser. My sonar is running on EC2 instance. Any idea ? – JDGuide Aug 19 '19 at 10:01
  • @JDGuide, I didn't get you that you were able to start the sonar? I thought you were just having an issue accessing it on port 9000? could you please explain in detail what you did – Amit Aug 19 '19 at 11:27
  • The sonarqube is running on EC2 instance. But, I am not able to access http://public-ip-address:9000/ from browser. – JDGuide Aug 19 '19 at 17:16
  • @JDGuide, Thanks for the clarification, but I need to check this by installing sonarqube as I don't have it handy. As this is now not specific to AWS security group, I would encourage you to ask a seprate question with your sonarqube config file. – Amit Aug 20 '19 at 05:17
0

need to have an db and give permissions to the db insonar.properties file in sonar nd need to open firewalls