Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to host: https://godotengine.org/asset-library/api #27864

Closed
APoniatowski opened this issue Apr 9, 2019 · 10 comments
Closed

Can't connect to host: https://godotengine.org/asset-library/api #27864

APoniatowski opened this issue Apr 9, 2019 · 10 comments

Comments

@APoniatowski
Copy link

Godot version:
3.1 stable

OS/device including version:
Manjaro KDE (Latest and up-to-date)

Issue description:
Getting the error when opening the AssetLib tab. I get an error in my console/terminal when clicking search:

ERROR: _get_socket_error: Socket error: 101
At: drivers/unix/net_socket_posix.cpp:199.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:339.
ERROR: _get_socket_error: Socket error: 101
At: drivers/unix/net_socket_posix.cpp:199.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:339.
ERROR: _get_socket_error: Socket error: 101
At: drivers/unix/net_socket_posix.cpp:199.
ERROR: connect_to_host: Connection to remote host failed!
At: drivers/unix/net_socket_posix.cpp:339.

Steps to reproduce:
1 - open godot (via GUI or terminal)
2 - open project
3 - open AssetLib

Minimal reproduction project:

@APoniatowski
Copy link
Author

curl gives me this:

curl https://godotengine.org/asset-library/api

<title>301 Moved Permanently</title>

Moved Permanently

The document has moved here.


Apache Server at godotengine.org Port 443

@Calinou
Copy link
Member

Calinou commented Apr 9, 2019

@APoniatowski This is expected from curl if you contact http://godotengine.org/asset-library/api, since the backend redirects all requests to HTTPS.

Edit: I didn't notice the URL used was HTTPS, so it's due to something else.

Are you using a compiled binary, or have you compiled Godot from source?

@APoniatowski
Copy link
Author

I contacted https :) and wget gives me 404 (it sees the 301 and follows the https)... I wonder if ipv6 might be the problem as it fails to connect, but doubtful though:
wget https://godotengine.org/asset-library/api
--2019-04-09 20:31:06-- https://godotengine.org/asset-library/api
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving godotengine.org (godotengine.org)... 2a02:2178:1000:201::4, 212.85.158.4
Connecting to godotengine.org (godotengine.org)|2a02:2178:1000:201::4|:443... failed: Network is unreachable.
Connecting to godotengine.org (godotengine.org)|212.85.158.4|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://godotengine.org/asset-library/api/ [following]
--2019-04-09 20:31:07-- https://godotengine.org/asset-library/api/
Reusing existing connection to godotengine.org:443.
HTTP request sent, awaiting response... 404 Not Found
2019-04-09 20:31:07 ERROR 404: Not Found.

oh and I'm using the compiled binary. I assume it is better to compile it, right? ;)

@APoniatowski
Copy link
Author

Also downloaded RC3, just to be sure, and still the same result... I'll git clone it later and compile it, to see if I get the same result

@akien-mga
Copy link
Member

CC @bojidar-bg @Faless

@Faless
Copy link
Collaborator

Faless commented Apr 9, 2019

Oh, I see. The user has a broken IPv6 connection and a valid IPv4 connection.
The OS getaddrinfo returns an IPv6 (probably preferred by OS) and then HTTPClient fails.
Connecting to the IPv4 address of the asset lib would work.

The official solution is to use an algorithm called Happy Eyeball (sic!) and a standardized version has even been published as RFC8305 -.- .

This has to be addressed in the HTTPClient, by resolving both IP addresses, connect to both as soon as each address is resolved, and only failing if both resolutions or connections fail.
The first established connection is used, the other closed immediately.

This is also what wget in fact does for the user (see bold):

--2019-04-09 20:31:06-- https://godotengine.org/asset-library/api
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving godotengine.org (godotengine.org)... 2a02:2178:1000:201::4, 212.85.158.4
Connecting to godotengine.org (godotengine.org)|2a02:2178:1000:201::4|:443... failed: Network is unreachable.
Connecting to godotengine.org (godotengine.org)|212.85.158.4|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://godotengine.org/asset-library/api/ [following]
--2019-04-09 20:31:07-- https://godotengine.org/asset-library/api/
Reusing existing connection to godotengine.org:443.
HTTP request sent, awaiting response... 404 Not Found
2019-04-09 20:31:07 ERROR 404: Not Found.

A temporary solution could be to add an editor setting to disable IPv6 resolution completely.

An even more temporary solution for this specific user could be to disable IPv6 system wide.

@APoniatowski
Copy link
Author

APoniatowski commented Apr 10, 2019

I'll try disabling IPv6 in the editor (point and click adventure, maybe?) or (nvm, reread the above comment) disable my DHCPv6 service on my firewall (pfsense), as I was using a tunnel broker (hurricane electric), but it caused problems, so I disabled the IPv6 WAN interface, but not DHCPv6 (splitting IPv4 and IPv6 with my ISP and HE was causing internet instability). So I am waiting for a new ISP to install their line in my house.
I'm not sure what the conditions are for the checks in the editor, if IPv6 should fail && IPv4 succeeds, return fail? this is pure speculation on my end... I haven't looked at the scripts, nor am I currently in the mood to investigate. ;)

@Calinou
Copy link
Member

Calinou commented Aug 18, 2020

Closing in favor of #36418 which has more information about the issue at hand.

@AgSmith95
Copy link

AgSmith95 commented Jan 16, 2023

Hi, I am experiencing this issue on my MacOS right now, but I have my IPV6 disabled

tmp % wget https://godotengine.org/asset-library/api
--2023-01-16 23:48:50--  https://godotengine.org/asset-library/api
Resolving godotengine.org (godotengine.org)... 172.67.193.253, 104.21.36.120
Connecting to godotengine.org (godotengine.org)|172.67.193.253|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://godotengine.org/asset-library/api/ [following]
--2023-01-16 23:48:50--  https://godotengine.org/asset-library/api/
Reusing existing connection to godotengine.org:443.
HTTP request sent, awaiting response... 404 Not Found
2023-01-16 23:48:50 ERROR 404: Not Found.
tmp % curl https://godotengine.org/asset-library/api
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://godotengine.org/asset-library/api/">here</a>.</p>
<hr>
<address>Apache Server at godotengine.org Port 443</address>
</body></html>

@bojidar-bg
Copy link
Contributor

https://godotengine.org/asset-library/api is supposed to 404, so maybe you should test with https://godotengine.org/asset-library/api/configure instead? (: (also, might be worth a new issue, this one is rather old now)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants