Skip to content

BP_DEPENDENCY_MIRROR not honored? #349

@krismarc

Description

@krismarc

Seems like BP_DEPENDENCY_MIRROR is not honored.

Expected Behavior

Get dependencies from the mirror.

Current Behavior

   Downloading https://services.gradle.org/distributions/gradle-8.9-bin.zip

   Exception in thread "main" java.io.IOException: Downloading from https://services.gradle.org/distributions/gradle-8.9-bin.zip failed: timeout (10000ms)
   at org.gradle.wrapper.Install.forceFetch(SourceFile:4)
   at org.gradle.wrapper.Install$1.call(SourceFile:8)
   at org.gradle.wrapper.GradleWrapperMain.main(SourceFile:67)
   Caused by: java.net.SocketTimeoutException: Connect timed out
   at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:551)
   at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:602)
   at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
   at java.base/java.net.Socket.connect(Socket.java:633)
   at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
   at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:178)
   at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:533)
   at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:638)
   at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:266)
   at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:380)
   at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
   at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1257)
   at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1143)
   at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
   at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1702)
   at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1626)
   at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
   at org.gradle.wrapper.Install.forceFetch(SourceFile:2)
   ... 2 more

Possible Solution

Not sure. Probably needs to be checked how it's implemented in other buildpacks.

Steps to Reproduce

Expose webserver with this dependency available and set BP_DEPENDENCY_MIRROR pointing there.

Motivations

We can't use internet based sources. For other buildpacks this simply works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions