0

I'm doing static code analysis with sonarqube, but installion was failed. when i type on browser

http://localhost:9000/sonar.  

This site can’t be reached

localhost refused to connect. Search Google for localhost 9000 sonar

I install by using this site..

terminal :

   naveen@naveen-Inspiron-3542:~$ telnet localhost 9000
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Connection closed by foreign host.
naveen@naveen-Inspiron-3542:~$ netstat -ntlp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:18618         0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:18619         0.0.0.0:*               LISTEN      -               
tcp6       0      0 :::8080                 :::*                    LISTEN      -               
tcp6       0      0 :::80                   :::*                    LISTEN      -               
tcp6       0      0 :::39701                :::*                    LISTEN      -               
tcp6       0      0 :::22                   :::*                    LISTEN      -               
tcp6       0      0 ::1:631                 :::*                    LISTEN      -               
naveen@naveen-Inspiron-3542:~$ cd /opt/sonar
naveen@naveen-Inspiron-3542:/opt/sonar$ cd bin
naveen@naveen-Inspiron-3542:/opt/sonar/bin$ ls
jsw-license   linux-x86-64         windows-x86-32
linux-x86-32  macosx-universal-64  windows-x86-64
naveen@naveen-Inspiron-3542:/opt/sonar/bin$ cd linux-x86-64
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$ ls
lib  sonar.sh  wrapper
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$  sudo ./sonar.sh stop 
[sudo] password for naveen: 
Stopping SonarQube...
SonarQube was not running.
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$  netstat -ntl 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:18618         0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:18619         0.0.0.0:*               LISTEN     
tcp6       0      0 :::8080                 :::*                    LISTEN     
tcp6       0      0 :::80                   :::*                    LISTEN     
tcp6       0      0 :::39701                :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:631                 :::*                    LISTEN     
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$ netstat -ntlp | grep 9000
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      -               
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$ sudo netstat -ntlp | grep 9000
tcp        0      0 127.0.0.1:9000          0.0.0.0:*               LISTEN      1278/php-fpm.conf)
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$ sudo netstat -ntlp | grep 9000
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$ netstat -ntl | grep 9000
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$ sudo ^C
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$  sudo ./sonar.sh start
Starting SonarQube...
Started SonarQube.
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$ sudo ./sonar.sh status
SonarQube is running (4014).
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$  netstat -ntl | grep 9000 
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$ sudo netstat -ntl | grep 9000
naveen@naveen-Inspiron-3542:/opt/sonar/bin/linux-x86-64$  telnet localhost 9000 Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
  • I'm facing the same issue: root@storage:/opt/sonar/sonar-runner-2.4/bin# telnet 192.168.0.227 9000 Trying 192.168.0.227... telnet: Unable to connect to remote host: Connection refused root@storage:/opt/sonar/sonar-runner-2.4/bin# – BSAI Techno Sales Jan 10 '18 at 9:55
  • It should be in comment and it is not an answer for the question. – Bhavani Jan 10 '18 at 10:18
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide an context. – Bharat Mane Jan 10 '18 at 10:49
  • Please let me know your feedback on the following url stackoverflow.com/questions/48145107/… – BSAI Techno Sales Jan 10 '18 at 11:51
1

You already have something else on port 9000 that isn't sonar when you telnet in , it will need to be stopped before anything else can bind to that port.

use losf to find out which process it is

lsof -i:9000

for more info on lsof see this, its not installed by default on a lot of distros.

https://debian-administration.org/article/184/How_to_find_out_which_process_is_listening_upon_a_port

| improve this answer | |
0

If i was you ,first i will delete every thing and download another version on SQ. Then follow the same set of procedures to host the server. It dont take much time.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy