Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installer and Docker builds fail as they do not support proxy servers #103

Open
huornlmj opened this issue Aug 18, 2023 · 5 comments
Open

Comments

@huornlmj
Copy link

Installation fails with the following when the system is located behind a proxy.

Exception in thread "main" java.io.IOException: Downloading from https://services.gradle.org/distributions/gradle-6.5-bin.zip failed: timeout

Same happens in both installation modes (traditional and Docker build)

Please provide a way to install behind a proxy.

--SNIP--
Building all Google plugins ...

Building detectors/credentials/cve20177615 ...
Downloading https://services.gradle.org/distributions/gradle-6.5-bin.zip

Exception in thread "main" java.io.IOException: Downloading from https://services.gradle.org/distributions/gradle-6.5-bin.zip failed: timeout
        at org.gradle.wrapper.Download.downloadInternal(Download.java:106)
        at org.gradle.wrapper.Download.download(Download.java:66)
        at org.gradle.wrapper.Install$1.call(Install.java:68)
        at org.gradle.wrapper.Install$1.call(Install.java:48)
        at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
        at org.gradle.wrapper.Install.createDist(Install.java:48)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)
Caused by: java.net.SocketTimeoutException: Connect timed out
        at java.base/sun.nio.ch.NioSocketImpl.timedFinishConnect(NioSocketImpl.java:539)
        at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:585)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
        at java.base/java.net.Socket.connect(Socket.java:666)
        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:531)
        at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:636)
        at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
        at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:378)
        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:1241)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1127)
        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:1661)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1585)
        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:224)
        at org.gradle.wrapper.Download.downloadInternal(Download.java:83)
        ... 7 more

@RiRa12621
Copy link

But that seems to be an issue on your end, does a plain wget https://services.gradle.org/distributions/gradle-6.5-bin.zip work?

@huornlmj
Copy link
Author

Yes a wget works.

@tooryx
Copy link
Member

tooryx commented Jan 11, 2024

Hi @huornlmj,

Just to clarify, how is the proxy configured on your host? Is it a transparent proxy or is it declared via system-wide settings?
I have limited knowledge of gradle but I am pretty sure we could find a way to define the proxy.

~tooryx

@huornlmj
Copy link
Author

It's via environment variables (http_proxy and https_proxy).

@tooryx
Copy link
Member

tooryx commented Jan 11, 2024

Could you try setting the proxy configuration in gradle.properties as instructed in https://docs.gradle.org/current/userguide/networking.html? When I have a bit more time, I will setup a test environment to try to reproduce this and complete the documentation accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants