mojo icon indicating copy to clipboard operation
mojo copied to clipboard

[Modular CLI]: failed to reach URL, couldn't resolve host name

Open ARGF0RCE opened this issue 9 months ago • 29 comments

Issue description

I have modular cli installed and working as shown below with modular --version. But when I run modular install mojo it doesn't download mojo and remains stuck for a long time (about 30 minutes or so). Is the mojo runtime really a big file 'cause I'm getting decent download speeds (about 20-40Mbit/s). Maybe you can add a completion bar or display a percentage while installing using modular to know that it is downloading something.

Steps to reproduce

  • Include relevant code snippet that did not work as expected:
modular install mojo
  • If applicable, add screenshots to help explain the problem. image
  • Include anything else that might help us debug the issue.

Version Info

  • Provide Modular CLI version by pasting the output of modular -v
% modular --version
modular 0.1.4 (6b54d308)
  • What OS did you install modular CLI on ?
% neofetch --stdout
aditya@aditya-Z790 
------------------ 
OS: Ubuntu 22.04.3 LTS x86_64 
Host: Z790 UD AC 
Kernel: 6.2.0-32-generic 
Uptime: 1 hour, 4 mins 
Packages: 2308 (dpkg), 13 (snap) 
Shell: zsh 5.8.1 
Resolution: 1920x1080 
DE: GNOME 42.9 
WM: Mutter 
WM Theme: Adwaita 
Theme: Yaru-blue-dark [GTK2/3] 
Icons: Yaru-blue [GTK2/3] 
Terminal: gnome-terminal 
CPU: 13th Gen Intel i5-13400F (16) @ 4.600GHz 
GPU: NVIDIA GeForce RTX 3060 Ti Lite Hash Rate 
GPU: NVIDIA 01:00.0 NVIDIA Corporation Device 24c9 
Memory: 2175MiB / 15815MiB

ARGF0RCE avatar Sep 09 '23 11:09 ARGF0RCE

I did read the documentation and I do know that the issue is mentioned in it. I just wanted to know if there is any issue from my side that might be causing it.

ARGF0RCE avatar Sep 09 '23 11:09 ARGF0RCE

I did read the documentation and I do know that the issue is mentioned in it. I just wanted to know if there is any issue from my side that miSame for me

modular: error: http error: failed to reach URL https://packages.modular.com/mojo/1.root.json with cURL error Couldn't resolve host name -

Sometime [can not connect with cs.modular.com/***](modular: error: http error: failed to reach URL https://cas.modular.com/0/QODoZxknM2SyzxniWrKGUS_HCAz9oFA5vPyUQqHWLng with cURL error Couldn't resolve host name - Looking for QODoZxknM2SyzxniWrKGUS_HCAz9oFA5vPyUQqHWLng)ght be causing it.

thekivashyn avatar Sep 09 '23 11:09 thekivashyn

I did read the documentation and I do know that the issue is mentioned in it. I just wanted to know if there is any issue from my side that miSame for me

modular: error: http error: failed to reach URL https://packages.modular.com/mojo/1.root.json with cURL error Couldn't resolve host name -

Sometime [can not connect with cs.modular.com/***](modular: error: http error: failed to reach URL https://cas.modular.com/0/QODoZxknM2SyzxniWrKGUS_HCAz9oFA5vPyUQqHWLng with cURL error Couldn't resolve host name - Looking for QODoZxknM2SyzxniWrKGUS_HCAz9oFA5vPyUQqHWLng)ght be causing it.

@thekivashyn Yep I too got that error after an incredibly long time. Maybe the host server where it's storing all files is pretty far from my place or there is no middleman server or edge server for faster download of mojo sdk. We can ask for a feature request to provide more mirrors.

My error:

# Found release for https://packages.modular.com/mojo @ 0.2.1, installing to /home/aditya/.modular/pkg/packages.modular.com_mojo
modular: error: failure detected - please run `modular clean` and try again
==========================
Failure Information:
	- http error: failed to reach URL https://cas.modular.com/0/zzsBU4M7_PRni9RkhDaLIwddriI8kZ-IN3tuHdHRgcA with cURL error Timeout was reached - Looking for zzsBU4M7_PRni9RkhDaLIwddriI8kZ-IN3tuHdHRgcA
	- http error: failed to reach URL https://cas.modular.com/0/3gaIj2AlD3uvLG96tTQVO02qw_EwfMb9NxuPbkal7AM with cURL error Timeout was reached - Looking for 3gaIj2AlD3uvLG96tTQVO02qw_EwfMb9NxuPbkal7AM
	- http error: failed to reach URL https://cas.modular.com/0/IL1yVe7xxx6YS8jL85AIzLbh5iqTqXuIx8sZCaP1HW0 with cURL error Timeout was reached - Looking for IL1yVe7xxx6YS8jL85AIzLbh5iqTqXuIx8sZCaP1HW0
	- http error: failed to reach URL https://cas.modular.com/0/q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU with cURL error Timeout was reached - Looking for q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU
	- http error: failed to reach URL https://cas.modular.com/0/m0ZaP4BF9UO159jwf44Qt-wDuhxiP7RZHTjylxUNEs8 with cURL error Timeout was reached - Looking for m0ZaP4BF9UO159jwf44Qt-wDuhxiP7RZHTjylxUNEs8
==========================

ARGF0RCE avatar Sep 09 '23 11:09 ARGF0RCE

I did read the documentation and I do know that the issue is mentioned in it. I just wanted to know if there is any issue from my side that miSame for me

modular: error: http error: failed to reach URL https://packages.modular.com/mojo/1.root.json with cURL error Couldn't resolve host name - Sometime [can not connect with cs.modular.com/***](modular: error: http error: failed to reach URL https://cas.modular.com/0/QODoZxknM2SyzxniWrKGUS_HCAz9oFA5vPyUQqHWLng with cURL error Couldn't resolve host name - Looking for QODoZxknM2SyzxniWrKGUS_HCAz9oFA5vPyUQqHWLng)ght be causing it.

@thekivashyn Yep I too got that error after an incredibly long time. Maybe the host server where it's storing all files is pretty far from my place or there is no middleman server or edge server for faster download of mojo sdk. We can ask for a feature request to provide more mirrors.

My error:

# Found release for https://packages.modular.com/mojo @ 0.2.1, installing to /home/aditya/.modular/pkg/packages.modular.com_mojo
modular: error: failure detected - please run `modular clean` and try again
==========================
Failure Information:
	- http error: failed to reach URL https://cas.modular.com/0/zzsBU4M7_PRni9RkhDaLIwddriI8kZ-IN3tuHdHRgcA with cURL error Timeout was reached - Looking for zzsBU4M7_PRni9RkhDaLIwddriI8kZ-IN3tuHdHRgcA
	- http error: failed to reach URL https://cas.modular.com/0/3gaIj2AlD3uvLG96tTQVO02qw_EwfMb9NxuPbkal7AM with cURL error Timeout was reached - Looking for 3gaIj2AlD3uvLG96tTQVO02qw_EwfMb9NxuPbkal7AM
	- http error: failed to reach URL https://cas.modular.com/0/IL1yVe7xxx6YS8jL85AIzLbh5iqTqXuIx8sZCaP1HW0 with cURL error Timeout was reached - Looking for IL1yVe7xxx6YS8jL85AIzLbh5iqTqXuIx8sZCaP1HW0
	- http error: failed to reach URL https://cas.modular.com/0/q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU with cURL error Timeout was reached - Looking for q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU
	- http error: failed to reach URL https://cas.modular.com/0/m0ZaP4BF9UO159jwf44Qt-wDuhxiP7RZHTjylxUNEs8 with cURL error Timeout was reached - Looking for m0ZaP4BF9UO159jwf44Qt-wDuhxiP7RZHTjylxUNEs8
==========================

I spent whole day for this shit, may that problem from that enpoint from aws server

thekivashyn avatar Sep 09 '23 11:09 thekivashyn

  1. actually it takes good amount of time to install at this step, may be mojo is big in file size .
  2. now do Restart and then put modular clean and again modular install mojo

rajsecrets avatar Sep 09 '23 12:09 rajsecrets

me too I waited around 5 hours nothing was installed, and then it always takes a lot of time and then gives this error, :

modular: error: failure detected - please run modular clean and try again ========================== Failure Information: - http error: failed to reach URL https://cas.modular.com/0/q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU with cURL error Timeout was reached - Looking for q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU

moha-abdi avatar Sep 09 '23 13:09 moha-abdi

me too I waited around 5 hours nothing was installed, and then it always takes a lot of time and then gives this error, :

modular: error: failure detected - please run modular clean` and try again

Failure Information: - http error: failed to reach URL https://cas.modular.com/0/q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU with cURL error Timeout was reached - Looking for q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU`

I clean and install whole my day :)

thekivashyn avatar Sep 09 '23 13:09 thekivashyn

me too I waited around 5 hours nothing was installed, and then it always takes a lot of time and then gives this error, :

modular: error: failure detected - please run modular clean` and try again

Failure Information: - http error: failed to reach URL https://cas.modular.com/0/q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU with cURL error Timeout was reached - Looking for q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU`

I clean and install whole my day :)

Do you have any solutions?

moha-abdi avatar Sep 09 '23 13:09 moha-abdi

me too I waited around 5 hours nothing was installed, and then it always takes a lot of time and then gives this error, :

modular: error: failure detected - please run modular clean` and try again

Failure Information: - http error: failed to reach URL https://cas.modular.com/0/q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU with cURL error Timeout was reached - Looking for q5b6U54yqL_Sb6JVpXnitj4-6jq4SZqtvSKvwOP_GdU`

I clean and install whole my day :)

Do you have any solutions?

I buy an macbook M1, then ínstall success, my computer using window still can not ínsstall, may Try the way for MAC OS

thekivashyn avatar Sep 09 '23 13:09 thekivashyn

Maybe a VPN might work. I am still trying but I think this is a worth a shot!

ARGF0RCE avatar Sep 09 '23 13:09 ARGF0RCE

I dont think so, I think that just problem on install in window, Team need fix it !

thekivashyn avatar Sep 09 '23 13:09 thekivashyn

Maybe a VPN might work. I am still trying but I think this is a worth a shot!

Yeahtried with VPN around an hour ago and now its installed! I would say most likely faster internet would work for everyone not only the vpn.

moha-abdi avatar Sep 09 '23 13:09 moha-abdi

I have a problem. Mojo can't install on my system and it is ubuntu 22.04. It downloads almost all the files, but when it reaches the last files, it gives a timeout error. I tried to install it almost 20 times in these two days, but it always gives the same error. My internet is also fast and has no interruptions. Thank you if you answer

aarsalannazari avatar Sep 09 '23 14:09 aarsalannazari

Maybe a VPN might work. I am still trying but I think this is a worth a shot!

Yeahtried with VPN around an hour ago and now its installed! I would say most likely faster internet would work for everyone not only the vpn.

I agree. Faster internet is one of the keys to download. And better packaging and networking system by the Modular team is another key.

ARGF0RCE avatar Sep 09 '23 15:09 ARGF0RCE

I think that if the modular team did something like package managers such as Apt or Yum, that if a file was downloaded, it would not be downloaded again, it would be much better and maybe it would be downloaded sooner.

aarsalannazari avatar Sep 10 '23 08:09 aarsalannazari

if a file was downloaded, it would not be downloaded again

That's actually fully supported! You'll notice when you update, if we have a file already we won't re-download it. The main thing is that for the very first install, we have to fetch all of the files you'll need to use the SDK.

We are working really hard to improve our software every day, please be patient with us as we roll out improvements. I personally care a lot about making sure things run well on small computers/slow internet, so believe me when I say we're working on it!

bzcheeseman avatar Sep 10 '23 17:09 bzcheeseman

The same issue, I've tried dozens of times, switched networks, and connected to a VPN, but it still unable to install.

litao0621 avatar Sep 11 '23 10:09 litao0621

VPN works. Got it installed within a minute.

sujayrittikar avatar Sep 12 '23 00:09 sujayrittikar

The same issue. VPN can solve it. If you use Clash for Windows, just click general->UWP Loopback Lanuch Helper, find the Ubuntu20.04 LTS(or 22.04), bingo it and save changes. Then run modular install mojo again and you will install successful. :)

xieyuquanxx avatar Sep 15 '23 02:09 xieyuquanxx

VPN works. Got it installed within a minute.

Hello, Can you tell me how much was the download size , thx in advance

mutamanabdo avatar Sep 20 '23 08:09 mutamanabdo

@mutamanabdo around 300-400 MB

sujayrittikar avatar Sep 21 '23 01:09 sujayrittikar

I dont think so, I think that just problem on install in window, Team need fix it !

No have the same problem on GNU Linux, see https://github.com/modularml/mojo/issues/889

BeeCodeB avatar Sep 22 '23 10:09 BeeCodeB

VPN works. Got it installed within a minute.

Why would a VPN be of help? What would explain the success via a VPN connection?

BeeCodeB avatar Sep 22 '23 10:09 BeeCodeB

VPN works. Got it installed within a minute.

Why would a VPN be of help? What would explain the success via a VPN connection?

Lack of mirrors perhaps? My installation didn't work well with any South Asian IPs, it worked like a charm through a VPN hosted in the Netherlands.

sujayrittikar avatar Sep 22 '23 10:09 sujayrittikar

Well, I have the same failed install from Germany ..

BeeCodeB avatar Sep 22 '23 10:09 BeeCodeB

Note there are two issues being reported here, for timeout this ticket is already open: https://github.com/modularml/mojo/issues/598

Leaving this one here for failed to reach URL, couldn't resolve host name errors and workarounds

jackos avatar Sep 25 '23 14:09 jackos

I have the same problem and have tried many times but still cannot succeed

2943102883 avatar Oct 19 '23 09:10 2943102883

To me modular install mojo command gives below error,

modular: error: http error: failed to reach URL https://packages.modular.com/mojo/1.root.json with cURL error Problem with the SSL CA cert (path? access rights?) - 

Modular version: modular 0.2.1 (5144fffe)

sithumonline avatar Oct 20 '23 02:10 sithumonline

I'm on MacOS and when I tried running modular install mojo I was getting the error modular: error: http error: failed to reach URL https://packages.modular.com/mojo/1.root.json with cURL error Couldn't resolve host name.

Even though dig packages.modular.com was returning the IP for this hostname.

Running sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder fixed the issue, afterwards the installation worked.

filippo-orru avatar Apr 21 '24 12:04 filippo-orru