Java.net.UnknownHostException in gradle even after setting the proxy setting in environment variables


(Shreyas D N) #1

Caused by: java.net.UnknownHostException: repo.edorasware.com

at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:242)

at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:130)

at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)

at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)

at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)

at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)

at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)

at org.gradle.api.internal.artifacts.repositories.transport.http.HttpResourceCollection.executeMethod(HttpResourceCollection.ja va:260)

at org.gradle.api.internal.artifacts.repositories.transport.http.HttpResourceCollection.processHttpRequest(HttpResourceCollecti on.java:136)

… 92 more


(Justin Ryan) #2

How did you setup your proxy settings? Did you follow http://gradle.org/docs/current/userguide/tutorial_this_and_that.html#sec:accessing_the_web_via_a_proxy


(Justin Ryan) #3

org.gradle.api.internal.artifacts.repositories.transport.http.HttpClientConfigurer.configureProxy is doing text book “proxy settings from JRE settings”. It’s most likely that gradle.properties is in the wrong place, or missing some values. Can you post the location and contents of gradle.properties? Have you tried settings them via the command line, like JAVA_OPTS="-Dhttp.proxyHost=www.somehost.org -Dhttp.proxyPort=8080"