vagrantsonarqubeubuntu-14.04sonarqube5.1sonarqube-web

SonarQube server is running but not reachable and saying 404 not found


I am running windows 10 and installed virtual box to use ubuntu with the help of vagrant, so finally i have ubuntu 14.04 running with vagrant on windows

I have installed SonarQube by following here

so sonar cube was installed in ubuntu at /opt/sonar/bin/linux-x86-64/ and it is running good when i checked as below

(env) vagrant@vagrant-ubuntu-trusty-64:~/Work/sonar$ sudo /opt/sonar/bin/linux-x86-64/sonar.sh status
SonarQube is running (7705).

my sonar properties file(/opt/sonar/conf/sonar.properties) contains below settings

sonar.jdbc.username=sonar
sonar.jdbc.password=sonar
sonar.jdbc.url=jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useConfigs=maxPerformance
sonar.web.host=127.0.0.1
sonar.web.context=/sonar
sonar.web.port=9002

Now when i tried to access it as below it is saying 404 not found

(env) vagrant@vagrant-ubuntu-trusty-64:~/Work/sonar$ wget http://127.0.0.1:9002
--2017-07-31 08:07:32--  http://127.0.0.1:9002/sonar
Connecting to 127.0.0.1:9002... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-07-31 08:07:32 ERROR 404: Not Found.

So can anyone please let me know what might be the reason that the sonar server is not accessible using the link http://127.0.0.1:9002/sonar and what changes needs to be done or am i missing something in sonar.properties file ?,

FYI, I am using wget http://127.0.0.1:9002/sonar instead of typing it browser url is, since because I am running ubuntu using vagrant inside windows i need to make port forwarding etc., which is additional work, and so just for the time being i accessed it like above


Solution

  • The solution i found to the above problem is just to comment the below options and restart the sonar server

    #sonar.web.host=127.0.0.1
    #sonar.web.context=/sonar