Nougator
Nougator•10mo ago

Error trying to connect: Connection reset by peer (os error 104)

Hello, i'm trying to deploy a my Fresh website using a Ubuntu 22.04 server but when I try to run my code (using deno run main.ts -A) I get this error
error: Import 'https://deno.land/std@0.193.0/dotenv/load.ts' failed: error sending request for url (https://deno.land/std@0.193.0/dotenv/load.ts): error trying to connect: Connection reset by peer (os error 104)
at file:///home/mysite/main.ts:7:8
error: Import 'https://deno.land/std@0.193.0/dotenv/load.ts' failed: error sending request for url (https://deno.land/std@0.193.0/dotenv/load.ts): error trying to connect: Connection reset by peer (os error 104)
at file:///home/mysite/main.ts:7:8
I never had this kind of error before and now I'm stuck and don't really know what to do. Can anyone please help me?
2 Replies
Deno AI Helper
Deno AI Helper•10mo ago
I'm sorry to hear that you're experiencing this issue. The error message you're seeing, "Connection reset by peer (os error 104)", is related to the Deno.errors.ConnectionReset error as per the documentation. This error is raised when the underlying operating system reports that a connection has been reset. With network servers, it can be a normal occurrence where a client will abort a connection instead of properly shutting it down. In your case, it seems like the connection to https://deno.land/std@0.193.0/dotenv/load.ts is being reset while Deno is trying to fetch the module. This could be due to a number of reasons such as network issues, issues with the server hosting the module, or even security software on your machine interfering with the connection. Here are a few things you could try: 1. Check your internet connection: Make sure you have a stable internet connection and you're able to access https://deno.land/std@0.193.0/dotenv/load.ts in your web browser. 2. Retry the operation: As per the documentation, Deno is resilient when downloading dependencies. It will wait a short amount of time and retry the download if it fails due to intermittent connection problems or spurious errors on the remote server. So, you could simply try running your command again. 3. Check for updates: Make sure you're using the latest version of Deno. You can update Deno by running deno upgrade. 4. Check your security software: If you're using any security software or firewall, make sure it's not blocking Deno from making network requests. If you're still facing the issue after trying these steps, please let me know. We'll figure this out together! 🦕
Nougator
Nougator•9mo ago
It was a problem using ipv6