Troubleshooting deno.land downloads
I have docker containers, within a minikube cluster, that have trouble downloading https://deno.land/ sources. Files at raw.githubusercontent.com work fine, but files at deno.land result in "Connection reset by peer". Any ideas what's going on?
I also observed this behavior when running a container directly: (Seems downloading from raw.githubusercontent.com works just fine, but then downloading from deno.land doesn't)
Deno
Deno, The next-generation JavaScript runtime
Deno features improved security, performance, and developer experience compared to its predecessor. It's a great time to upgrade your Node.js project to run on Deno.
4 Replies
Based on the documentation, Deno has a feature that makes it more resilient when downloading dependencies. If a connection to a remote host fails due to intermittent connection problems or errors on the remote server, Deno will wait a short amount of time and retry the download. This feature is designed to make CI pipelines more reliable and reduce the need to re-run commands.
However, the error you're encountering, "Connection reset by peer", is a network-related error that occurs when the peer (in this case, the server hosting deno.land) sends a TCP RST (reset) packet to your client. This could be due to a variety of reasons, such as the server being overloaded, a network issue, or a firewall blocking the connection.
Deno provides a set of error classes that can be used to handle specific error conditions. For example,
Deno.errors.ConnectionReset
is raised when the underlying operating system reports that a connection has been reset. However, these error classes are more for handling errors in your Deno code, and may not directly help in debugging this network issue.
In your case, since the error is occurring when trying to download from deno.land but not from raw.githubusercontent.com, it suggests that the issue might be specific to the deno.land server or how your network is interacting with it.
Here are a few steps you can take to troubleshoot this issue:
1. Check if there are any known issues with the deno.land server. You can do this by checking their status page or reaching out to their support.
2. Try accessing deno.land from a different network to see if the issue is related to your current network.
3. Check your firewall settings to ensure that connections to deno.land are not being blocked.
4. If you're running this in a corporate or otherwisecontrolled network environment, there may be network policies or other security measures in place that are interfering with the connection to deno.land. You may need to speak with your network administrator about this.
Remember, these suggestions are not from the documentation and are general advice for debugging network issues.
enabling docker ipv6 support enables containers to download from deno.land 🙂 no luck for containers inside the minikube cluster yet...
from this specifc server,
openssl s_client -4 --connect deno.land:443
failed, while openssl s_client -6 --connect deno.land:443
worked fine. switching servers to anther location fixed the problem for me.