# Running Postman collections in CLI newman error - getaddrinfo ENOTFOUND {{base\_url}}

**URL:** <https://community.postman.com/t/running-postman-collections-in-cli-newman-error-getaddrinfo-enotfound-base-url/34576>\
**Category:** Help Hub\
**Tags:** tests, collections\
**Created:** [April 19, 2022, 7:14am UTC](https://community.postman.com/t/running-postman-collections-in-cli-newman-error-getaddrinfo-enotfound-base-url/34576 "2022-04-19T07:14:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![joint-operations-ar4](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@joint-operations-ar4](https://community.postman.com/u/joint-operations-ar4)\
**Post date:** [April 19, 2022, 7:14am UTC](https://community.postman.com/t/running-postman-collections-in-cli-newman-error-getaddrinfo-enotfound-base-url/34576/1 "2022-04-19T07:14:03Z")

</div>

Hello,  
I have written test cases for API collections in postman and trying to run those through Newman plug-in in my local machine. I have downloaded the JSON file in documents on my mac

I am using this command to run : **newman run QA\_api\_testing.postman\_collection.json**

getting below error with all the api’s failing  
error message: **GET {{base\_url}}/companies/active/all [errored]**  
\*\* getaddrinfo ENOTFOUND {{base\_url}}\*\*

 ![Screenshot 2022-04-19 at 12.42.51 PM](https://us1.discourse-cdn.com/getpostman/original/2X/a/af9f37fc8dbf557fbc936f495238f69e6f530079.png)

pls help me

---

<div class="post-metadata">

**Author:** ![bpricilla](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/bpricilla/32/6511_2.png) [@bpricilla](https://community.postman.com/u/bpricilla)\
**Post date:** [April 19, 2022, 11:05am UTC](https://community.postman.com/t/running-postman-collections-in-cli-newman-error-getaddrinfo-enotfound-base-url/34576/2 "2022-04-19T11:05:41Z")

</div>

@joint-operations-ar4 Welcome to the community 🥳

Seems like you have used variables for storing “base\_url”, if it’s a collection variable it will exported along with the collection json. But if you are using environmental or global variables, you need to export them manually and pass the file along with the comment. Refer [here](https://learning.postman.com/docs/running-collections/using-newman-cli/command-line-integration-with-newman/) for more details.

---

<div class="post-metadata">

**Author:** ![joint-operations-ar4](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@joint-operations-ar4](https://community.postman.com/u/joint-operations-ar4)\
**Post date:** [April 19, 2022, 11:56am UTC](https://community.postman.com/t/running-postman-collections-in-cli-newman-error-getaddrinfo-enotfound-base-url/34576/3 "2022-04-19T11:56:17Z")

</div>

Hi @bpricilla: Thanks for the response. I don’t have a dedicated QA server here. I duplicated the whole collection from dev server, named it differently, and wrote test cases for that collection.  
running that collection in a staging environment(dev) . It works fine when I run the collection in postman. gives error when I run with Newman CLI. I’ll try as you suggested.
