title: SonarQube requesting project properties via http results in "java.net.SocketTimeoutException: Read timed out"
body: <p>When using sonar runner to analyze a multi-module project I repeatedly run into a <code>java.net.SocketTimeoutException: Read timed out</code> exception being thrown at various point during the analysis. The project has 13 modules and ~200k LOC total. SCM and LDAP plugins are being used.</p>
  
  <p>Environment:</p>
  
  <ul>
  <li>SonarQube: 4.4</li>
  <li>SonarRunner: 2.4</li>
  </ul>
  
  <p>The read timeout occurs either:</p>
  
  <ol>
  <li>At the beginning of analysis when loading global properties (e.g. <code>http://hostname:9000/batch_bootstrap/properties?dryRun=false</code>)</li>
  <li>Sometime in the middle when loading module properties (e.g. <code>http://hostname:9000/batch_bootstrap/properties?dryRun=false&amp;project=MyProj:MyModule</code>).</li>
  </ol>
  
  <p>I’ve look for a way to increase the socket time out but it looks like the following Sonar Runner analysis parameters were removed at some point:</p>
  
  <ul>
  <li>sonar.host.connectTimeoutMs</li>
  <li>sonar.host.readTimeoutMs</li>
  </ul>
  
  <p>Troubleshooting Notes:</p>
  
  <ul>
  <li>I’ve turned OFF LDAP authentication and the problem still exists.</li>
  <li>I can complete the http requests via a web browser (e.g. by typing <code>http://hostname:9000/batch_bootstrap/properties?dryRun=false</code> into Firefox) just fine and the request completes instantly which doesn’t suggest a delay that would cause a timeout.</li>
  </ul>
  
  <p>Any ideas on what the likely cause(s) may be and how to diagnose/troubleshoot this issue?</p>
  
  <p>Here’s the log output from one of the failures:</p>
  
  <pre><code>SonarQube Runner 2.4
  Java 1.7.0_25 Oracle Corporation (64-bit)
  Windows 7 6.1 amd64
  INFO: Error stacktraces are turned on.
  INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
  INFO: SonarQube Server 4.4
  09:14:24.854 INFO  - Load global settings
  INFO: ------------------------------------------------------------------------
  INFO: EXECUTION FAILURE
  INFO: ------------------------------------------------------------------------
  Total time: 21.447s
  Final Memory: 17M/308M
  INFO: ------------------------------------------------------------------------
  ERROR: Error during Sonar runner execution
  org.sonar.runner.impl.RunnerException: Unable to execute Sonar
      at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
      at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
      at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
      at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
      at org.sonar.runner.api.Runner.execute(Runner.java:100)
      at org.sonar.runner.Main.executeTask(Main.java:70)
      at org.sonar.runner.Main.execute(Main.java:59)
      at org.sonar.runner.Main.main(Main.java:53)
  Caused by: java.lang.IllegalStateException: Unable to request: /batch_bootstrap/properties?dryRun=false
      at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:91)
      at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:81)
      at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:77)
      at org.sonar.batch.settings.DefaultSettingsReferential.downloadSettings(DefaultSettingsReferential.java:65)
      at org.sonar.batch.settings.DefaultSettingsReferential.globalSettings(DefaultSettingsReferential.java:51)
      at org.sonar.batch.bootstrap.BatchSettings.downloadSettings(BatchSettings.java:94)
      at org.sonar.batch.bootstrap.BatchSettings.init(BatchSettings.java:74)
      at org.sonar.batch.bootstrap.BatchSettings.&lt;init&gt;(BatchSettings.java:57)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:145)
      at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:342)
      at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
      at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
      at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
      at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
      at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
      at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
      at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
      at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:631)
      at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
      at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
      at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
      at org.picocontainer.injectors.SingleMemberInjector.getMemberArguments(SingleMemberInjector.java:61)
      at org.picocontainer.injectors.MethodInjector.getMemberArguments(MethodInjector.java:100)
      at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:112)
      at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
      at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
      at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
      at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
      at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
      at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
      at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
      at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:631)
      at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
      at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
      at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
      at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
      at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
      at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
      at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
      at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
      at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
      at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
      at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
      at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
      at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:631)
      at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
      at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
      at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
      at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
      at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
      at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
      at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
      at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
      at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
      at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
      at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(DefaultPicoContainer.java:1033)
      at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable(DefaultPicoContainer.java:1025)
      at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)
      at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766)
      at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91)
      at org.sonar.batch.bootstrapper.Batch.start(Batch.java:81)
      at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
      at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
      ... 9 more
  Caused by: java.net.SocketTimeoutException: Read timed out
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
      at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1674)
      at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1672)
      at java.security.AccessController.doPrivileged(Native Method)
      at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1670)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1243)
      at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
      at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:274)
      at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:235)
      at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:87)
      ... 80 more
  Caused by: java.net.SocketTimeoutException: Read timed out
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:150)
      at java.net.SocketInputStream.read(SocketInputStream.java:121)
      at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
      at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
      at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
      at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:633)
      at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1322)
      at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2677)
      at java.net.URLConnection.getContentEncoding(URLConnection.java:533)
      at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:272)
      ... 82 more
  </code></pre>