Postman Monitoring request error "Error: NETERR: getaddrinfo ENOTFOUND localhost"
Asked Answered
P

7

5

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

Parrot answered 1/1, 2021 at 22:35 Comment(0)
L
10

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

Lynelllynelle answered 2/1, 2021 at 4:11 Comment(0)
M
8

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

Minny answered 10/6, 2021 at 20:57 Comment(0)
L
0

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

Lycurgus answered 30/6, 2021 at 10:55 Comment(1)
OP is using localhost. DNS is not involved.Longdrawnout
H
0

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.

Hepzi answered 6/1, 2022 at 21:2 Comment(0)
E
0

I faced the same issue and it got solved by removing the env variable

Expeditious answered 9/2, 2023 at 5:42 Comment(0)
M
0

In my case, it was not the env variables that caused this error but the server being unavailable/down due to server team work on it.

Mandle answered 21/7, 2023 at 15:23 Comment(0)
M
-2

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

Mallon answered 14/6, 2022 at 17:21 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.