Node.js NVM Installer fails when used behind a proxy

See original GitHub issue

The 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:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
webratzcommented, Jan 11, 2019

is there a way to make it work with a proxy?

0reactions
gicazcommented, Mar 7, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use nvm behind the corporate firewall - node.js - Stack Overflow
Solution for Windows: Make sure you run the nvm proxy command in Windows PowerShell/Command Prompt as Administrator (right click Windows ...
Read more >
How to fix the nvm command not found Error - Reactgo
In this tutorial, we will learn how to solve the nvm command not found error. When you install an nvm (node version manager)...
Read more >
Corepack | Node.js v19.3.0 Documentation
Corepack is an experimental tool to help with managing versions of your package managers. It exposes binary proxies for each supported package manager...
Read more >
How to install NPM behind authentication proxy on Windows?
Heads up, if your password contains "@" npm won't parse your proxy setting correctly. A potential workaround is to put a bogus username:password...
Read more >
Set up your SharePoint Framework development environment
Install Node.js · Windows users can use the *.msi installers for x86 or x64 depending on your Windows installation. There are usually only...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found