how to install java/ant/maven automatically behind the proxy

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to install java/ant/maven automatically behind the proxy

Vitaliy Semochkin
Hi,
when I select to install java, ant or maven automatically I receive following exceptions during build:
java.net.ConnectException: Connection timed out
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

	at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1360)

	at java.security.AccessController.doPrivileged(Native Method)

	at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1354)

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

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

	at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:241)

	at hudson.tools.JDKInstaller.locate(JDKInstaller.java:227)

	at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:114)

	at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)

	at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)

	at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)

	at hudson.model.JDK.forNode(JDK.java:118)

	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:451)

	at hudson.tasks.Ant.perform(Ant.java:134)

	at hudson.model.Build$RunnerImpl.build(Build.java:195)

	at hudson.model.Build$RunnerImpl.doRun(Build.java:151)

	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:272)

	at hudson.model.Run.run(Run.java:928)

	at hudson.model.Build.run(Build.java:112)

	at hudson.model.ResourceController.execute(ResourceController.java:93)

	at hudson.model.Executor.run(Executor.java:118)

Caused by: java.net.ConnectException: Connection timed out

	at java.net.PlainSocketImpl.socketConnect(Native Method)

	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)

	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)

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

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

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

	at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)

	at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)

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

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

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

	at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)

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

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

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

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

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

	at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2165)

	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:271)

	at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:235)

	... 15 more

Reply | Threaded
Open this post in threaded view
|

Re: how to install java/ant/maven automatically behind the proxy

Kohsuke Kawaguchi
Administrator

Configure the proxy correctly on Hudson's master JVM. You can do this in
many ways, but one way to do that is to go to the plugin manager's
"advanced" tab and set the proxy.

Vitaliy Semochkin wrote:

> Hi,
>
> when I select to install java, ant or maven automatically I receive
> following exceptions during build:
>
> java.net.ConnectException: Connection timed out
>
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>
> at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1360)
>
> at java.security.AccessController.doPrivileged(Native Method)
>
> at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1354)
>
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1008)
>
> at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
>
> at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:241)
>
> at hudson.tools.JDKInstaller.locate(JDKInstaller.java:227)
>
> at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:114)
>
> at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
>
> at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
>
> at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
>
> at hudson.model.JDK.forNode(JDK.java:118)
>
> at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:451)
>
> at hudson.tasks.Ant.perform(Ant.java:134)
>
> at hudson.model.Build$RunnerImpl.build(Build.java:195)
>
> at hudson.model.Build$RunnerImpl.doRun(Build.java:151)
>
> at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:272)
>
> at hudson.model.Run.run(Run.java:928)
>
> at hudson.model.Build.run(Build.java:112)
>
> at hudson.model.ResourceController.execute(ResourceController.java:93)
>
> at hudson.model.Executor.run(Executor.java:118)
>
> Caused by: java.net.ConnectException: Connection timed out
>
> at java.net.PlainSocketImpl.socketConnect(Native Method)
>
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>
> at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>
> at java.net.Socket.connect(Socket.java:519)
>
> at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)
>
> at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
>
> at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
>
> at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
>
> at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
>
> at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
>
> at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
>
> at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
>
> at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793)
>
> at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
>
> at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1041)
>
> at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2165)
>
> at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:271)
>
> at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:235)
>
> ... 15 more
>

--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/

smime.p7s (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: how to install java/ant/maven automatically behind the proxy

Vitaliy Semochkin
This is the way I configured proxy and I can install plugins that way
but auto install of jvm, ant and I suppose maven(I didn't tested it with maven yet) do not work with this configuration.
Probably this is a bug. Meanwhile where can I find out about other ways of proxy configuration if i run application in tomcat6.

PS Thank you for fast response and for great project you do!

On Tue, Jun 30, 2009 at 10:55 PM, Kohsuke Kawaguchi <[hidden email]> wrote:

Configure the proxy correctly on Hudson's master JVM. You can do this in
many ways, but one way to do that is to go to the plugin manager's
"advanced" tab and set the proxy.

Vitaliy Semochkin wrote:
> Hi,
>
> when I select to install java, ant or maven automatically I receive
> following exceptions during build:
>
> java.net.ConnectException: Connection timed out
>
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>
>       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>
>       at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1360)
>
>       at java.security.AccessController.doPrivileged(Native Method)
>
>       at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1354)
>
>       at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1008)
>
>       at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234)
>
>       at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:241)
>
>       at hudson.tools.JDKInstaller.locate(JDKInstaller.java:227)
>
>       at hudson.tools.JDKInstaller.performInstallation(JDKInstaller.java:114)
>
>       at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:61)
>
>       at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:99)
>
>       at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:155)
>
>       at hudson.model.JDK.forNode(JDK.java:118)
>
>       at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:451)
>
>       at hudson.tasks.Ant.perform(Ant.java:134)
>
>       at hudson.model.Build$RunnerImpl.build(Build.java:195)
>
>       at hudson.model.Build$RunnerImpl.doRun(Build.java:151)
>
>       at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:272)
>
>       at hudson.model.Run.run(Run.java:928)
>
>       at hudson.model.Build.run(Build.java:112)
>
>       at hudson.model.ResourceController.execute(ResourceController.java:93)
>
>       at hudson.model.Executor.run(Executor.java:118)
>
> Caused by: java.net.ConnectException: Connection timed out
>
>       at java.net.PlainSocketImpl.socketConnect(Native Method)
>
>       at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>
>       at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>
>       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>
>       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>
>       at java.net.Socket.connect(Socket.java:519)
>
>       at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)
>
>       at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
>
>       at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
>
>       at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
>
>       at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
>
>       at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
>
>       at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
>
>       at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
>
>       at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:793)
>
>       at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
>
>       at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1041)
>
>       at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2165)
>
>       at sun.net.www.protocol.https.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:271)
>
>       at hudson.tools.JDKInstaller.locateStage1(JDKInstaller.java:235)
>
>       ... 15 more
>


--
Kohsuke Kawaguchi
Sun Microsystems                   http://weblogs.java.net/blog/kohsuke/