OpenLiberty / openliberty.io

Open Liberty website
https://openliberty.io
Other
54 stars 40 forks source link

Travis builds are occasionally failing #1527

Closed steven1046 closed 3 years ago

steven1046 commented 4 years ago

Ever since added a Maven wrapper to specify the version of Maven, the Travis builds will fail sometimes but not always. We haven't had this error in the IBM Cloud, just in Travis. This occurs in both the draft build and the QA build but not every time. Kicking off another build usually works.

Error:


Running maven (mvn)...
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1913)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509)
    at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:245)
    at org.apache.maven.wrapper.DefaultDownloader.downloadInternal(DefaultDownloader.java:90)
    at org.apache.maven.wrapper.DefaultDownloader.download(DefaultDownloader.java:76)
    at org.apache.maven.wrapper.Installer.createDist(Installer.java:72)
    at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:121)
    at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:61)```
steven1046 commented 4 years ago

This could be related to https://github.com/travis-ci/travis-ci/issues/10053, where some Travis IP addresses may have been blocked by Maven.

steven1046 commented 4 years ago

We probably need to set a Maven repository username and password in the Maven wrapper properties: https://github.com/takari/maven-wrapper#using-basic-authentication-for-distribution-download

rfasouliotis commented 4 years ago

I have been seeing the same thing lately. Without doing too much digging, I suspect this started end of December (20th) when Travis added some new IPs. They probably need to be white listed by Maven / Sonatype.

k8vance88 commented 4 years ago

2 possible solutions: -Do not use the wrapper for the travis builds -Do not download the same binary for every build

Also, make sure for ibm cloud sites we also do not download the binary for every build.

steven1046 commented 3 years ago

Closing this until we start using Travis again.