Http request issue

Hi everyone,

I have a rather strange problem with an http-request node.

I have 2 nodes. One has
192.168.1.128/data/?statistics={"instagram_reading":"{{payload}}"}

the other has
http://esp32.local/data/?statistics={"instagram_reading":"{{payload}}"}
in its URL

The first one works, but the second one does not, giving the following error "Error: getaddrinfo ENOTFOUND esp32.local esp32.local:80"

However when I paste both of them to my browser, both of them works, updating the ESP32 properly- with a proper {{payload}} value of course.

Any ideas why the esp32.local doesn't work in node-red ?

Is your browser on the same device as Node-RED?

No, the browser is on my PC, node-red is on a Asus tinker board S within the same 192.168.1.xxx network.

Probably the machine running the browser knows the ip address of esp32.local but the machine running node-red does not. You can check this by running, in a terminal on the node-red machine, ping esp32.local

So clearly your PC and Tinker have different networking configurations. Understandable.

The delivery of the .local domain name is a local networking feature. It could be provided by your router but could also be configured into the local network stack.

You will need to see how the 2 are configured in respect to networking. Which DNS do they use? Is one using DHCP and the other a fixed IP? Is one of the devices configured to use Bonjour (network discovery)?

The PC is on DHPC 192.168.1.70. Node-red is running on tinker board under hassio in a docker -which I believe in on static IP (192.168.1.35). I access node-red from the hassio UI which runs on 192.168.1.35

However when I ssh to hassio I get the 172.30.33.2 address from ifconfig. Then I checked portainer that runs under hassio to see the networks. It shows 172.30.32.1 as the getaway and 172.30.32.0/23 as the subnet for the hassio...

This is well beyond my knowledge so I have no idea what is going on :slight_smile:

(PS ping esp32.local gives no result BTW)

Hmm, well I'm sorry to say that I think you have hit the nail on the head. Not about your lack of knowledge, but rather about the complexity of the solution. The problem with adding Docker to the equation we see a lot in the forum. It adds a layer of complexity that few are familiar with.

I played with using Docker for things like this quite a while back and quickly came to the conclusion that , unless you are really familiar with Docker, it just isn't worth the effort.

Personally, I suggest that you will need to dig into the way that Docker works and understand exactly what it is doing to your networking. I'm afraid I can't help with that. Beyond my knowledge too.

1 Like