Unable to open remotely installed sonar on a browser

后端 未结 4 1452
醉话见心
醉话见心 2020-12-11 07:27

I have installed sonar on a remote Linux cent OS server. I have configured the database on the same server. When I start the server, I don\'t see any errors in the logs and

相关标签:
4条回答
  • 2020-12-11 07:37

    In your server's sonar.properties file, you'll need to set the host information in order to access the server remotely.

    Specifically, you need to set the following values:

    sonar.web.host: 192.168.1.1 #use your server IP here
    sonar.web.port: 80 #set this if you want a different port than 9000
    

    Also, in the web UI's Settings area, under the "General" section, set the "Server base URL" value so that links in generate emails, etc, point to the right location. This can also be set in your sonar.properties file as sonar.core.serverBaseURL

    Don't forget to restart the Sonar service for the changes to take effect.

    0 讨论(0)
  • 2020-12-11 07:40

    My problem was, I had to allow port in iptables and not append(default) it but add it in front of rule "drop all", which negated everything after.

    command:

    iptables -I INPUT 1 -p tcp --dport 9000 -j ACCEPT
    

    where 1 - defines at which(1st) position of iptable rules to add it

    0 讨论(0)
  • 2020-12-11 07:40

    Change the sonar.properties as below and restart the Sonar server. This should make Sonar accessible over the network and not limited to localhost

    sonar.web.host=0.0.0.0
    
    0 讨论(0)
  • 2020-12-11 07:59

    By default sonar listens on localhost so you can access sonar through only localhost you have to make it listen on remote hosts by changing the parameter url in sonar-runner.properties. You have to keep the local ip of the linux server instead of 127.0.0.1

    Thanks & Regards,
    Alok Thaker

    0 讨论(0)
提交回复
热议问题