SonarQube Runner
  1. SonarQube Runner
  2. SONARUNNER-50

Improve the error message when the bootstrapper fails to connect to server

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The bootstrapper should display a clean error message when it can't connect to server. The message "ERROR - Sonar server "http://xxx" can not be reached" would be much better than only a stacktrace :

      23:33.917 INFO  org.sonar.batch.bootstrapper.BootstrapException: Connection refused
      11:23:33.917 INFO  	at org.sonar.batch.bootstrapper.Bootstrapper.getServerVersion(Bootstrapper.java:71)
      11:23:33.919 INFO  	at org.sonar.runner.Runner.checkSonarVersion(Runner.java:111)
      11:23:33.919 INFO  	at org.sonar.runner.Runner.execute(Runner.java:57)
      11:23:33.920 INFO  	at com.sonar.autocontrol.RunnerBootstrapper.start(RunnerBootstrapper.java:26)
      11:23:33.920 INFO  	at com.sonar.autocontrol.Main.main(Main.java:17)
      11:23:33.921 INFO  Caused by: java.net.ConnectException: Connection refused
      11:23:33.921 INFO  	at java.net.PlainSocketImpl.socketConnect(Native Method)
      11:23:33.921 INFO  	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
      11:23:33.921 INFO  	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
      11:23:33.922 INFO  	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
      11:23:33.923 INFO  	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)
      11:23:33.923 INFO  	at java.net.Socket.connect(Socket.java:529)
      11:23:33.924 INFO  	at sun.net.NetworkClient.doConnect(NetworkClient.java:158)
      11:23:33.924 INFO  	at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
      11:23:33.924 INFO  	at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
      11:23:33.924 INFO  	at sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
      11:23:33.925 INFO  	at sun.net.www.http.HttpClient.New(HttpClient.java:307)
      11:23:33.925 INFO  	at sun.net.www.http.HttpClient.New(HttpClient.java:324)
      11:23:33.926 INFO  	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
      11:23:33.926 INFO  	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
      11:23:33.926 INFO  	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
      11:23:33.927 INFO  	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172)
      11:23:33.927 INFO  	at java.net.URLConnection.getContent(URLConnection.java:688)
      11:23:33.928 INFO  	at org.sonar.batch.bootstrapper.Bootstrapper.remoteContent(Bootstrapper.java:123)
      11:23:33.928 INFO  	at org.sonar.batch.bootstrapper.Bootstrapper.getServerVersion(Bootstrapper.java:69)
      

        Activity

        Hide
        Fabrice Bellingard added a comment -

        Manually tested

        Show
        Fabrice Bellingard added a comment - Manually tested
        Hide
        Julien HENRY added a comment -

        IT added.

        Show
        Julien HENRY added a comment - IT added.

          People

          • Assignee:
            Julien HENRY
            Reporter:
            Fabrice Bellingard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: