By piman51277
I was trying to call some APIs through my Droplet as a test, and I ran into some very odd errors: “Client network socket disconnected before secure TLS connection was established” and “SOCKETTIMEOUT” To make sure this was not the fault of my code, I ran it on both a local Windows and a Linux machine, and I had no problems. What could be causing the issue? The Linux machine had essentially the same configuration as the droplet, yet still ran it without error. So far, I have tried switching all https to http, without success.
test script: const axios = require(‘axios’) axios.get(‘path-to-api’,{params:{}}) .then((rsp)=>{ console.log(‘Got sucessful response!’) }) .catch((err)=>{ console.log(err) })
Droplet info: ubuntu 20.04 LTS Nodejs 15.3.0
Test Machine (Windows) info: Windows 10 (latest) Nodejs 15.3.0
Test Machine (Linux) info: ubuntu 20.04 LTS Nodejs 15.3.0
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Did you ever find a solution?
I’m having the same issue; only on the droplet but not from my PC or other server. Could someone from DigitalOcean shine some light on this perhaps?
Same issue here, i have submitted ticket to DO, and let’s see how it will goes…
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.