Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-15973

Bad request when distributing NuGet/Chocolatey artifacts

    XMLWordPrintable

    Details

      Description

      When deploying a certain type of Chocolatey/NuGet artifacts to Artifactory (nuget-local) and trying to distribute them to Bintray through the distribution repository, the following error is shown:

      2018-02-26 15:13:48,041 [http-nio-8080-exec-7] [ERROR] (o.a.b.d.BintrayVersionDistributor:143) Error distributing nuget-local/chocolatey.0.10.8.nupkg -> nuget/chocolatey/0.10.8/chocolatey.0.10.8.nupkg: 400, Bad Request Error occurred while uploading
      com.jfrog.bintray.client.api.BintrayCallException: Error occurred while uploading
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl$BintrayResponseHandler.handleResponse(BintrayImpl.java:381) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl$BintrayResponseHandler.handleResponse(BintrayImpl.java:375) ~[bintray-client-java-service-0.9.2.jar:na]
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222) ~[httpclient-4.5.1.jar:4.5.1]
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164) ~[httpclient-4.5.1.jar:4.5.1]
      	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139) ~[httpclient-4.5.1.jar:4.5.1]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl.execute(BintrayImpl.java:299) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl.setHeadersAndExecute(BintrayImpl.java:289) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl.put(BintrayImpl.java:185) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.BintrayImpl.putBinary(BintrayImpl.java:170) ~[bintray-client-java-service-0.9.2.jar:na]
      	at com.jfrog.bintray.client.impl.handle.VersionHandleImpl.upload(VersionHandleImpl.java:167) ~[bintray-client-java-service-0.9.2.jar:na]
      	at org.artifactory.bintray.distribution.BintrayVersionDistributor.distributeGeneric(BintrayVersionDistributor.java:207) [classes/:na]
      	at org.artifactory.bintray.distribution.BintrayVersionDistributor.pushArtifactToBintrayCoordinates(BintrayVersionDistributor.java:172) [classes/:na]
      	at org.artifactory.bintray.distribution.BintrayVersionDistributor.pushArtifacts(BintrayVersionDistributor.java:130) [classes/:na]
      	at org.artifactory.bintray.distribution.BintrayVersionDistributor.distributeVersion(BintrayVersionDistributor.java:98) [classes/:na]
      	at org.artifactory.bintray.distribution.DistributorImpl.distributeVersion(DistributorImpl.java:112) [classes/:na]
      	at org.artifactory.bintray.distribution.DistributorImpl.lambda$distributeInternal$1(DistributorImpl.java:99) [classes/:na]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_77]
      	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_77]
      	at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1540) ~[na:1.8.0_77]
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_77]
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_77]
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_77]
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_77]
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_77]
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_77]
      	at org.artifactory.bintray.distribution.DistributorImpl.distributeInternal(DistributorImpl.java:99) [classes/:na]
      	at org.artifactory.bintray.distribution.DistributorImpl.distribute(DistributorImpl.java:71) [classes/:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:201) ~[spring-aop-4.1.5.RELEASE.jar:4.1.5.RELEASE]
      	at com.sun.proxy.$Proxy133.distribute(Unknown Source) ~[na:na]
      	at org.artifactory.rest.resource.distribution.DistributionResource.distribute(DistributionResource.java:88) ~[classes/:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
      	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
      	at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409) ~[jersey-server-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409) ~[jersey-servlet-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:558) ~[jersey-servlet-1.19.jar:1.19]
      	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:733) ~[jersey-servlet-1.19.jar:1.19]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) ~[javax.servlet-api-3.1.0.jar:3.1.0]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.artifactory.webapp.servlet.RepoFilter.execute(RepoFilter.java:184) ~[classes/:na]
      	at org.artifactory.webapp.servlet.RepoFilter.doFilter(RepoFilter.java:93) ~[classes/:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.lambda$doFilter$1(ArtifactoryAuthenticationFilterChain.java:133) ~[classes/:na]
      	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201) ~[spring-security-web-3.2.0.RELEASE.jar:3.2.0.RELEASE]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryBasicAuthenticationFilter.doFilter(ArtifactoryBasicAuthenticationFilter.java:84) ~[classes/:na]
      	at org.artifactory.webapp.servlet.authentication.ArtifactoryAuthenticationFilterChain.doFilter(ArtifactoryAuthenticationFilterChain.java:169) ~[classes/:na]
      	at org.artifactory.webapp.servlet.AccessFilter.authenticateAndExecute(AccessFilter.java:282) ~[classes/:na]
      	at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:206) ~[classes/:na]
      	at org.artifactory.webapp.servlet.AccessFilter.doFilter(AccessFilter.java:166) ~[classes/:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.artifactory.webapp.servlet.RequestFilter.doFilter(RequestFilter.java:67) ~[classes/:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:164) ~[spring-session-1.2.2.RELEASE.jar:na]
      	at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80) ~[spring-session-1.2.2.RELEASE.jar:na]
      	at org.artifactory.webapp.servlet.SessionFilter.doFilter(SessionFilter.java:62) ~[classes/:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:128) ~[classes/:na]
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:279) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.valves.rewrite.RewriteValve.invoke(RewriteValve.java:542) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:677) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_77]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_77]
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
      	at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_77]
      

      There are several packages we tested which are available in the public Chocolatey Gallery. Steps to reproduce:

      • Deploy a chocolatey.0.10.8.nupkg into Artifactory nuget-local
      • Distribute the Artifact in question to the predefined dist-repo
      • The mentioned error (400 Bad Request) will be dispalyed in artifactory.log
      • Corresponded request.log output is:
        admin POST /api/distribute HTTP/1.1 400 105

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            guyco Guy Cohen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: