andrinheusser
andrinheusser9mo ago

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)
nrk@SAMWAF:~$ docker run -it --init denoland/deno:1.37.0 repl
[WARN tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Deno 1.37.0
exit using ctrl+d, ctrl+c, or close()
> import { assert } from "https://deno.land/std/assert/mod.ts"
✅ Granted net access to "deno.land".
Uncaught TypeError: Import 'https://deno.land/std/assert/mod.ts' failed: error sending request for url (https://deno.land/std/assert/mod.ts): error trying to connect: Connection reset by peer (os error 104)
at async <anonymous>:2:20
> import * as amqp from "https://raw.githubusercontent.com/lenkan/deno-amqp/master/mod.ts"
✅ Granted net access to "raw.githubusercontent.com".
Uncaught TypeError: Import 'https://deno.land/std@0.165.0/io/mod.ts' failed: error sending request for url (https://deno.land/std@0.165.0/io/mod.ts): error trying to connect: Connection reset by peer (os error 104)
at https://raw.githubusercontent.com/lenkan/deno-amqp/master/deps.ts:1:35
at async <anonymous>:2:14
>
nrk@SAMWAF:~$ docker run -it --init denoland/deno:1.37.0 repl
[WARN tini (7)] Tini is not running as PID 1 and isn't registered as a child subreaper.
Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
Deno 1.37.0
exit using ctrl+d, ctrl+c, or close()
> import { assert } from "https://deno.land/std/assert/mod.ts"
✅ Granted net access to "deno.land".
Uncaught TypeError: Import 'https://deno.land/std/assert/mod.ts' failed: error sending request for url (https://deno.land/std/assert/mod.ts): error trying to connect: Connection reset by peer (os error 104)
at async <anonymous>:2:20
> import * as amqp from "https://raw.githubusercontent.com/lenkan/deno-amqp/master/mod.ts"
✅ Granted net access to "raw.githubusercontent.com".
Uncaught TypeError: Import 'https://deno.land/std@0.165.0/io/mod.ts' failed: error sending request for url (https://deno.land/std@0.165.0/io/mod.ts): error trying to connect: Connection reset by peer (os error 104)
at https://raw.githubusercontent.com/lenkan/deno-amqp/master/deps.ts:1:35
at async <anonymous>:2:14
>
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
andrinheusser
andrinheusser9mo ago
root@4a746f636a41:/# curl -v https://deno.land/std@0.202.0/assert/mod.ts
* Trying 34.120.54.55:443...
* Connected to deno.land (34.120.54.55) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to deno.land:443
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to deno.land:443
root@4a746f636a41:/#
root@4a746f636a41:/# curl -v https://deno.land/std@0.202.0/assert/mod.ts
* Trying 34.120.54.55:443...
* Connected to deno.land (34.120.54.55) port 443 (#0)
* ALPN: offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/certs/ca-certificates.crt
* CApath: /etc/ssl/certs
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to deno.land:443
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to deno.land:443
root@4a746f636a41:/#
Deno AI Helper
Deno AI Helper9mo ago
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 otherwise
Deno AI Helper
Deno AI Helper9mo ago
controlled 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.
andrinheusser
andrinheusser9mo ago
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.