Fork me on GitHub
#clojars
<
2020-02-21
>
tcrawley01:02:29

I've identified a couple of possible issues, and have made attempts to address both. I don't think they are related, other than being related to the recent move of the repo from Rackspace Cloudfiles to S3: • maven-metadata.xml checksums being incorrect - this is the issue that @wilkerlucio was seeing. I think there was a failure to upload the sum files from the server -> s3, but I wasn't checking the results of the call, so the code would have considered it always successful. I've modified the s3 client to throw on error so we can see if that happens again • 400 Bad Request responses when trying to deploy - I was able to find 400 responses in Fastly logs, and they were all for maven-metadata.xml files. I suspect this might be related to some custom Fastly configuration we had to set short cache TTLs for the metadata files (and sums). I've removed that configuration and now instead make purge requests against Fastly's API for maven-metadata.xml files (and their checksum files) when a deploy occurs. This is a better approach anyway, since it would make the new metadata files available pretty much immediately instead of having to wait for the 60 second TTL to expire and allows us to cache metadata files that don't change for much longer, which is a cost savings. @bjagg @ambrosebs @atdixon - would y'all mind trying to deploy again at your leisure and see if you see the 400 Bad Request (or any other) error?

ambrosebs01:02:50

@tcrawley just tried again:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project annotator.jvm: Failed to retrieve remote metadata typed:analyzer.jvm/maven-metadata.xml: Could not transfer metadata typed:analyzer.jvm/maven-metadata.xml from/to clojars (): Failed to transfer file  with status code 400

tcrawley01:02:23

:( Thanks for checking. Can you try this for me and paste back the result? curl -vv That gives me a 404 (as it should) instead of a 400.

tcrawley02:02:08

And also curl -vv ?

ambrosebs02:02:01

Ambroses-MBP master$ curl -vv 
*   Trying 151.101.193.128...
* TCP_NODELAY set
* Connected to  (151.101.193.128) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Fastly, Inc.; CN=
*  start date: Jul 23 22:51:23 2019 GMT
*  expire date: Jul 23 22:51:23 2020 GMT
*  subjectAltName: host "" matched cert's ""
*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign CloudSSL CA - SHA256 - G3
*  SSL certificate verify ok.
> GET /typed/analyzer.jvm/maven-metadata.xml HTTP/1.1
> Host: 
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Connection: keep-alive
< Content-Length: 308
< x-amz-request-id: 7FE1123EC79931C8
< x-amz-id-2: rykg/sVKgBment72QhVJ1x5mRA0Z24vAghUm6x8E64EC8ahNYC8TPZrLH51fLC/qJQOJhMEqmJo=
< Content-Type: application/xml
< Server: AmazonS3
< Accept-Ranges: bytes
< Date: Fri, 21 Feb 2020 02:03:51 GMT
< Via: 1.1 varnish
< Age: 37
< X-Served-By: cache-chi21180-CHI
< X-Cache: HIT
< X-Cache-Hits: 1
< X-Timer: S1582250631.274112,VS0,VE0
<
<?xml version="1.0" encoding="UTF-8"?>
* Connection #0 to host  left intact
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>typed/analyzer.jvm/maven-metadata.xml</Key><RequestId>7FE1123EC79931C8</RequestId><HostId>rykg/sVKgBment72QhVJ1x5mRA0Z24vAghUm6x8E64EC8ahNYC8TPZrLH51fLC/qJQOJhMEqmJo=</HostId></Error>%            Ambroses-MBP master$
Ambroses-MBP master$
Ambroses-MBP master$ curl -vv 
*   Trying 52.219.96.176...
* TCP_NODELAY set
* Connected to  (52.219.96.176) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=US; ST=Washington; L=Seattle; O=, Inc.; CN=*.
*  start date: Jan 31 00:00:00 2020 GMT
*  expire date: May 27 12:00:00 2021 GMT
*  subjectAltName: host "" matched cert's "*."
*  issuer: C=US; O=DigiCert Inc; OU=; CN=DigiCert Baltimore CA-2 G2
*  SSL certificate verify ok.
> GET /typed/analyzer.jvm/maven-metadata.xml HTTP/1.1
> Host: 
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 404 Not Found
< x-amz-request-id: 3F8CC8D98C4F601A
< x-amz-id-2: DvFTh3ZIUVzH2DcmHKGHkmFMdKObCLRIRNutiKhvN3ozbY0cJSOgnhTdc2XUKcvBXxN55yO/53I=
< Content-Type: application/xml
< Transfer-Encoding: chunked
< Date: Fri, 21 Feb 2020 02:04:13 GMT
< Server: AmazonS3
<
<?xml version="1.0" encoding="UTF-8"?>
* Connection #0 to host  left intact
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>typed/analyzer.jvm/maven-metadata.xml</Key><RequestId>3F8CC8D98C4F601A</RequestId><HostId>DvFTh3ZIUVzH2DcmHKGHkmFMdKObCLRIRNutiKhvN3ozbY0cJSOgnhTdc2XUKcvBXxN55yO/53I=</HostId></Error>%            Ambroses-MBP master$

tcrawley02:02:26

Hmm, that's all correct. Can you try deploying with maven again now? Fastly should have that 404 cached.

ambrosebs02:02:02

oh! some of my submodules seem to deploy.

ambrosebs02:02:02

[INFO] --- nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) @ annotator.jvm ---
[INFO] Performing deferred deploys (gathering into "/Users/ambrose/Projects/core.typed-frenchy64/master/target/nexus-staging/deferred")...
[INFO] Installing /Users/ambrose/Projects/core.typed-frenchy64/master/typed/annotator.jvm/target/annotator.jvm-1.0.1-SNAPSHOT.jar to /Users/ambrose/Projects/core.typed-frenchy64/master/target/nexus-staging/deferred/typed/annotator.jvm/1.0.1-SNAPSHOT/annotator.jvm-1.0.1-SNAPSHOT.jar
[INFO] Installing /Users/ambrose/Projects/core.typed-frenchy64/master/typed/annotator.jvm/pom.xml to /Users/ambrose/Projects/core.typed-frenchy64/master/target/nexus-staging/deferred/typed/annotator.jvm/1.0.1-SNAPSHOT/annotator.jvm-1.0.1-SNAPSHOT.pom
[INFO] Deploying remotely...
[INFO] Bulk deploying locally gathered artifacts from directory:
[INFO]  * Bulk deploying locally gathered snapshot artifacts
Downloading from clojars: 
Uploading to clojars: 
Uploaded to clojars:  (34 kB at 11 kB/s)
Uploading to clojars: 
Uploaded to clojars:  (1.2 kB at 392 B/s)
Downloading from clojars: 
Uploading to clojars: 
Uploaded to clojars:  (767 B at 339 B/s)
Uploading to clojars: 
Uploaded to clojars:  (277 B at 93 B/s)
Downloading from clojars: 
Uploading to clojars: 
Uploaded to clojars:  (6.5 kB at 2.7 kB/s)
Uploading to clojars: 
Uploaded to clojars:  (1.0 kB at 427 B/s)
Downloading from clojars: 
[WARNING] Could not transfer metadata typed:lib.clojure/maven-metadata.xml from/to clojars (): Failed to transfer file  with status code 400
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for pom 1.0.1-SNAPSHOT:
[INFO]
[INFO] pom ................................................ SUCCESS [  0.539 s]
[INFO] typed.analyzer.common .............................. SUCCESS [  0.973 s]
[INFO] typed.analyzer.js .................................. SUCCESS [  0.235 s]
[INFO] typed.analyzer.jvm ................................. SUCCESS [  0.127 s]
[INFO] typed.runtime.jvm .................................. SUCCESS [  0.129 s]
[INFO] typed.lib.clojure .................................. SUCCESS [  0.121 s]
[INFO] typed.lang.jvm ..................................... SUCCESS [  0.131 s]
[INFO] typed.checker.jvm .................................. SUCCESS [  0.342 s]
[INFO] typed.checker.js ................................... SUCCESS [  0.167 s]
[INFO] typed.lib.core.async ............................... SUCCESS [  0.185 s]
[INFO] typed.annotator.jvm ................................ FAILURE [ 17.950 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  23.323 s
[INFO] Finished at: 2020-02-20T21:26:11-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project annotator.jvm: Failed to retrieve remote metadata typed:lib.clojure/maven-metadata.xml: Could not transfer metadata typed:lib.clojure/maven-metadata.xml from/to clojars (): Failed to transfer file  with status code 400 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] 
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :annotator.jvm

ambrosebs02:02:27

don't see any others

tcrawley03:02:07

That's curious. Can you try one more time? If I curl https://repo.clojars.org/typed/lib.clojure/maven-metadata.xml, I get a 404, along with headers saying fastly now has it cached.

ambrosebs03:02:47

now analyzer.jvm fails again

ambrosebs03:02:52

[INFO] --- nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) @ annotator.jvm ---
[INFO] Performing deferred deploys (gathering into "/Users/ambrose/Projects/core.typed-frenchy64/master/target/nexus-staging/deferred")...
[INFO] Installing /Users/ambrose/Projects/core.typed-frenchy64/master/typed/annotator.jvm/target/annotator.jvm-1.0.1-SNAPSHOT.jar to /Users/ambrose/Projects/core.typed-frenchy64/master/target/nexus-staging/deferred/typed/annotator.jvm/1.0.1-SNAPSHOT/annotator.jvm-1.0.1-SNAPSHOT.jar
[INFO] Installing /Users/ambrose/Projects/core.typed-frenchy64/master/typed/annotator.jvm/pom.xml to /Users/ambrose/Projects/core.typed-frenchy64/master/target/nexus-staging/deferred/typed/annotator.jvm/1.0.1-SNAPSHOT/annotator.jvm-1.0.1-SNAPSHOT.pom
[INFO] Deploying remotely...
[INFO] Bulk deploying locally gathered artifacts from directory:
[INFO]  * Bulk deploying locally gathered snapshot artifacts
Downloading from clojars: 
Downloaded from clojars:  (767 B at 743 B/s)
Uploading to clojars: 
Uploaded to clojars:  (34 kB at 13 kB/s)
Uploading to clojars: 
Uploaded to clojars:  (1.2 kB at 490 B/s)
Downloading from clojars: 
[WARNING] Could not transfer metadata typed:analyzer.jvm/maven-metadata.xml from/to clojars (): Failed to transfer file  with status code 400
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for pom 1.0.1-SNAPSHOT:
[INFO]
[INFO] pom ................................................ SUCCESS [  0.600 s]
[INFO] typed.analyzer.common .............................. SUCCESS [  1.290 s]
[INFO] typed.analyzer.js .................................. SUCCESS [  0.286 s]
[INFO] typed.analyzer.jvm ................................. SUCCESS [  0.179 s]
[INFO] typed.runtime.jvm .................................. SUCCESS [  0.174 s]
[INFO] typed.lib.clojure .................................. SUCCESS [  0.135 s]
[INFO] typed.lang.jvm ..................................... SUCCESS [  0.138 s]
[INFO] typed.checker.jvm .................................. SUCCESS [  0.444 s]
[INFO] typed.checker.js ................................... SUCCESS [  0.188 s]
[INFO] typed.lib.core.async ............................... SUCCESS [  0.259 s]
[INFO] typed.annotator.jvm ................................ FAILURE [  6.995 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.233 s
[INFO] Finished at: 2020-02-20T22:30:16-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8:deploy (injected-nexus-deploy) on project annotator.jvm: Failed to retrieve remote metadata typed:analyzer.jvm/maven-metadata.xml: Could not transfer metadata typed:analyzer.jvm/maven-metadata.xml from/to clojars (): Failed to transfer file  with status code 400 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] 
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :annotator.jvm

ambrosebs01:02:24

btw I've never tried to deploy with this setup before, first time trying maven + clojars

Bjagg02:02:50

I tried again. It failed when trying to fetch the metadata file again.

tcrawley02:02:23

@bjagg in your case, is this a metadata file that should already exist, or one for a new artifact?

Bjagg02:02:10

It exists on the server (I reverted the URL back to http://repo.clojars.org)

tcrawley02:02:40

What do you get if you try to curl -vv ?

Bjagg02:02:57

Here’s the output for http://repo.clojars.org

Bjagg02:02:47

$ curl -vv 
*   Trying 151.101.41.128...
* TCP_NODELAY set
* Connected to  (151.101.41.128) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Fastly, Inc.; CN=
*  start date: Jul 23 22:51:23 2019 GMT
*  expire date: Jul 23 22:51:23 2020 GMT
*  subjectAltName: host "" matched cert's ""
*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign CloudSSL CA - SHA256 - G3
*  SSL certificate verify ok.
> GET /com/jaggedcode/eve-api-client/maven-metadata.xml HTTP/1.1
> Host: 
> User-Agent: curl/7.64.1
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< x-amz-request-id: 424004C4EE6BBC37
< x-amz-id-2: hE9jdl6Nul6BTQboEsWcQle9W3TYIYN29oVBZ0X38kA1yT1kOPeqIOTE1vgzFhZXqDplscl6gfs=
< Content-Type: application/xml
< Server: AmazonS3
< Content-Length: 319
< Accept-Ranges: bytes
< Date: Fri, 21 Feb 2020 02:30:25 GMT
< Via: 1.1 varnish
< Age: 30048
< Connection: keep-alive
< X-Served-By: cache-sjc10027-SJC
< X-Cache: HIT
< X-Cache-Hits: 1
< X-Timer: S1582252225.172289,VS0,VE0
< 
<?xml version="1.0" encoding="UTF-8"?>
* Connection #0 to host  left intact
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>com/jaggedcode/eve-api-client/maven-metadata.xml</Key><RequestId>424004C4EE6BBC37</RequestId><HostId>hE9jdl6Nul6BTQboEsWcQle9W3TYIYN29oVBZ0X38kA1yT1kOPeqIOTE1vgzFhZXqDplscl6gfs=</HostId></Error>* Closing connection 0

tcrawley03:02:47

Interesting. I get a 200 back:

curl -v 
*   Trying 199.232.33.128...
* TCP_NODELAY set
* Connected to  (199.232.33.128) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=Fastly, Inc.; CN=
*  start date: Jul 23 22:51:23 2019 GMT
*  expire date: Jul 23 22:51:23 2020 GMT
*  subjectAltName: host "" matched cert's ""
*  issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign CloudSSL CA - SHA256 - G3
*  SSL certificate verify ok.
> GET /com/jaggedcode/eve-api-client/maven-metadata.xml HTTP/1.1
> Host: 
> User-Agent: curl/7.58.0
> Accept: */*
> 
< HTTP/1.1 200 OK
< x-amz-id-2: 6z3nH49znnd5Ny7/QE1jC0kmdTboNVvLt/V6rXy4i1LRXChJ/JBG6X2jtQR4HSLW5/M2nZe0RDA=
< x-amz-request-id: C9CCD8AE87F1A8EF
< Last-Modified: Thu, 20 Feb 2020 18:09:39 GMT
< ETag: "93ac1c35f5687a36976222b272a50e4b"
< Content-Type: application/xml
< Server: AmazonS3
< Content-Length: 308
< Accept-Ranges: bytes
< Date: Fri, 21 Feb 2020 03:16:13 GMT
< Via: 1.1 varnish
< Age: 89
< Connection: keep-alive
< X-Served-By: cache-fty21335-FTY
< X-Cache: HIT
< X-Cache-Hits: 1
< X-Timer: S1582254973.185725,VS0,VE0
< 
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>com.jaggedcode</groupId>
  <artifactId>eve-api-client</artifactId>
  <versioning>
    <release>1.3.8</release>
    <versions>
      <version>1.3.8</version>
    </versions>
    <lastUpdated>20200220180937</lastUpdated>
  </versioning>
</metadata>
* Connection #0 to host  left intact

Bjagg04:02:06

IPs are different