New SonarQube install -- why do I need a reverse proxy and it's not listening on 9000?

Hello:

I’m new to SonarQube and I’m installing sonarqube-8.3.1.34397 and running Java 11.0.6 on CentOS 7.8.2003.

I’m following Operating the server and just got done with installing SQ as a systemd service. Here’s a test:

$ systemctl -l status sonarqube
sonarqube.service - SonarQube service
   Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2020-07-02 17:52:41 GMT; 6s ago
 Main PID: 19974 (java)
    Tasks: 43
   CGroup: /system.slice/sonarqube.service
           ├─19974 /opt/java/latest/bin/java -Xms32m -Xmx32m -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/latest/lib/sonar-application-8.3.1.34397.jar
           └─19992 /opt/java/jdk-11.0.6/bin/java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/opt/sonarqube/sonarqube-8.3.1.34397/temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Des.path.home=/opt/sonarqube/sonarqube-8.3.1.34397/elasticsearch -Des.path.conf=/opt/sonarqube/sonarqube-8.3.1.34397/temp/conf/es -Des.distribution.flavor=default -Des.distribution.type=tar -cp /opt/sonarqube/sonarqube-8.3.1.34397/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch

Jul 02 17:52:41 localhost.localdomain systemd[1]: Started SonarQube service.
Jul 02 17:52:42 localhost.localdomain nohup[19974]: 2020.07.02 17:52:42 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/sonarqube-8.3.1.34397/temp
Jul 02 17:52:42 localhost.localdomain nohup[19974]: 2020.07.02 17:52:42 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
Jul 02 17:52:42 localhost.localdomain nohup[19974]: 2020.07.02 17:52:42 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/sonarqube-8.3.1.34397/elasticsearch]: /opt/sonarqube/sonarqube-8.3.1.34397/elasticsearch/bin/elasticsearch
Jul 02 17:52:42 localhost.localdomain nohup[19974]: 2020.07.02 17:52:42 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Jul 02 17:52:42 localhost.localdomain nohup[19974]: 2020.07.02 17:52:42 INFO  app[][o.e.p.PluginsService] no modules loaded
Jul 02 17:52:42 localhost.localdomain nohup[19974]: 2020.07.02 17:52:42 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
Jul 02 17:52:43 localhost.localdomain nohup[19974]: Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

The directions now say to run apache as a reverse proxy. Why?

  1. If SQ is listening on port 9000 by default, why can’t I just open a browser and go to http://localhost:9000?

  2. I don’t see anything listening to port 9000. Any suggestions in this regard would be greatly appreciated.

$sudo netstat -plnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      693/rpcbind         
tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      1761/dnsmasq        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1385/sshd           
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1382/cupsd          
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1629/master     

Thanks!

Hi,

Welcome to the community!

In fact, that part of the docs is there to help if you want to run SonarQube behind a proxy. If you don’t, then by all means skip this.

 
:smiley:
Ann

If you don’t, then by all means skip this.

Right. But if I skip it AND I type (http or https) localhost:9000 nothing happens… the browser doesn’t show anything.

How do I get to see the UI in sonarqube after installing it?

Hi,

Is the browser on the same machine as SonarQube? That’s the only way a localhost address will work… Otherwise. you need to use the server’s IP address or whatever domain name has been assigned to it.

 
Ann

Got it. Thanks. I used the IP address. I

Is there a way to mark the thread resolved?

Hi,

I’m glad you got it worked out.

You should have the controls to mark one of the posts in the thread as the Solution (you may have to expand the ellipses to see it).

 
:slightly_smiling_face:
Ann

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.