connect ETIMEDOUT error using POSTMAN with NEWMAN

13,859

Fixed: It was a proxy matter. I wrote these two commands in the cmd console:

set HTTPS_proxy=myuser:mypassword@ipoftheproxy:portoftheproxy
set HTTP_proxy=myuser:mypassword@ipoftheproxy:portoftheproxy
Share:
13,859

Related videos on Youtube

Paco
Author by

Paco

Updated on June 04, 2022

Comments

  • Paco
    Paco almost 2 years

    I'm using Newman in order to execute a POSTMAN collection but I always have the error "connect ETIMEDOUT". Using just POSTMAN it works fine, but not with NEWMAN. The testing is quite simple, create a content on the server https://jsonblob.com/api

    I'm following the tutorial http://blog.getpostman.com/2014/04/17/how-to-write-automated-tests-for-apis-with-postman-part-2/

    Thanks you very much in advance. I put below the collection and the enviroment file.

    This is the collection: { "id": "a6a6b2fe-db11-4c57-9144-6b3324174f18", "name": "Newman", "values": [ { "key": "url", "value": "https://jsonblob.com", "enabled": true, "type": "text" }, { "key": "deviceMapping", "value": "{\n \"content\": \"My first blog post :)\"\n}", "enabled": true, "type": "text" }, { "key": "blogLink", "value": "https://jsonblob.com/api/jsonBlob/b7f2ce87-4c8e-11e8-917b-9137e61d314b", "enabled": true, "type": "text" } ], "_postman_variable_scope": "environment", "_postman_exported_at": "2018-04-30T16:13:07.630Z", "_postman_exported_using": "Postman/6.0.10" }

    This is the enviroment file: { "id": "a6a6b2fe-db11-4c57-9144-6b3324174f18", "name": "Newman", "values": [ { "key": "url", "value": "https://jsonblob.com", "enabled": true, "type": "text" }, { "key": "deviceMapping", "value": "{\n \"content\": \"My first blog post :)\"\n}", "enabled": true, "type": "text" }, { "key": "blogLink", "value": "https://jsonblob.com/api/jsonBlob/b7f2ce87-4c8e-11e8-917b-9137e61d314b", "enabled": true, "type": "text" } ], "_postman_variable_scope": "environment", "_postman_exported_at": "2018-04-30T16:13:07.630Z", "_postman_exported_using": "Postman/6.0.10" }

    • Danny Dainton
      Danny Dainton about 6 years
      What have you tried so far? What requests do you have in your collection? How are you running Newman? etc You're going to need to update the question with a lot more information. I would also recommend reading this and change your tests as that blog is quite old now - blog.getpostman.com/2017/10/25/writing-tests-in-postman
    • Paco
      Paco about 6 years
      Hello. Thanks you for your answer. Well, I'm sending a request of the type POST to the IP jsonblob.com/api that would create a new content in that service. I'm runing NEWMAN with the console CMD, going to the folder where the collection is stored and using the command: "newman run Testing.json" but I have used as well "newman run --delay-request[300000] Testing.json" but I have the same problem. I will see the link that you have put. Thanks you very much again.
    • Danny Dainton
      Danny Dainton about 6 years
      Is there a reason why you have a 5min delay between the requests? How many requests do you have?
    • Paco
      Paco about 6 years
      I have two request, a POST to create the content and a GET to get this one. There is not a reaso because I put this time out in particular. Thanks you again and best regards.
    • Danny Dainton
      Danny Dainton about 6 years
      Are you saving the 'location' to an environment file like in the tutorial? You haven't added this to your Newman CLI arg if you are. Also newman run --delay-request[300000] Testing.json this shouldn't really work either as the first argument should be the 'collection' file and not a arg flag.
    • Paco
      Paco about 6 years
      Hello. I'm storing the 'location' in a variable called 'blogLink'. How could I add this to the Newman CLI? Please. Thanks you again.
    • Danny Dainton
      Danny Dainton about 6 years
      It should be saving that 'location' value to the environment file, as per the tutorial that you're following - This file fills in the {{...}} placeholders like the request URL base path etc. In the UI, you would select the file from the dropdown list but for newman you to need to supply the path to it. So you CLI arg would be something like: newman run <your_collection_file.json> -e <your_env_file.json>
    • Paco
      Paco about 6 years
      I have had the same connect ETIMEOUT error with that CLI. I have added the collection and the enviroment file to the question, I hope it can helps. Thanks a lot.
    • Danny Dainton
      Danny Dainton about 6 years
      What version of newman and node do you have - It doesn't look like its a Postman specific issue with the files (might be wrong) but it seems more environmental. As I don't know what your set up is, it's difficult to help further and it shouldn't really be done in the comments section anyway.
    • Paco
      Paco about 6 years
      Hello, my Newman version is 3.9.3. Sorry if I'm not asking it in the right place, if there is another way much better, I will do. Thanks again for your help.