Why does gradlew setupDevWorkspace, gradlew eclipse, and gradlew --debug create a java.net.connectexception?


(wagner.steve) #1

I tried searching for this problem but only found solutions for people behind a proxy, I am not.

Below is the error I get. I am not behide a proxy, My internet is working, I searched all day for this and found no answers. Please help.

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

Exception in thread “main” java.lang.RuntimeException: java.net.ConnectException: Connection timed out: connect

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78)

at org.gradle.wrapper.Install.createDist(Install.java:44)

at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)

at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:55) Caused by: java.net.ConnectException: Connection timed out: connect

at java.net.DualStackPlainSocketImpl.connect0(Native Method)

at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)

at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:579)

at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)

at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160)

at sun.net.NetworkClient.doConnect(NetworkClient.java:180)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)

at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)

at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:275)

at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)

at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)

at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)

at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)

at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)

at org.gradle.wrapper.Download.downloadInternal(Download.java:56)

at org.gradle.wrapper.Download.download(Download.java:42)

at org.gradle.wrapper.Install$1.call(Install.java:57)

at org.gradle.wrapper.Install$1.call(Install.java:44)

at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)

… 3 more


(Peter Niederwieser) #2

Can you please fix the formatting of the stack trace?


(wagner.steve) #3

https://gist.github.com/anonymous/5fdc31d52888cd63937f Does the same thing but the raw button shows the way i entered it and shows in command window.


(Peter Niederwieser) #4

It’s downloading because the Gradle version required by the build isn’t available locally. From the error output, it’s impossible to tell why the connection timed out. I recommend to try with a different computer on the same network, same computer on a different network, and/or to reinstall Java. You can also test whether downloading a distribution from https://services.gradle.org/distributions in your browser works.


(wagner.steve) #5

Well I saved it locally, changed the wrapper path so it new to look locally and it unpacked. But the build failed because it had to get other dependencies from other websites.

Well since its not working and I have nothing else to do I try everything else you suggest. Dont have another computer or another network so only thing I can try is reinstalling java. Even though I did it 4 times before I try again and what do you know it works now.

Thank you.