Hi, I’m pretty new to both the PLCnext as well as Node-Red so any useful advice at all would be much welcome. For reference, I’ve installed Node-Red on an AXC F 2152 controller by going through the steps in the following link: https://www.plcnext-community.net/en/hn-makers-blog/481-node-red-and-getting-started-with-docker.html - up until the My First Container section. Afterward, I ran Node-Red on my browser and tried out the first two tutorials on the Node-Red website namely, the First and Second Flows. The first flow was able to be deployed to the controller and worked without a hitch. However, when I tried to implement the second flow, the following error pops up. Error: getaddrinfo EAI_AGAIN I’m not really sure why this happens, but a couple of Google searches have brought up that the issue may be related or due to some DNS issue/might be also related to Docker? I’ve also come across another problem when I tried to set up a simple MQTT Client with Node-Red. I followed a simple example that aimed to Integrate an MQTT client in Node-Red to read and visualize data from a temperature sensor. I put in an MQTT node and configured the broker as per the image attached which was from the example I was following (while setting the server as the IP address for my controller). However, when I got to the point of connecting the MQTT node to debug and deploying the flow to the controller, the MQTT node was shown to be connecting indefinitely and never did connect or output anything in the debug side panel. Please let me know if there are any ways I could fix these issues; any useful links or guides I could look into would also be much appreciated. Thank you for taking the time to read this post and thanks in advance as well.
Hello, as far as I can tell from here, it looks like your docker container cannot establish an internet connection. You can try to attach to your container and then send a ping to e.g. www.phoenixcontact.com from within the container.
Hello again, thanks a lot for the reply
I got the second flow to work but am still having the same issue with the MQTT client. I tried sending a ping to www.phoenixcontact.com and did get a response; I deployed the flow again to see if it would connect and the MQTT node still seems to be endlessly connecting with no output to the debug node. I’m still not sure what the error could be at this point. Is there anything else that I could try to solve this?
I tried the mqtt node on my machine without problems. The error that you are getting is a DNS lookup timeout. What I found on one website is this: [quote]If you get this error from within a docker container, e.g. when running npm install inside of an alpine container, the cause could be that the network changed since the container was started. To solve this, just stop and restart the container[/quote]
I tried restarting the container, also made sure to double-check that there was internet connection. Unfortunately, the yellow connecting symbol still persists. I’ve also searched a bit further online and my problem seems to be similar to this person’s: https://discourse.nodered.org/t/mqtt-nodes-not-connecting/38950/7 Although I’m not sure since they seem to be using the Mosquitto Broker, I’m also unsure if this issue is supposed to crop up since the docker container should be working the same as other machines right? Is there anything else further I can try? Thank you for the replies and thanks in advance.
If the problem is with DNS lookups, as Stefan suggests, then you could try using the IP address of the broker instead of the DNS name in the server URI.
Thanks once again for the replies, I got it connected now. Had some issue with my broker configuration and had to fix something related to that. Node now connects using the IP address of the broker as Matin suggested and after fixing the issue with the broker. Many thanks to you guys, Stefan and Martin for the helpful replies. ![]()