SDRausty / TermuxArch

You can use setupTermuxArch.bash 📲 to install Arch Linux in Amazon, Android, Chromebook and Windows. https://sdrausty.github.io/TermuxArch/docs/install
https://sdrausty.github.io/TermuxArch/
Other
1.4k stars 162 forks source link

Name Resolution fail #291

Closed broetchenrackete36 closed 2 years ago

broetchenrackete36 commented 2 years ago

For some reason I can't resolve URLs anymore. Pinging an IP address works fine, but pinging an URL doesn't work

root00:51~$ ping google.com
ping: google.com: Temporary failure in name resolution
root00:52~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=112 time=25.6 ms

Not sure when this problem started to appear, it could be after i upgraded from android 11 to 12?

It's also only a problem in arch, works fine in termux itself.

github-actions[bot] commented 2 years ago

Thank you for contributing to make this project better😎 Keep up and follow to solve this issue.

SDRausty commented 2 years ago

Temporary failure in

Please try ping 1.1.1.1 and share your output? What is the VERSIONID that you are using?

broetchenrackete36 commented 2 years ago

pinging 1.1.1.1 works like 8.8.8.8 worked. VERSIONID should be 2.0.1372 (i don't have the setupscript anymore but that's what i found in the setuptermuxarchsysinfo log).

SDRausty commented 2 years ago

TY command -v ping output please

SDRausty commented 2 years ago

/system/bin/ping 1.1.1.1 ditto

broetchenrackete36 commented 2 years ago
root06:17~$ command -v ping
/usr/bin/ping
root06:17~$ /system/bin/ping 1.1.1.1
bash: /system/bin/ping: No such file or directory
root06:18~$ ls /
apex  dev   linkerconfig  root    srv        tmp
bin   etc   mnt           run     startarch  usr
boot  home  opt           sbin    storage    var
data  lib   proc          sdcard  sys        vendor  
root06:18~$ /bin/ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=56 time=25.2 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=56 time=51.7 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=56 time=54.8 ms
64 bytes from 1.1.1.1: icmp_seq=4 ttl=56 time=56.4 ms
64 bytes from 1.1.1.1: icmp_seq=5 ttl=56 time=69.8 ms
^C
--- 1.1.1.1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4010ms
rtt min/avg/max/mdev = 25.241/51.590/69.819/14.559 ms
root06:18~$ /bin/ping google.com
/bin/ping: google.com: Temporary failure in name resolution
root06:18~$ dig google.com

; <<>> DiG 9.16.25 <<>> google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45524
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             44      IN      A       142.251.37.14

;; Query time: 64 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Feb 03 06:19:05 CET 2022
;; MSG SIZE  rcvd: 55

root06:19~$ curl google.com
curl: (6) Could not resolve host: google.com

I don't think it's a problem with ping, curl can't resolve hostnames and yay neither. I managed to install dig and curiously it reaches my DNS Server without problems...

SDRausty commented 2 years ago

The command ping is working correctly as far as I can see; @broetchenrackete36 a new command is made called pinghelp with the latest commits to help users out with ping; Can you test ping with this command, and share your results from this brand new pinghelp command after refreshing your system with setupTermuxArch re please?

broetchenrackete36 commented 2 years ago
bluemond06:34~$ pinghelp                                     
/usr/bin/ping                                                
/usr/local/bin/pinghelp: line 55: /system/bin/ping: No such file or directory                                             
Signal received:  Continuing...                              
/usr/local/bin/pinghelp: /data/data/com.termux/files/usr/bin/ping: /data/data/com.termux/files/usr/bin/sh: bad interpreter: No such file or directory                                  
Signal received:  Continuing...                              
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.                 
64 bytes from 1.1.1.1: icmp_seq=1 ttl=56 time=25.9 ms        
64 bytes from 1.1.1.1: icmp_seq=2 ttl=56 time=28.2 ms                                                                     
--- 1.1.1.1 ping statistics ---                              
2 packets transmitted, 2 received, 0% packet loss, time 1003ms                                                            
rtt min/avg/max/mdev = 25.851/27.009/28.168/1.158 ms         
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.                 
64 bytes from 1.1.1.1: icmp_seq=1 ttl=56 time=21.9 ms        
64 bytes from 1.1.1.1: icmp_seq=2 ttl=56 time=37.4 ms                                                                     
--- 1.1.1.1 ping statistics ---                              
2 packets transmitted, 2 received, 0% packet loss, time 1004ms                                                            
rtt min/avg/max/mdev = 21.884/29.644/37.405/7.760 ms         
pinghelp  version 2.0.1476: DONE 🏁                          
bluemond06:34~$ ping google.com                              
ping: google.com: Temporary failure in name resolution
SDRausty commented 2 years ago

Thank you for providing more information:

curl google.com

Try curl -I google.com please; Also see whether searching check network connection in linux in the Internet helps.

SDRausty commented 2 years ago

Screenshot_20220203-061254

SDRausty commented 2 years ago

The Termux packages dnsutils, lynx and strace can be helpful in diagnosing network issues. The command telnet can assist as well.