Postman Monitoring request error "Error: NETERR: getaddrinfo ENOTFOUND localhost"

Viewed 21336

I am trying to figure out how to get monitoring to work in Postman.

I have written tests on the desktop client for get/create/put and everything works fine. I'm using a localhost address and port 5004 which is the port for the API.

http://127.0.0.1:5004/bookings

I have tried to change the proxy in setting to localhost and port 5004, I have tried to change it to 127.0.0.1:5004, I have tried to disable SSL on the desktop client. I am running the monitoring on using the desktop client from the browser, that doesn't work either.

The error log:

I've tried it with https and without

I have also checked if my etc/host file contains 127.0.0.1 localhost and it does.

Not sure what else I can try, I would appreciate any help. :)

5 Answers

Accessible APIs:

Monitors require all URLs to be publicly available on the internet as they run in the Postman cloud. A monitor cannot directly access your localhost or run requests behind a firewall. However, to overcome this issue, static IPs are available on Postman Business and Enterprise plans.

https://learning.postman.com/docs/designing-and-developing-your-api/monitoring-your-api/intro-monitors/

you cannot use the monitor for inhouse and localhost websites, You could upgrade to enterprise or business plans and see if that helps

The issue is maybe you configured the environment variable and passed the correct value in the URL also

But while running the collection test class didn't select the correct environment

Select the environment configured to run that collection, shown in attached screenshot

enter image description here

I faced this problem and the issue was my DNS address. After changing the DNS server it was solved.

I had the same problem, I had space between ip and :port =>0.0.0.0b:1111 in my env. I deleted the space and I can connect. => 0.0.0.0:1111.

what you should try is sign out, sign in again. make sure the environment variables are not empty. also, try using the feature console.log(get environment variable name) it would be helpful. make sure to click on persist all in the environment variable. The key for me was to click on "persist all" in the environment variable

read the github

some comments which helped me resolve the issue

Related