Postman Monitor - Error: getaddrinfo ENOTFOUND

Hello Postman-community!

I’m currently facing an issue regarding the Monitoring feature of the Postman that I couldn’t figure out somehow. When I run my collection which includes some POST Requests which contain a few tests that check some of the reponse content, this runs totally fine. Though, whenever I start a monitor with the same collection, I immediately run into the following error:

Error: getaddrinfo ENOTFOUND domainname domainname:portnumber

Does anyone know why this error might pop up? The domain that I’m testing is publicly available, so I’m kind of confused…

Thanks in advance for your help!

1 Like

Is the URL in question using environment variables for the domain/protocol/port or anything else that would be used for resolution? If so, is the environment being resolved correctly? You can check by logging the environment values.

1 Like

Hi godfrzero,

thanks for your fast reply! Apparently, I’m not using any environment variables in the collection at all… So the URL that I’m using within my requests is pretty much static…

Ah, that’s weird. If it’s a URL you can share here, please do. If not, can you send us an email at help@getpostman.com, including the monitor ID, error message, and the URL you’re trying to hit?

Check if your URL path is having any space or unexpected character. Occurred with me because there was space.

4 Likes

I know this is an old thread but we were getting this error on an API that was only for internal use. It should’ve been a no brainer but we were in a hurry and perplexed for a minute by it. Hope this helps! Thanks or the help on this one

1 Like

Check the url server if its up .

Hi @godfrzerp and @danny-dainton , I am running my collection using Newman and getting the error getaddrinfo ENOTFOUND {{url}} at request inside “endpoint” I already checked that there is no space in the environment variable.
Note: It’s working properly in postman App.

Hey @swapnil4054, welcome to the community! :slight_smile:

Since the URL in the error you’ve posted is still showing up as {{url}}, it looks like it’s not getting resolved at all. I’d recommend looking at how the environment is being referenced in the newman command.

Also, this particular thread relates to this error in the Monitoring product. You’re likely to get a more relevant answer (and an answer that’s easily discovered by other users facing the same problem) if you start a new thread regarding this.

Cheers!

2 Likes

Thanks @godfrzerp I’ll create a new thread for this.

@swapnil4054 you need to download the json file with environmental variables to your folder with collections.
After that you run newman run mycollection.json -e dev_environment.json command where mycollection.json is the name of the collection and dev_environment.json is the file with environmental variables.

1 Like

published iis api url -https://kpayapi/api/Account/ValidateLogin?UserName=2010341&UserPassword=mfpl143&Module=1

and iisexpress api url at runtime is -https://localhost:44321/api/Account/ValidateLogin?UserName=2010341&UserPassword=mfpl143&Module=1

Where i have a mistake in published url got error Error: getaddrinfo ENOTFOUND kpayapi

In my case, I had to remove the “https://” from server variable since endpoint is running self-signed certs in an air-gapped environment. Obviously HTTP is not recommended in production.

Here is an example using Horizon REST API Collection

3 Likes

If you are using environment variable, check twice the variable value, make sure the url does not contain any space or enter value.

Having issues with this since like version 9. As soon as a DNS changes i get this error and it requires a restart of my computer to fix it… did you change the request logic or node version?

@R0drig0
thank you so muc , it solved my problem, you just need to set the URL variable with out https://

Thank you so much brother


check it.