winsoroaks
winsoroaks•16mo ago

ECONNREFUSED, errno: -111: Firewall issues?

Hello team! Maybe this is expected, im trying to use nodemailer locally but running into the error above. When i swap out nodemailer transport for Resend client, my functionality works. after doing some quick search, i see someone running into the same issue for gitpod: https://github.com/gitpod-io/gitpod/issues/8976. so this may be intentional. pls lemme know!
error
'error -> ' [Error: connect ECONNREFUSED 127.0.0.1:1025] {
errno: -111,
code: 'ESOCKET',
syscall: 'connect',
address: '127.0.0.1',
port: 1025,
command: 'CONN'
}

$ netstat -vanp tcp | grep 1025
tcp4 0 0 127.0.0.1.1025 *.* LISTEN 131072 131072 43089 0 00100 00000106 000000000048eac0 00000001 00000900 1 0 000001
error
'error -> ' [Error: connect ECONNREFUSED 127.0.0.1:1025] {
errno: -111,
code: 'ESOCKET',
syscall: 'connect',
address: '127.0.0.1',
port: 1025,
command: 'CONN'
}

$ netstat -vanp tcp | grep 1025
tcp4 0 0 127.0.0.1.1025 *.* LISTEN 131072 131072 43089 0 00100 00000106 000000000048eac0 00000001 00000900 1 0 000001
thanks, once again!
6 Replies
ballingt
ballingt•16mo ago
@winsoroaks Convex code runs ona server, either on the Convex deployment or for Node.js modules, in AWS Lambda. It looks like you're trying to connect to something on your local machine?
winsoroaks
winsoroaksOP•16mo ago
yes. this is for nodemailer. does it mean i cannot use nodemailer locally?
ballingt
ballingt•16mo ago
Waht is it that's running at 127.0.0.1:1025? You could expose this to the internet with ngrok or similar if this were secured somehow, but if it's something that can't safely be exposed to the internet then no, you cannot access this resource from the Convex cloud.
winsoroaks
winsoroaksOP•16mo ago
its the SMTP server 😅 yeah seems too much hassle to get it run locally. hmm i guess i'll just do Resend for dev too. maybe i should do some flag toggles to prevent blowing the limit would this be feasible if i were to do ngrok?
ballingt
ballingt•16mo ago
yes, if your SMTP server uses authentication an alternative would be logging "this would send an email" in dev, or just sending the emails (this is what I usually do) since they're pretty cheap, and in dev I'm not sending thousands of them
winsoroaks
winsoroaksOP•16mo ago
yea makes sense. thanks again tom! i appreciate your patience. im still trying to learn my way thru convex 😅

Did you find this page helpful?