Newman and ETIMEDOUT Error

Hi,

I have newman setup and running local. But i am having an issue with newman running on a certain endpoint. This endpoint is not public, and i cannot give details on it.

I have a simple GET request that when fired through Newman returns:

GET https://soemthing/online/3bc009c4-15bc-40dc-aeaf-409c48285bac 

Error: connect ETIMEDOUT 50.11.121.100:443

Request Headers
User-Agent: PostmanRuntime/7.26.3
Accept: */*
Postman-Token: b39eeb33-2496-41b7-a233-dd6de7d2e989
Host: something.co.uk
Accept-Encoding: gzip, deflate, br

This does not happen when running it through Postman.

The reason for this is the following box is checked in Postman: “Use the system Proxy”

Is there a way to get Newman to run using the same setting?

If so, how do i find out what the Proxy is that the API calls are going through?

Many thanks in advance

What’s the Newman run command that you’re using?

Have you tried this with --insecure appended to the end of the command?

Yep:

"newman-tests-smoke": "newman run ./smoke-test-set/smoke.postman_collection.json -e ./smoke-test-set/smoke-test.postman_environment.json --reporter-junit-export Results\\junitSmokeTestReport.xml --insecure",

I have also read that it may have something to do with Newman wanting things in lowercase and Postman has them in upper case.

so i have set the requests (that arn’t hidden) to lower case and turned off the proxy, and still get the same error

I think you’re missing a --reporters junit in there

newman run ./smoke-test-set/smoke.postman_collection.json -e ./smoke-test-set/smoke-test.postman_environment.json --reporters junit --reporter-junit-export Results\\junitSmokeTestReport.xml --insecure

That’s not the same issue though :smiley:

Not really sure what to suggest to be honest as it’s not a lot of information to go off - Are you using something to run Newman or was that just part of an npm script?

Am just running this from inside VSCode.

npm run {packageName}.

As soon as it hits the GETs on the API Request it throws the error. I think i have now found my companies Proxy, so am going to try the

set HTTPS_proxy=myuser:mypassword@ipoftheproxy:portoftheproxy

set HTTP_proxy=myuser:mypassword@ipoftheproxy:portoftheproxy

in front of the Newman command. I’ll let you know how that goes

Nope, still no luck. Different error this time:

"newman-tests-smoke": "set HTTPS_PROXY=https://username:password@proxy.something.com:8080 && newman run ./smoke-test-set/smoke-test.postman_collection.json -e ./smoke-test-set/smoke-tetest_environment.json --reporter-junit-export Results\\junitSmokeTestReport.xml --insecure",

returns

[errored]
tunneling socket could not be established, cause=Client network socket disconnected before secure TLS connection was established

@dannydainton is there anyway to set a Proxy setting for a single request rather than Globally?