uploadArchives fails for large files


(tulsoba) #1

Using gradle 1.5. I have a jenkins build (on an ubuntu 11.10 slave) using gradle that upload a 100 MB war file to artifactory (accepts upto 250 MB). But it fails:

:MyWarProject:uploadArchivesUploading: com/group/MyWarProject/1.0.0-SNAPSHOT/MyWarProject-1.0.0-20130507.170556-168.war to repository remote at http://artifactory.xxxx
Transferring 103019K from remote
Error writing to server
 FAILED
FAILURE: Build failed with an exception.
  * What went wrong:
Execution failed for task ':MyWarProject:uploadArchives'.
> Could not publish configuration 'archives'
   > Error deploying artifact 'com.group:MyWarProject:war': Error deploying artifact: Error transferring file
  * Try:
Run with --info or --debug option to get more log output.
  * Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':MyWarProject:uploadArchives'.
 at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:72)
 at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:49)
 at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)
 at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$1.run(CacheLockHandlingTaskExecuter.java:34)

I works fine with smaller uploads. Any ideas?


#2

Without the full stacktrace or debug logs, it’s pretty hard to see what’s going wrong.


(tulsoba) #3

It seems to be problem with the maven wagon:

at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:49)
 at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)
 at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$1.run(CacheLockHandlingTaskExecuter.java:34)
 at org.gradle.internal.Factories$1.create(Factories.java:22)
 at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:179)
 at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:232)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83)
 at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter.execute(CacheLockHandlingTaskExecuter.java:32)
 at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:55)
 at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
 at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
 at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
 at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
 at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
 at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:275)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.executeTask(DefaultTaskPlanExecutor.java:52)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.processTask(DefaultTaskPlanExecutor.java:38)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:30)
 at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:84)
 at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
 at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
 at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
 at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
 at org.gradle.internal.Factories$1.create(Factories.java:22)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
 at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
 at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
 at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
 at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
 at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
 at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
 at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:166)
 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
 at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
 at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
 at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:25)
 at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
 at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
 at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
 at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
 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:48)
 at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
 at org.gradle.launcher.Main.main(Main.java:39)
 at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
 at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
 at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: org.gradle.api.artifacts.PublishException: Could not publish configuration 'archives'
 at org.gradle.api.tasks.Upload.upload(Upload.java:84)
 at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216)
 at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122)
 at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:147)
 at org.gradle.api.tasks.Upload_Decorated.invokeMethod(Unknown Source)
 at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
 at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$4.execute(AnnotationProcessingTaskFactory.java:161)
 at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$4.execute(AnnotationProcessingTaskFactory.java:156)
 at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:510)
 at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:499)
 at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:64)
 ... 57 more
Caused by: Error deploying artifact 'com.group:MyWarProjectWeb:war': Error deploying artifact: Error transferring file
 at org.apache.maven.artifact.ant.DeployTask.doExecute(DeployTask.java:144)
 at org.gradle.api.publication.maven.internal.ant.CustomDeployTask.doExecute(CustomDeployTask.java:41)
 at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:751)
 at org.gradle.api.publication.maven.internal.ant.AbstractMavenResolver.execute(AbstractMavenResolver.java:194)
 at org.gradle.api.publication.maven.internal.ant.AbstractMavenResolver.commitPublishTransaction(AbstractMavenResolver.java:185)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher$Publication.publishTo(DefaultIvyDependencyPublisher.java:95)
 at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyDependencyPublisher.publish(DefaultIvyDependencyPublisher.java:54)
 at org.gradle.api.internal.artifacts.ivyservice.IvyBackedArtifactPublisher.publish(IvyBackedArtifactPublisher.java:62)
 at org.gradle.api.tasks.Upload.upload(Upload.java:82)
 ... 67 more
Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error deploying artifact: Error transferring file
 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:121)
 at org.apache.maven.artifact.ant.DeployTask.doExecute(DeployTask.java:125)
 ... 75 more
Caused by: org.apache.maven.wagon.TransferFailedException: Error transferring file
 at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:213)
 at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:413)
 at org.apache.maven.wagon.AbstractWagon.transfer(AbstractWagon.java:392)
 at org.apache.maven.wagon.AbstractWagon.putTransfer(AbstractWagon.java:365)
 at org.apache.maven.wagon.StreamWagon.put(StreamWagon.java:163)
 at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:317)
 at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:227)
 at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:107)
 ... 76 more
Caused by: java.io.IOException: Error writing to server
 at org.apache.maven.wagon.providers.http.LightweightHttpWagon.finishPutTransfer(LightweightHttpWagon.java:185)
 ... 83 more

(Luke Daley) #4

It’s unlikely there’s anything we can do here. You might need to find another wagon implementation to use.

If you find one that works, we could look at using that by default.

We can consider non wagon approaches for the new publishing stuff.