Error: connect ENETUNREACH on node-red-node-email

Could it be related to this ?

It worked fine for 12 hours and then stop after an reboot (updated mosquito service)
I know have the (related?) "Error: Can not use IPv4 addresses with current network".

Update with Full error message:
Error: Can not use IPv4 addresses with current network at GetAddrInfoReqWrap.callback (/home/pi/.node-red/node_modules/node-red-node-email/node_modules/nodemailer/lib/shared/index.js:203:35) at GetAddrInfoReqWrap.onlookupall [as oncomplete] (node:dns:132:8)

I think it's the same problem.
What does node -v show?

I'm on v16.18.0

I notice there are some "fixes" to the nodemailer lib package mentioning DNS... I have updated the email node to 1.18.0 to pull in the latest... Can someone see if that helps ?

An update:

I found out how to roll back to nodejs 16.7.0

wget https://deb.nodesource.com/node_16.x/pool/main/n/nodejs/nodejs_16.17.0-deb-1nodesource1_arm64.deb
sudo apt install -f ./nodejs_16.17.0-deb-1nodesource1_arm64.deb

nodejs changed from 16.17.1 to 16.17.0 and the gmail problem disappeared.
However, today, reverting to 16.17.1 using either apt upgrade or the Node-red install script, the problem doesn't come back.
This is different to yesterday when I rolled back to nodejs14.
And I have repeated yesterday's test several times. The problem does not want to come back.

node-red-node-email is still 1.17.0

I managed to get it working by shifting from wifi to ethernet cable, and then back to wifi only as well as deactivating IPv6 from the GUI wifi icon. So far stable.

node-red-node-email is stilll on 1.17.0

It would be helpful if you could make it fail again and then upgrade the email node to see if that finally fixes it

If only it was that simple!

Hi, I'm totally new to this forum.
I've got the same problem as described and have updated the node. The problem still persists. I'm running v16.17.0

I was offline due to a cut fibre cable for 2 weeks (definitely blocks all emails).
When the internet connection was working again the mail node work for approx 1h sending several mails but then stopped with the "Error: Can not use IPv4 addresses with current network".

Upgrading node-red-node-email to 1.18.1 did not fix it.

I got it working again connecting via both wifi & ethernet cable, with IPv6 deactivated.
I'll try to run on only ethernet cable and see how that works ...

I get this quite regularly recently. It seems to be triggered by switching between wifi and wired ethernet, though I am not sure exactly what to do to make it happen. As far as I can see everything other than the email node continues as normal.
A node red restart fixes it. If anyone can suggest anything to look at to help diagnose exactly what is going on then I can try it next time it happens.

Standard install running on Ubuntu
Node red 3.0.2
nodejs 16.18.1
node-red-node-email 1.18.2

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