Picture of Greg Sweet
adapt create fails: connect ECONNREFUSED
by Greg Sweet - Friday, 10 July 2015, 4:12 PM
 

Any advice where to set proxy credentials so that the adapt-cli create command will actually work?

 

Thanks,

Greg

 

Picture of Matt Leathes
Re: adapt create fails: connect ECONNREFUSED
by Matt Leathes - Tuesday, 14 July 2015, 9:40 AM
 

Hi Greg

There's no requirement to use a proxy imposed by Adapt

Are you still getting the problem? If so, please could you post more information about the error you're getting so that we can take a look?

I usually find that if the 'create' command fails then just deleting whatever it (partially) creates and running the command again works fine. Or, if it just fails to install one or more of the extensions/components, you can just run $ adapt install to get it to retry downloading them

Picture of Greg Sweet
Re: adapt create fails: connect ECONNREFUSED
by Greg Sweet - Tuesday, 14 July 2015, 2:31 PM
 

Hi Matt,

Thanks for the reply. The proxy requirement is imposed by my organization. I work in a highly-secured government agency where all access to the Internet is tightly controlled.

The error message is in the title of the thread. The issue is that for some reason the create command is not picking up my credentials from the global .gitconfig file and therefore is not permitted through the proxy to github.

In digging through the code over the last day, it looks like I can update the source target vars in the constants.js file to add my credentials to the source urls the create command is using. it is on my agenda to try out today or tomorrow.

Thanks,

Picture of Matt Leathes
Re: adapt create fails: connect ECONNREFUSED
by Matt Leathes - Tuesday, 14 July 2015, 3:42 PM
 

Oh I see...

Strange, github credentials shouldn't be required just to read data from github. Maybe that's something github is imposing because you are going through a proxy?

If it helps, you can also install everything manually.

Picture of Greg Sweet
Re: adapt create fails: connect ECONNREFUSED
by Greg Sweet - Wednesday, 15 July 2015, 6:18 PM
 

No it's not github's credentials that are failing or required, it's my missing proxy UID and PWD.

When adapt-cli's create command attempts to connect to github it doesn't have my proxy credentials, therefor the proxy refuses the connection and does not provide access to the Internet so the operation fails.

I need to figure out how to give adapt-cli my proxy credentials so it can access the Internet and download content from github.

For example when I use Ruby I use the proxy flag (-p) and provide my proxy credentials in the command:

$ gem outdated -p https://uid:pwd@proxy:port

Similarly, npm, bower, and git use config files to store proxy info.

What would probably help is a pointer to a document that describes exactly what the create command is doing and the order it is attempting to do it in, if such an animal exists.

Thanks,

Greg

Picture of Chuck Lorenz
Re: adapt create fails: connect ECONNREFUSED
by Chuck Lorenz - Wednesday, 15 July 2015, 6:57 PM
Picture of Chris Jones
Re: adapt create fails: connect ECONNREFUSED
by Chris Jones - Thursday, 16 July 2015, 11:43 AM
 

I'll add to what Matt said by saying that you can set a proxy URL for the download by setting either HTTPS_PROXY or HTTP_PROXY in your environment variables, but we do not currently have support for proxy authentication using a username and password.

To clarify the process in addition to Chuck's comment:-

1) https://github.com/adaptlearning/adapt_framework/archive/master.zip is downloaded and unzipped, this is where your connection will be failing.

2) npm install is run in the extracted directory.

3) adapt install is run in the extracted directory.

This mirrors the manual process as described on the wiki.

 

Picture of Greg Sweet
Re: adapt create fails: connect ECONNREFUSED
by Greg Sweet - Thursday, 16 July 2015, 4:22 PM
 

So that end runs the need to even run adapt create, but now I am hung up on the adapt install command failing with the calls to http://adapt-bower-repository.herokuapp.com/...

I can access http://adapt-bower-repository.herokuapp.com/ via Chrome, but am consistently getting "failed: getadrinfo ENOTFOUD http" mostly on /packages/adapt-contrib-vanilla

I've added my proxy credentials to the .bowerrc file (without them it gives a connection refused error).

Picture of Jayanthi Ramasubramanian
Re: adapt create fails: connect ECONNREFUSED
by Jayanthi Ramasubramanian - Tuesday, 27 October 2015, 1:08 PM
 

Hi Greg

I run into the same issue as yours .While running the adapt install command it failed  http://adapt-bower-repository.herokuapp.com/packages/  and the same url am able to access in chrome. Am behind my organization proxy. Where u able to resolve the issue and proceed further ? How do we specify the proxy url and port to be used by the adapt command. My .gitconfig has the proxy set already.

Picture of Greg Sweet
Re: adapt create fails: connect ECONNREFUSED
by Greg Sweet - Tuesday, 27 October 2015, 3:28 PM
 

Hi Jay,

Unfortunately, no I was never able to get this working from behind the proxy. I've given up for the time being but am keeping an eye on things for changes. The problem seems to be the layering of technologies. Bower works, git works, and npm works,  but bower cannot make git calls. 

Picture of Jayanthi Ramasubramanian
Re: adapt create fails: connect ECONNREFUSED
by Jayanthi Ramasubramanian - Wednesday, 28 October 2015, 11:38 AM
 

Hi Greg,

I was able to succefully run the adapt install command after i mentioned

export http_proxy='http://proxyServer:port'
export https_proxy='http://proxyServer:port'

 in the Git-bash before executing the command.