Org.apache.http.NoHttpResponseException: ****.com:80 failed to respond with gradle 2.11

When we recently switched from gradle 2.9 to gradle 2.11 we started hitting intermittent build failures due to what appears to be issues connecting to our Artifactory repository server. We were forced to move back to 2.9 which appears to not have this issue. It’s totally possible that the Artifactory server is slow to respond as it tends to be a bit overloaded, however we do not see any of these issues in gradle 2.9 so I believe that release must have been more tolerant of whatever slowness or connection issues it is encountering with the server. Perhaps this is related to the update to HttpClient 4.4.1 in that release? The following is the stacktrace from the failed build:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':******:****:****'.
> Could not download jaxb-core.jar (com.sun.xml.bind:jaxb-core:2.2.8-b01)
   > Could not get resource 'http://*****************.com/artifactory/********/com/sun/xml/bind/jaxb-core/2.2.8-b01/jaxb-core-2.2.8-b01.jar'.
      > Could not GET 'http://*****************.com/artifactory/********/com/sun/xml/bind/jaxb-core/2.2.8-b01/jaxb-core-2.2.8-b01.jar'.
         > *****************.com:80 failed to respond

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':******:****:****'.
	at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.wrapException(ErrorHandlingConfigurationResolver.java:70)
	at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.access$000(ErrorHandlingConfigurationResolver.java:33)
	at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingConfigurationResolver.java:199)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:665)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:288)
	at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)
	at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:202)
	at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:103)
	at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
	at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext$FileTreeConverter.convertInto(DefaultFileCollectionResolveContext.java:188)
	at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.doResolve(DefaultFileCollectionResolveContext.java:98)
	at org.gradle.api.internal.file.collections.DefaultFileCollectionResolveContext.resolveAsFileTrees(DefaultFileCollectionResolveContext.java:74)
	at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter.visitFiles(DefaultFileCollectionSnapshotter.java:96)
	at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter.snapshot(DefaultFileCollectionSnapshotter.java:61)
	at org.gradle.api.internal.changedetection.rules.TaskUpToDateState.<init>(TaskUpToDateState.java:56)
	at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.getStates(DefaultTaskArtifactStateRepository.java:135)
	at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:73)
	at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
	at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
	at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
	at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
	at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
	at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
	at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
	at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
	at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
	at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
	at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
	at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:154)
	at org.gradle.internal.Factories$1.create(Factories.java:22)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:52)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:151)
	at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
	at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:99)
	at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:93)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
	at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:62)
	at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:93)
	at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:82)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:94)
	at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:43)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:28)
	at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
	at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:45)
	at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
	at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
	at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
	at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:170)
	at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:237)
	at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:210)
	at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
	at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
	at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
	at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
	at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
	at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
	at org.gradle.launcher.Main.doAction(Main.java:33)
	at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
	at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
	at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: org.gradle.internal.resolve.ArtifactResolveException: Could not download jaxb-core.jar (com.sun.xml.bind:jaxb-core:2.2.8-b01)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveArtifact(ExternalResourceResolver.java:240)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveArtifact(ExternalResourceResolver.java:436)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess$5.run(CacheLockReleasingModuleComponentsRepository.java:96)
	at org.gradle.internal.Factories$1.create(Factories.java:22)
	at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:242)
	at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:313)
	at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:114)
	at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.longRunningOperation(DefaultCacheFactory.java:179)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.longRunningOperation(DefaultCacheLockingManager.java:56)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess.resolveArtifact(CacheLockReleasingModuleComponentsRepository.java:94)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.resolveArtifact(CachingModuleComponentRepository.java:342)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.resolveArtifact(BaseModuleComponentRepositoryAccess.java:54)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedModuleComponentRepository$CachedAccess.resolveArtifact(InMemoryCachedModuleComponentRepository.java:82)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveArtifact(ErrorHandlingModuleComponentRepository.java:116)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainArtifactResolver.resolveArtifact(RepositoryChainArtifactResolver.java:65)
	at org.gradle.api.internal.artifacts.ivyservice.resolveengine.ComponentResolversChain$ArtifactResolverChain.resolveArtifact(ComponentResolversChain.java:98)
	at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver$3.execute(ContextualArtifactResolver.java:61)
	at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver$3.execute(ContextualArtifactResolver.java:59)
	at org.gradle.internal.Transformers$4.transform(Transformers.java:137)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
	at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver$4.run(ContextualArtifactResolver.java:69)
	at org.gradle.internal.Factories$1.create(Factories.java:22)
	at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
	at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
	at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
	at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
	at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver.executeInContext(ContextualArtifactResolver.java:67)
	at org.gradle.api.internal.artifacts.ivyservice.ContextualArtifactResolver.resolveArtifact(ContextualArtifactResolver.java:59)
	at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingArtifactResolver.resolveArtifact(ErrorHandlingArtifactResolver.java:53)
	at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultArtifactSet$LazyArtifactSource.create(DefaultArtifactSet.java:93)
	at org.gradle.api.internal.artifacts.ivyservice.resolveengine.artifact.DefaultArtifactSet$LazyArtifactSource.create(DefaultArtifactSet.java:80)
	at org.gradle.api.internal.artifacts.DefaultResolvedArtifact.getFile(DefaultResolvedArtifact.java:90)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$2.run(DefaultLenientConfiguration.java:122)
	at org.gradle.internal.Factories$1.create(Factories.java:22)
	at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
	at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
	at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
	at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFiles(DefaultLenientConfiguration.java:119)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.getFilesStrict(DefaultLenientConfiguration.java:91)
	at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.getFiles(DefaultResolvedConfiguration.java:45)
	at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver$FilesAggregatingResolvedConfiguration.getFiles(SelfResolvingDependencyConfigurationResolver.java:87)
	at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver$ErrorHandlingResolvedConfiguration.getFiles(ErrorHandlingConfigurationResolver.java:197)
	... 69 more
Caused by: org.gradle.internal.resource.ResourceException: Could not get resource 'http://*****************.com/artifactory/********/com/sun/xml/bind/jaxb-core/2.2.8-b01/jaxb-core-2.2.8-b01.jar'.
	at org.gradle.internal.resource.ResourceException.failure(ResourceException.java:61)
	at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:99)
	at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.resolveArtifact(DefaultExternalResourceArtifactResolver.java:60)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.download(ExternalResourceResolver.java:252)
	at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveArtifact(ExternalResourceResolver.java:238)
	... 114 more
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'http://*****************.com/artifactory/********/com/sun/xml/bind/jaxb-core/2.2.8-b01/jaxb-core-2.2.8-b01.jar'.
	at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:72)
	at org.gradle.internal.resource.transport.http.HttpClientHelper.performRawGet(HttpClientHelper.java:58)
	at org.gradle.internal.resource.transport.http.HttpClientHelper.performGet(HttpClientHelper.java:62)
	at org.gradle.internal.resource.transport.http.HttpResourceAccessor.openResource(HttpResourceAccessor.java:51)
	at org.gradle.internal.resource.transport.http.HttpResourceAccessor.openResource(HttpResourceAccessor.java:34)
	at org.gradle.internal.resource.transfer.DefaultExternalResourceConnector.openResource(DefaultExternalResourceConnector.java:41)
	at org.gradle.internal.resource.transfer.ProgressLoggingExternalResourceAccessor.openResource(ProgressLoggingExternalResourceAccessor.java:36)
	at org.gradle.internal.resource.transport.DefaultExternalResourceRepository.getResource(DefaultExternalResourceRepository.java:63)
	at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:75)
	at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:90)
	... 117 more
Caused by: org.apache.http.NoHttpResponseException: *****************.com:80 failed to respond
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
	at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
	at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
	at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
	at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
	at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	at org.gradle.internal.resource.transport.http.HttpClientHelper.performHttpRequest(HttpClientHelper.java:102)
	at org.gradle.internal.resource.transport.http.HttpClientHelper.executeGetOrHead(HttpClientHelper.java:79)
	at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:70)
	... 126 more

Do you have any proxy settings configured?

We are not configuring any proxy settings in gradle explicilty. So I believe the answer is no unless gradle is somehow picking up proxy settings from the machine environment. However the Artifactory server is internal and typically the OS level proxy settings are configured to exclude internal domains.

Hmm…

Could you try running with -d and catch a build that fails? There might be something interesting from the httpclient log messages.

Sorry, my previous post was too long and didn’t get posted. Here’s the debug output from a failed run:
08:50:28.733 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (/////.gradle/caches/modules-2/metadata-2.16/artifact-at-repository.bin)
08:50:28.733 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (/
////.gradle/caches/modules-2).
08:50:28.733 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Plugin Resolution Cache (/
////.gradle/caches/2.11/plugin-resolution) was closed 0 times.
08:50:28.733 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopping 1 compiler daemon(s).
08:50:28.735 [QUIET] [system.out] 08:50:28.734 [DEBUG] [org.gradle.process.internal.child.ActionExecutionWorker] Completed Gradle Compiler Daemon 1.
08:50:28.739 [QUIET] [system.out] 08:50:28.739 [DEBUG] [org.gradle.process.internal.child.ActionExecutionWorker] Stopping client connection.
08:50:28.807 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: SUCCEEDED
08:50:28.807 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process ‘Gradle Compiler Daemon 1’ finished with exit value 0 (state: SUCCEEDED)
08:50:28.811 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 1 compiler daemon(s).
08:50:28.811 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory workerMain (/
////.gradle/caches/2.11/workerMain).
[rgenna@slc03qoj src1390]$ tail -255 gradle.fail
08:50:28.692 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Downloaded artifact ‘jackson-jaxrs-base.jar (com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.4.3)’ from resolver: maven
08:50:28.693 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading http://
.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
08:50:28.693 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: http://
.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
08:50:28.693 [DEBUG] [org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing external resource metadata: http://
.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
08:50:28.693 [DEBUG] [org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP HEAD: http://
.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
08:50:28.693 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: default
08:50:28.694 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
08:50:28.694 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection request: [route: {}->http://
.com:80][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
08:50:28.694 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection leased: [id: 40][route: {}->http://
.com:80][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
08:50:28.694 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Executing request HEAD /artifactory/
/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar HTTP/1.1
08:50:28.694 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Target auth state: UNCHALLENGED
08:50:28.694 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Proxy auth state: UNCHALLENGED
08:50:28.694 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-40: Close connection
08:50:28.694 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-40: Shutdown connection
08:50:28.694 [DEBUG] [org.apache.http.impl.execchain.MainClientExec] Connection discarded
08:50:28.695 [DEBUG] [org.apache.http.impl.conn.DefaultManagedHttpClientConnection] http-outgoing-40: Close connection
08:50:28.695 [DEBUG] [org.apache.http.impl.conn.PoolingHttpClientConnectionManager] Connection released: [id: 40][route: {}->http://
.com:80][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
08:50:28.696 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Downloaded artifact ‘javax.ws.rs-api.jar (javax.ws.rs:javax.ws.rs-api:2.0.1)’ from resolver: maven
08:50:28.697 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':
:*******************:compileJava’
08:50:28.697 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :
::compileJava (Thread[main,5,main]) completed. Took 4 mins 17.202 secs.
08:50:28.697 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 9 mins 32.719 secs, idle: 0.014 secs
08:50:28.707 [ERROR] [org.gradle.BuildExceptionReporter]
08:50:28.707 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
08:50:28.707 [ERROR] [org.gradle.BuildExceptionReporter]
08:50:28.707 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
08:50:28.707 [ERROR] [org.gradle.BuildExceptionReporter] Could not resolve all dependencies for configuration ':
**:
:compile’.
08:50:28.707 [ERROR] [org.gradle.BuildExceptionReporter] > Could not download javax.ws.rs-api.jar (javax.ws.rs:javax.ws.rs-api:2.0.1)
08:50:28.707 [ERROR] [org.gradle.BuildExceptionReporter] > Could not get resource ‘http://.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar’.
08:50:28.708 [ERROR] [org.gradle.BuildExceptionReporter] > Could not HEAD 'http://
.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar’.
08:50:28.708 [ERROR] [org.gradle.BuildExceptionReporter] > ************.com:80 failed to respond
08:50:28.708 [ERROR] [org.gradle.BuildExceptionReporter]
08:50:28.708 [ERROR] [org.gradle.BuildExceptionReporter] * Exception is:
08:50:28.709 [ERROR] [org.gradle.BuildExceptionReporter] org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':
:*******************:compile’.

08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not HEAD ‘http://*********.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar’.
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:72)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performRawHead(HttpClientHelper.java:50)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performHead(HttpClientHelper.java:54)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpResourceAccessor.getMetaData(HttpResourceAccessor.java:85)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transfer.DefaultExternalResourceConnector.getMetaData(DefaultExternalResourceConnector.java:47)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.DefaultExternalResourceRepository.getResourceMetaData(DefaultExternalResourceRepository.java:68)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:84)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:90)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] … 117 more
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.apache.http.NoHttpResponseException: *****************.com:80 failed to respond
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
08:50:28.719 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performHttpRequest(HttpClientHelper.java:102)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.executeGetOrHead(HttpClientHelper.java:79)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:70)
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter] … 124 more
08:50:28.720 [ERROR] [org.gradle.BuildExceptionReporter]
08:50:28.721 [LIFECYCLE] [org.gradle.BuildResultLogger]
08:50:28.721 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
08:50:28.721 [LIFECYCLE] [org.gradle.BuildResultLogger]
08:50:28.721 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 13 mins 7.595 secs

And this is the debug output from gradle 2.9 when it successfully downloaded the same artifact:

11:08:57.675 [DEBUG] [org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver] Loading http://.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
11:08:57.675 [DEBUG] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Constructing external resource: http://
.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
11:08:57.675 [DEBUG] [org.gradle.internal.resource.transport.http.HttpResourceAccessor] Constructing external resource metadata: http://.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
11:08:57.675 [DEBUG] [org.gradle.internal.resource.transport.http.HttpClientHelper] Performing HTTP HEAD: http://
.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar
11:08:57.675 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection request: [route: {}->http://.com][total kept alive: 1; route allocated: 1 of 5; total allocated: 1 of 10]
11:08:57.675 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection leased: [id: 41][route: {}->http://
.com][total kept alive: 0; route allocated: 1 of 5; total allocated: 1 of 10]
11:08:57.675 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Stale connection check
11:08:57.676 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: best-match
11:08:57.676 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
11:08:57.676 [DEBUG] [org.apache.http.client.protocol.RequestTargetAuthentication] Target auth state: UNCHALLENGED
11:08:57.676 [DEBUG] [org.apache.http.client.protocol.RequestProxyAuthentication] Proxy auth state: UNCHALLENGED
11:08:57.676 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Attempt 1 to execute request
11:08:57.676 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Sending request: HEAD /artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar HTTP/1.1
11:08:58.321 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 200 OK
11:08:58.321 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Connection can be kept alive for 120000 MILLISECONDS
11:08:58.321 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection [id: 41][route: {}->http://
.com] can be kept alive for 120000 MILLISECONDS
11:08:58.321 [DEBUG] [org.apache.http.impl.conn.PoolingClientConnectionManager] Connection released: [id: 41][route: {}->http://
.com][total kept alive: 1; route allocated: 1 of 5; total allocated: 1 of 10]
11:08:58.322 [INFO] [org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor] Cached resource Fri Mar 18 14:56:11 PDT 2016 is up-to-date (lastModified: http://
*.com/artifactory//javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar).
11:08:58.322 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository] Downloaded artifact ‘javax.ws.rs-api.jar (javax.ws.rs:javax.ws.rs-api:2.0.1)’ from resolver: maven

I’ve opened GRADLE-3424 to track this issue.

@rgenna I’ve pushed a build of Gradle 2.13 which includes a potential fix for this issue. Could you please try your build with this Gradle distribution and see if it resolves your problem?

http://services.gradle.org/distributions-snapshots/gradle-2.13-20160404185220+0000-bin.zip

@mark_vieira I’ve run our build a few times now using the 2.13 build you provided (and with the --refresh-dependencies option each time) and have not seen an issue yet.

Great, I’m marking GRADLE-3424 as fixed. This will be released in Gradle 2.13.

1 Like