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

packages.termux.dev has issues #11007

Closed
Grimler91 opened this issue Jun 17, 2022 Discussed in #10976 · 27 comments
Closed

packages.termux.dev has issues #11007

Grimler91 opened this issue Jun 17, 2022 Discussed in #10976 · 27 comments

Comments

@Grimler91
Copy link
Member

Discussed in #10976

Originally posted by buttaface June 13, 2022
It redirects to packages.termux.dev which is down. Is this planned? packages-cf.termux.dev still works.

@Grimler91
Copy link
Member Author

Grimler91 commented Jun 17, 2022

It's a problem with fosshost's ipv6 -> ipv4 proxy, similar to termux/termux-app#2650. Has been reported to fosshost's support, but haven't heard back yet

@2096779623
Copy link
Member

2096779623 commented Jun 17, 2022

C:\Users\Administrator>nslookup packages.termux.org
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  fe80::1

non-authoritative answer:
Name:    packages.termux.org
Addresses:  2606:4700:3030::6815:1491
          2606:4700:3030::ac43:c121
          172.67.193.33
          104.21.20.145


C:\Users\Administrator>nslookup -type=ns packages.termux.org
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  fe80::1

termux.org
        primary name server = clark.ns.cloudflare.com
        responsible mail addr = dns.cloudflare.com
        serial  = 2280631813
        refresh = 10000 (2 hours 46 mins 40 secs)
        retry   = 2400 (40 mins)
        expire  = 604800 (7 days)
        default TTL = 3600 (1 hour)

In China it redirects normally to packages.termux.dev.

When I manually resolve to fosshost's IP (via hosts) it also jumps fine.

I tested all IPs of #2650 and it works fine.

@Grimler91 Grimler91 changed the title packages.termux.org is down? packages.termux.dev has issues Jun 17, 2022
@Grimler91
Copy link
Member Author

Grimler91 commented Jun 17, 2022

@2096779623 yeah you are right, issue is only with packages.termux.dev (after we enabled proxy'ing by cloudflare for packages.termux.org)

fosshost's proxy has 5 IP addresses, 216.18.208.170 - 216.18.208.174 (see dig packages.termux.dev). For 171 and 172 connection fails, while for the other ones it works fine:

$ curl --resolve "packages.termux.dev:80:216.18.208.171"  http://packages.termux.dev
<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>openresty/1.19.9.1</center>
</body>
</html>
$ curl --resolve "packages.termux.dev:80:216.18.208.170"  http://packages.termux.dev
# success

@Grimler91
Copy link
Member Author

Grimler91 commented Jun 17, 2022

packages.termux.org, packages-cf.termux.org and packages-cf.termux.dev all goes through cloudflares proxy and works, while packages.termux.dev goes straight to fosshost which fails if you are unlucky and it resolves to 216.18.208.171 or 216.18.208.172

@2096779623
Copy link
Member

2096779623 commented Jun 17, 2022

@2096779623 yeah you are right, issue is only with packages.termux.dev (after we enabled proxy'ing by cloudflare I believe)

fosshost's proxy has 5 IP addresses, 216.18.208.170 - 216.18.208.174 (see dig packages.termux.dev). For 171 and 172 connection fails, while for the other ones it works fine:

$ curl --resolve "packages.termux.dev:80:216.18.208.171"  http://packages.termux.dev
<html>
<head><title>500 Internal Server Error</title></head>
<body>
<center><h1>500 Internal Server Error</h1></center>
<hr><center>openresty/1.19.9.1</center>
</body>
</html>
$ curl --resolve "packages.termux.dev:80:216.18.208.170"  http://packages.termux.dev
# success

In fact, all four IPs(216.18.208.170 - 216.18.208.174) have issues.

I tested packages.termux.dev using some site for website speed testing and found that some regions HTTP status code is 500, as you said.

Failed IP List:

  1. 216.18.208.172
    • Chengdu,Sichuan,China
    • Taiyuan,Shanxi,China
    • Shiyan,Hubei,China
    • Dalian,Niaoning,China
    • Baoding,Hebei,China
    • Chengdu,Sichuan,China
    • Shanghai,China
    • Zhenzhou,Henan,China
  2. 216.18.208.171
    • Suqian,Jiangsu,China
    • Hohhot,Inner
    • Mongolia,China
    • Moldova
  3. 216.18.208.173
    • Xian,Shanxi,China
    • Changsha,Hunan,China
    • XinXiang,Henan,China
    • Beijing,China
    • LA,America
    • Frankfurt(AWS), Germany
    • Malaysia
    • Seoul, Korea
    • Turkey
  4. 216.18.208.170
    • Jingyang,Sichuan,China
    • Urumqi,Xinjiang,China
  5. 216.18.208.174
    • Shanghai,China
    • Hangzhou,Zhejiang,China
    • Hefei,Anhui,China
    • Shenzhen(Aliyun),China
    • Mumbai, India
  • List may not be complete.

@2096779623 2096779623 mentioned this issue Jun 18, 2022
Grimler91 added a commit that referenced this issue Jun 18, 2022
Some of the IPs of fosshost's proxy do not work (see
#11007), so stick to using one that we know work
until that is fixed.

Suggested by agnostic-apollo.
agnostic-apollo added a commit that referenced this issue Jun 18, 2022
…ing a working ip address for aptly

Related issue #11007
@agnostic-apollo
Copy link
Member

Have pushed 3b76d37 and a3e68e2 to try to fix package upload issue.

@Grimler91
Copy link
Member Author

Should probably revert my attempt to fix it then ;)

@agnostic-apollo
Copy link
Member

I am probably starting to go blind I guess ;)

@Grimler91
Copy link
Member Author

Ooor I should communicate more :)

@agnostic-apollo
Copy link
Member

Lolz.

Why did you revert bc9834d in d090e21 instead of 1615ccc?

@Grimler91
Copy link
Member Author

Yeah, good question. git log'ed .github/ to find my previous commit, instead of scripts/. I need glasses I guess

@agnostic-apollo
Copy link
Member

Ah, thanks for fixing.

I need glasses I guess

Well, they didn't help me ;)

@Dawimpy

This comment was marked as outdated.

@2096779623
Copy link
Member

2096779623 commented Jun 19, 2022

Maybe you're lucky! But the speed test website gives different results:
image

@Dawimpy
Copy link
Contributor

Dawimpy commented Jun 19, 2022

I using curl... But when I use chrome, none of all working... :(

@Dawimpy
Copy link
Contributor

Dawimpy commented Jun 19, 2022

Maybe you're lucky! But the speed test website gives different results:
image

By the way, what tool is it? Want to check it out

@2096779623

This comment was marked as off-topic.

@Dawimpy

This comment was marked as outdated.

@2096779623

This comment was marked as outdated.

@Dawimpy

This comment was marked as outdated.

@2096779623
Copy link
Member

2096779623 commented Jun 21, 2022

@Grimler91 All package upload failed now:

Checking packages.termux.dev ip access
success: 216.18.208.1[72](https://github.com/termux/termux-packages/runs/6972289827?check_suite_focus=true#step:4:73)
[18:20:45]: Failed to upload 'debs/cloudflared_2022.6.3_aarch64.deb'. Server/proxy dropped connection during upload.
[18:20:45]: Aborting any further uploads to this repo.
[18:20:45] Deleting uploads temporary directory...
[18:20:45] Warning: server returned 000 code while deleting temporary directory.
Error: Process completed with exit code 1.

@Grimler91
Copy link
Member Author

Yeah, it fails occasionally, re-running the failed job usually works

@peerau
Copy link

peerau commented Jul 2, 2022

This should be resolved on fosshost's side.

@agnostic-apollo
Copy link
Member

@peerau Thanks a lot. Seems to be working fine now. I assume it was ngninx map hash table size issue as per fosshostorg/aarch64@5017bab5 and fosshostorg/aarch64@9eea9541?

http://nginx.org/en/docs/http/ngx_http_map_module.html
http://nginx.org/en/docs/stream/ngx_stream_map_module.html
http://nginx.org/en/docs/hash.html

REPOSITORY_URL="https://packages.termux.dev"
REPOSITORY_DOMAIN="$(echo "$REPOSITORY_URL" | cut -d'/' -f3)"
for ip in $(dig -t a +short "$REPOSITORY_DOMAIN" | sed '1d'); do
    if [ $(curl -s -o /dev/null -w "%{http_code}" --resolve "$REPOSITORY_DOMAIN:80:$ip" "http://$REPOSITORY_DOMAIN") = "200" ]; then
        echo "success: $ip"
    else
        echo "failed: $ip" 
    fi
done
success: 216.18.208.171
success: 216.18.208.172
success: 216.18.208.174
success: 216.18.208.173
success: 216.18.208.170

@peerau
Copy link

peerau commented Jul 2, 2022

Correct - apologies are in order, I have been sick the past few weeks and wasn't able to push it :(

@agnostic-apollo
Copy link
Member

No apologies necessary, health should be a priority. Hopefully, you are better now :)

@Grimler91
Copy link
Member Author

Great, thanks @peerau! Works in my tests as well, so I think we can close this

Grimler91 added a commit that referenced this issue Jul 2, 2022
Grimler91 added a commit that referenced this issue Jul 2, 2022
Grimler91 added a commit that referenced this issue Jul 2, 2022
Instead of termux.org.  This is done now that website is confirmed to
fully work (see #11007).
agnostic-apollo pushed a commit to termux/termux-tools that referenced this issue Aug 1, 2022
agnostic-apollo pushed a commit to termux/termux-tools that referenced this issue Aug 1, 2022
agnostic-apollo pushed a commit to termux/termux-tools that referenced this issue Aug 1, 2022
agnostic-apollo pushed a commit to termux/termux-tools that referenced this issue Aug 1, 2022
Grimler91 added a commit to termux/termux-tools that referenced this issue Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants