Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use tasks apart from AWSCLI behind a proxy #119

Open
battyejp opened this issue Oct 31, 2018 · 4 comments
Open

Unable to use tasks apart from AWSCLI behind a proxy #119

battyejp opened this issue Oct 31, 2018 · 4 comments

Comments

@battyejp
Copy link

Getting connectivity issues when the all tasks (apart from CLI) are connecting to AWS behind a proxy.

See error for Create/Update Stack: Pipeline
2018-10-31T12:03:07.1190509Z Stack creation request failed with error: 'connect ETIMEDOUT 54.239.39.185:443' { Error: connect ETIMEDOUT 54.239.39.185:443
2018-10-31T12:03:07.1190509Z at Object.exports._errnoException (util.js:1018:11)
2018-10-31T12:03:07.1190509Z at exports._exceptionWithHostPort (util.js:1041:20)
2018-10-31T12:03:07.1190509Z at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
2018-10-31T12:03:07.1190509Z message: 'connect ETIMEDOUT 54.239.39.185:443',
2018-10-31T12:03:07.1190509Z code: 'NetworkingError',
2018-10-31T12:03:07.1190509Z errno: 'ETIMEDOUT',
2018-10-31T12:03:07.1190509Z syscall: 'connect',
2018-10-31T12:03:07.1190509Z address: '54.239.39.185',
2018-10-31T12:03:07.1190509Z port: 443,
2018-10-31T12:03:07.1190509Z region: 'eu-west-1',
2018-10-31T12:03:07.1190509Z hostname: 'cloudformation.eu-west-1.amazonaws.com',
2018-10-31T12:03:07.1190509Z retryable: true,
2018-10-31T12:03:07.1190509Z time: 2018-10-31T12:03:07.073Z }

The AWS Cli task works fine and looking at the code I'm guessing it is due to this line of code:

await this.taskParameters.configureHttpProxyFromAgentProxyConfiguration('AWSCLI');

at https://github.com/aws/aws-vsts-tools/blob/develop/Tasks/AWSCLI/helpers/AWSCliTaskOperations.ts#L32

Could this be incorporated into the other tasks

@stevejroberts
Copy link
Contributor

The explicit call you note is made because the AWS CLI task does not use the AWS SDK for Node.js to make service calls when the task runs. For those tasks, we rely on a call triggered here.

The difference between the two is that the constructor approach uses environment vars to detect the proxy, whereas the CLI task code path makes a call to the task library that in turn allows us to set up the environment vars the CLI will then automatically pick up.

How did you configure your proxy settings?

@ipf-pl-godlewsm
Copy link

They are configured using Windows system environment ( both user and system ) variables with names HTTP_PROXY, HTTPS_PROXY. Those point to local cntlm proxy installed on machine.

In the debug logs I can observed that proxy is being picked by task:
Agent.ProxyUrl=http://127.0.0.1:3128
Agent.ProxyUsername=undefined
Agent.ProxyPassword=undefined
Agent.ProxyBypassList=[***]
Configuring task for proxy host 127.0.0.1:3128, protocol http:

yet still actual request is not visible on proxy ( browser traffic is visible )

@Styxxy
Copy link

Styxxy commented Nov 27, 2018

@steveataws I did exactly like @ipf-pl-godlewsm and have the same issue.
You have any feedback on how to set the proxy? Seems like you don't pass this configuration along.

This is quite blocking for using this task.

@stevejroberts
Copy link
Contributor

With AWS's re:Invent conference and other work I've not had chance to dig much into this apart from examining the code I linked looking for obvious errors. I'll bump it up my priority queue as soon as I get back from the conference at the end of the week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants