Establishing communication between IOT2040(Node-Red) and S7-1200 using Putty

//NODE RED V0.20.7
//NODE JS V14.16.0
//IOT2040 Module - 6ES7 647-0AA00-1YA2
//Putty RELEASE 0.7

While downloading S7 library into IOT2040 when we enter the command npm install node-red-contrib-s7 in Putty, following error is seen-

npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! request to https://registry.npmjs.org/node-red-contrib-s7 failed, reason: getaddrinfo EAI_AGAIN proxy.company.com:8080

npm ERR! A complete log of this run can be found in:
npm ERR! /home/root/.npm/_logs/2021-03-30T11_36_16_150Z-debug.log

Kindly help us to resolve the issue,
Thanks in Advance!

EAI_AGAIN means the DNS server replied that it cannot currently full fill the request

The device requires internet connection to download / install extra nodes.

Can you ping 8.8.8.8 from inside the putty session?

Can you curl something from the internet? e.g what do you get if you run curl https://flows.nodered.org/node/node-red-contrib-s7 (inside the putty session to the IOT box)?

PS, out of curiosity, how have you got NODE JS V14.16.0 running on an IOT2040 ?
PS2: node-red V0.20.7 is seriously out o date. If you really have nodejs V14 you can run node-red V1.2.9 (current release)

Thanks for your reply,

  1. We ping 8.8.8.8 from inside the putty session we are getting response.

  2. When we type curl node-red-contrib-s7 (node) - Node-RED the response is
    Could not resolve host: flows.nodered.org

Refer the Screenshot attached.

Regarding the PS Node JS version is of localhost so it is not concerned here in IOT2040.

Thanks,
Awaiting for your reply.

so it is definitely a DNS issue - the box can access external resources but cant perform DNS lookups.

PS, this issue has been on the forum several times. A quick search lead me to a post that links to this siemens post

Have you tried that?

In which case it is of zero relevance (putty commands are executed on the remote box and the localhost NODEJS version is completely irrelevant)
But thanks for clarifying - siemens dont seem to be supporting their hardware beyond nodejs 8 (or is it v10 - i forget?).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.