Status code 413: Request Entity Too Large
maison2710 opened this issue · 5 comments
I tried to publish a jar file by running sbt publish
. But I got this error:
[error] (*:publish) java.io.IOException: PUT operation to URL http://***.com/repository/snapshots/***-SNAPSHOT/***_SNAPSHOT.jar failed with status code 413: Request Entity Too Large
My jar size is about 80MB
I used version 0.16.0, which depends on GCP Firestore, which has maximum API request size of 10 MiB. This limit applies when Datastore mode is used outside of Google App Engine.
I am worry that the error thrown is because of request entity to large to GCP Firestore.
Thanks for the report @maison2710. That type of error would have provided a stack trace in the nexus repository manager log file; is it possible to send just the stack trace observed there?
Hi, this is the error when I run sbt publish
in my console
[info] published data_***_common to http://nexus-sonatype.***.com/repository/mvn-gke-snapshots/c.../1.32.1-SNAPSHOT/...-1.32.1-SNAPSHOT.pom
java.io.IOException: PUT operation to URL http://nexus-sonatype.***.com/repository/mvn-gke-snapshots/.../1.32.1-SNAPSHOT/...-1.32.1-SNAPSHOT.jar failed with status code 413: Request Entity Too Large
at org.apache.ivy.util.url.AbstractURLHandler.validatePutStatusCode(AbstractURLHandler.java:82)
at org.apache.ivy.util.url.BasicURLHandler.upload(BasicURLHandler.java:264)
at org.apache.ivy.util.FileUtil.copy(FileUtil.java:150)
at org.apache.ivy.plugins.repository.url.URLRepository.put(URLRepository.java:84)
at sbt.ConvertResolver$LocalIfFileRepo.put(ConvertResolver.scala:243)
at org.apache.ivy.plugins.repository.AbstractRepository.put(AbstractRepository.java:130)
at sbt.ConvertResolver$ChecksumFriendlyURLResolver$class.put(ConvertResolver.scala:81)
at sbt.ConvertResolver$$anonfun$defaultConvert$1$PluginCapableResolver$1.put(ConvertResolver.scala:115)
at org.apache.ivy.plugins.resolver.RepositoryResolver.publish(RepositoryResolver.java:216)
at sbt.IvyActions$$anonfun$publish$3.apply(IvyActions.scala:381)
at sbt.IvyActions$$anonfun$publish$3.apply(IvyActions.scala:380)
at scala.collection.TraversableLike$WithFilter$$anonfun$foreach$1.apply(TraversableLike.scala:772)
at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:771)
at sbt.IvyActions$.publish(IvyActions.scala:380)
at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply$mcV$sp(IvyActions.scala:124)
at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply(IvyActions.scala:124)
at sbt.IvyActions$$anonfun$publish$1$$anonfun$apply$1.apply(IvyActions.scala:124)
at sbt.IvyActions$.withChecksums(IvyActions.scala:133)
at sbt.IvyActions$.sbt$IvyActions$$withChecksums(IvyActions.scala:128)
at sbt.IvyActions$$anonfun$publish$1.apply(IvyActions.scala:124)
at sbt.IvyActions$$anonfun$publish$1.apply(IvyActions.scala:117)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:156)
at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:133)
at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:57)
at sbt.IvySbt$$anon$4.call(Ivy.scala:65)
at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
at xsbt.boot.Using$.withResource(Using.scala:10)
at xsbt.boot.Using$.apply(Using.scala:9)
at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
at xsbt.boot.Locks$.apply0(Locks.scala:31)
at xsbt.boot.Locks$.apply(Locks.scala:28)
at sbt.IvySbt.withDefaultLogger(Ivy.scala:65)
at sbt.IvySbt.withIvy(Ivy.scala:128)
at sbt.IvySbt.withIvy(Ivy.scala:125)
at sbt.IvySbt$Module.withModule(Ivy.scala:156)
at sbt.IvyActions$.publish(IvyActions.scala:117)
at sbt.Classpaths$$anonfun$publishTask$1.apply(Defaults.scala:1384)
at sbt.Classpaths$$anonfun$publishTask$1.apply(Defaults.scala:1383)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:35)
at scala.Function3$$anonfun$tupled$1.apply(Function3.scala:34)
at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
at sbt.std.Transform$$anon$4.work(System.scala:63)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
at sbt.Execute.work(Execute.scala:237)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
[error] (*:publish) java.io.IOException: PUT operation to URL http://nexus-sonatype.***.com/repository/mvn-gke-snapshots/.../1.32.1-SNAPSHOT/...-1.32.1-SNAPSHOT.jar failed with status code 413: Request Entity Too Large
`
I try to go to `/nexus-data/log/` but I can not find the stack trace. May you share more detail where I can find it? I can reproduce the error.
If you have administrative access to your repository manager instance, you can view the logs within the user interface, see https://help.sonatype.com/repomanager3/system-configuration/support-features#SupportFeatures-LoggingandLogViewer. You can also see the layout of a repository manager install directory at https://help.sonatype.com/repomanager3/installation/directories.
@nblair thank you so much for your support. After spending lots of time to check the log without any exception shown, I doubt that the issue may not be caused by nexus service. And that is correct. It is by our Nginx ingress controller in k8s as Nginx has some limit of request size (I deployed Nexus in K8s and use Nginx ingress controller to route traffic). After changing the configuration in Nginx, it works well now.
Awesome! Glad to hear it's resolved.