[ 
https://issues.apache.org/jira/browse/MNG-6785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16952728#comment-16952728
 ] 

Michael Osipov commented on MNG-6785:
-------------------------------------

There are several issues here and you also don't need to reveal all of your 
data, only at most I need to see if they are not confidential. Don't worry.

First and foremost, the expect continue is correctly implemented in HttpClient, 
but broken in the server side.

Look at this dump. The clients says {{Expect: 100-continue}} and the servers 
says {{HTTP/1.1 100 Continue}}, the payload 
{{39aa049118761a5e1d1a3788ea994201}} is trasmitted, but then {{HTTP/1.1 301 
Moved Permanently}} is issued which requires another request. Unfortnately, as 
layed out previously the checkput input stream has already been consumed. It 
cannot be replayed. The server should have returned {{HTTP/1.1 301 Moved 
Permanently}} immediately and not after the {{HTTP/1.1 301 Moved Permanently}}. 
The reason for this is that 
{{HTTP/1.1 100 Continue}} comes from Jetty, but {{HTTP/1.1 301 Moved 
Permanently}} from application code. Jetty does not know that upfront. It is 
deemed to fail.

{noformat}
 [DEBUG] http-outgoing-2 >> "PUT 
/service/local/staging/deploy/maven2/org/asynchttpclient/async-http-client-project/2.0.41/async-http-client-project-2.0.41.pom.md5
 HTTP/1.1[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Cache-control: no-cache[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Cache-store: no-store[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Pragma: no-cache[\r][\n]"
 [DEBUG] http-outgoing-2 >> "User-Agent: Apache-Maven/3.6.3-SNAPSHOT (Java 
1.8.0_202; Mac OS X 10.13.6)[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Content-Length: 32[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Host: oss.sonatype.org[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Connection: Keep-Alive[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Expect: 100-continue[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Accept-Encoding: gzip,deflate[\r][\n]"
 [DEBUG] http-outgoing-2 >> "Authorization: Basic REDACTED[\r][\n]"
 [DEBUG] http-outgoing-2 >> "[\r][\n]"
 [DEBUG] http-outgoing-2 << "HTTP/1.1 100 Continue[\r][\n]"
 [DEBUG] http-outgoing-2 << "[\r][\n]"
 [DEBUG] http-outgoing-2 << HTTP/1.1 100 Continue
 [DEBUG] http-outgoing-2 >> "39aa049118761a5e1d1a3788ea994201"
 [DEBUG] http-outgoing-2 << "HTTP/1.1 301 Moved Permanently[\r][\n]"
 [DEBUG] http-outgoing-2 << "Server: awselb/2.0[\r][\n]"
 [DEBUG] http-outgoing-2 << "Date: Wed, 16 Oct 2019 08:11:28 GMT[\r][\n]"
 [DEBUG] http-outgoing-2 << "Content-Type: text/html[\r][\n]"
 [DEBUG] http-outgoing-2 << "Content-Length: 150[\r][\n]"
 [DEBUG] http-outgoing-2 << "Connection: keep-alive[\r][\n]"
 [DEBUG] http-outgoing-2 << "Location: 
https://oss.sonatype.org:443/service/local/staging/deploy/maven2/org/asynchttpclient/async-http-client-project/2.0.41/async-http-client-project-2.0.41.pom.md5[\r][\n]";
 [DEBUG] http-outgoing-2 << "[\r][\n]"
 [DEBUG] http-outgoing-2 << "<html>[\r][\n]"
 [DEBUG] http-outgoing-2 << "<head><title>301 Moved 
Permanently</title></head>[\r][\n]"
 [DEBUG] http-outgoing-2 << "<body bgcolor="white">[\r][\n]"
 [DEBUG] http-outgoing-2 << "<center><h1>301 Moved 
Permanently</h1></center>[\r][\n]"
 [DEBUG] http-outgoing-2 << "</body>[\r][\n]"
 [DEBUG] http-outgoing-2 << "</html>[\r][\n]"
{noformat}

Let's look at the next issue, previously our buffering was dumb. Me moved to 
buffering with channels. The channel tried to read from a stream which has been 
consumed and closed already, and therefore locks up. The issue did not pop up 
because the buggy code has never been triggered.

We blindly replay the request w/o even knowning is our {{HttpEntity}} 
replayable. Let me try something and we'll see.

> Fail to deploy on Sonatype OSS since maven 3.5.4
> ------------------------------------------------
>
>                 Key: MNG-6785
>                 URL: https://issues.apache.org/jira/browse/MNG-6785
>             Project: Maven
>          Issue Type: Bug
>          Components: Deployment
>    Affects Versions: 3.5.4, 3.6.2
>         Environment: 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 
> PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
> openjdk version "1.8.0_202"
> OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_202-b08)
> OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.202-b08, mixed mode)
>            Reporter: Stephane Landelle
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>
> I've been trying to release AsyncHttpClient for days and deployment was 
> always super slow until it ultimately failed or completely stalled.
> The issue seems to be that maven-deploy-plugin wants to upload checksum 
> files. I have no idea where those would come from, as far as I know, those 
> are generated by the maven repository.
>  
> {code:java}
> [INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ 
> async-http-client-project ---
> Uploading to sonatype-nexus-staging: 
> http://oss.sonatype.org/service/local/staging/deploy/maven2/org/asynchttpclient/async-http-client-project/2.0.40/async-http-client-project-2.0.40.pom
> [WARNING] Failed to upload checksum 
> org/asynchttpclient/async-http-client-project/2.0.40/async-http-client-project-2.0.40.pom.sha1:
>  null{code}
>  
>  
> For each actual file, maven-deploy-plugin tries to upload a sha1 and a md5 
> files and this takes forever to ultimately fail.
> I tried upgrading plugins but nothing worked.
> I finally found [this 
> ticket|[https://issues.sonatype.org/browse/OSSRH-43371?focusedCommentId=610865&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-610865]]
>  against Sonatype OSS describing the exact same behavior and stating 
> downgrading to maven 3.5.3 fixed the issue.
> Indeed, downgrading did the trick!
> I'm opening an issue here and not against OSS Sonatype as it looks like a 
> maven regression to me.
>  * maven 3.6.2: fails
>  * maven 3.5.4: fails
>  * maven 3.5.3: works like a charm



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to