title: Timeout exception when trying to download any remote index in Archiva 2.2.0
body: <p>Archiva 2.2.0. is up and running on a VM (CentOS 6.6).
  The VM can access the internet behind a proxy. </p>
  
  <p>For example, <code>GET repo1.maven.org</code> works well:</p>
  
  <pre><code>...
  &lt;body&gt;
          &lt;div id="top"&gt;&lt;/div&gt;
          &lt;div id="container"&gt;
          &lt;p&gt;Browsing for this directory has been disabled.&lt;/p&gt;
          &lt;p&gt;&lt;a href="http://search.maven.org/#browse"&gt;View&lt;/a&gt; this directory's contents on &lt;a href="http://search.maven.org/#browse"&gt;http://search.maven.org&lt;/a&gt; instead.&lt;/p&gt;
          &lt;p&gt;Find out more about &lt;a href="http://central.sonatype.org"&gt;The Central Repository&lt;/a&gt;.&lt;/p&gt;
          &lt;div id="footer-spacer"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div id="footer"&gt;
          &lt;a href="http://central.sonatype.org"&gt;About Central&lt;/a&gt;&amp;nbsp;|&amp;nbsp;&lt;a href="/terms.html"&gt;Terms of Service&lt;/a&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  ...
  </code></pre>
  
  <p>Two remote repositories are configured, both with the same proxy.</p>
  
  <p><img src="https://i.stack.imgur.com/M2KUZ.png" alt="enter image description here"></p>
  
  <p>But unfortunately, I always get the same connection timeout exception. See below the exception for one of the configured remote repository (Central).</p>
  
  <p>From <strong>archiva.log</strong>:</p>
  
  <pre><code>2015-06-01 10:24:55,286 [taskScheduler#indexDownloadRemote-1] INFO  org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask$DownloadListener [] - error of transfer file nexus-maven-repository-index.properties: Connect to repo1.maven.org:80 timed out
  org.apache.maven.wagon.TransferFailedException: Connect to repo1.maven.org:80 timed out
          at org.apache.maven.wagon.providers.http.AbstractHttpClientWagon.fillInputData(AbstractHttpClientWagon.java:892) ~[wagon-http-2.5.jar:2.5]
          at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116) [wagon-provider-api-2.5.jar:2.5]
          at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88) [wagon-provider-api-2.5.jar:2.5]
          at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61) [wagon-provider-api-2.5.jar:2.5]
          at org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask$WagonResourceFetcher.retrieve(DownloadRemoteIndexTask.java:351) [archiva-scheduler-indexing-2.2.0.jar:?]
          at org.apache.maven.index.updater.DefaultIndexUpdater.downloadIndexProperties(DefaultIndexUpdater.java:459) [indexer-core-5.1.1.jar:5.1.1]
          at org.apache.maven.index.updater.DefaultIndexUpdater.access$000(DefaultIndexUpdater.java:76) [indexer-core-5.1.1.jar:5.1.1]
          at org.apache.maven.index.updater.DefaultIndexUpdater$IndexAdaptor.setProperties(DefaultIndexUpdater.java:589) [indexer-core-5.1.1.jar:5.1.1]
          at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:814) [indexer-core-5.1.1.jar:5.1.1]
          at org.apache.maven.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:136) [indexer-core-5.1.1.jar:5.1.1]
          at org.apache.archiva.scheduler.indexing.DownloadRemoteIndexTask.run(DownloadRemoteIndexTask.java:186) [archiva-scheduler-indexing-2.2.0.jar:?]
          at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-4.1.4.RELEASE.jar:4.1.4.RELEASE]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [?:1.7.0_65]
          at java.util.concurrent.FutureTask.run(FutureTask.java:262) [?:1.7.0_65]
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [?:1.7.0_65]
          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [?:1.7.0_65]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_65]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_65]
          at java.lang.Thread.run(Thread.java:745) [?:1.7.0_65]
  Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to repo1.maven.org:80 timed out
          at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119) ~[httpclient-4.3.6.jar:4.3.6]
          at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177) ~[httpclient-4.3.6.jar:4.3.6]
          at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304) ~[httpclient-4.3.6.jar:4.3.6]
          at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611) ~[httpclient-4.3.6.jar:4.3.6]
          at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446) ~[httpclient-4.3.6.jar:4.3.6]
  </code></pre>
  
  <p>From <strong>request-*.log</strong>:</p>
  
  <pre><code>IP -  -  [01/juin/2015:08:47:55 +0000] "GET /restServices/archivaServices/remoteRepositoriesService/checkRemoteConnectivity/central?_=1433145022958 HTTP/1.1" 200 5 "http://$$$$$$$$$$/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36"
  IP -  -  [01/juin/2015:08:46:54 +0000] "GET /restServices/archivaServices/remoteRepositoriesService/checkRemoteConnectivity/repo.jenkins-ci.org?_=1433145022952 HTTP/1.1" 200 5 "http://$$$$$$$$$$/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36"
  </code></pre>
  
  <p>Am I missing something?
  Thanks!</p>