Node.js NVM Installer fails when used behind a proxy
See original GitHub issueThe NVM Installer is not working when I’m using it behind a proxy. Like discussed in #61, even specifying the proxy properties it fails when tries to reach the GitHub URL.
I’ve tried to set teamcity.http.proxy.host.node and teamcity.http.proxy.port.node properties in <agent>/conf/buildAgent.properties file but no success.
As an alternative I’ve tried configure the JVM to use proxy, adding the JVM arguments as described on the documentation:
export JAVA_TEAMCITY_AGENT_OPTS="-Dproxyset=true
-Dhttp.proxyHost=proxy.domain.com
-Dhttp.proxyPort=8080
-Dhttp.nonProxyHosts=domain.com
-Dhttps.proxyHost=proxy.domain.com
-Dhttps.proxyPort=8080
-Dhttps.nonProxyHosts=domain.com"
Also I’ve tried to set it as an environment variable in the S.O, exporting the HTTP_PROXY and HTTPS_PROXY.
Both three alternatives didn’t work as expected. And got the same error and behavior in the agent when it tries to reach https://github.com:
jetbrains.buildServer.agent.impl.buildStages.RunnerStageExecutionException: Failed to start build runner 'jonnyzzz.nvm'
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:27)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
...
Caused by: org.apache.http.conn.HttpHostConnectException: Connection to https://github.com refused
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
...
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
As I could see, the properties teamcity.http.proxy.host.node just sets a proxy for HTTP protocol, but it is trying to reach an URL using HTTPS protocol. I can be wrong but shouldn’t be the case to use or specify a proxy handler to HTTPS protocol as well?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Related StackOverflow Question
is there a way to make it work with a proxy?
Please any suggestion to use Node.js NVM Installer behind a proxy?? I tried all suggestions proposed but unfortunatly not work. Please @jonnyzzz could you help us?