Search code examples
postmanmonitoringrest

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


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. :)


Solution

  • 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