ping result not returned for some unreachable hosts
See original GitHub issuefrom ping3 import ping
res = ping('10.128.20.30')
print(res)
The code hang there for a very long time and never returns, even I set timeout and count to 2.
But when I try shell command ping
it can return results:
[root@host~]# ping -c 2 10.128.20.30
PING 10.228.94.234 (10.128.20.30) 56(84) bytes of data.
--- 10.128.20.30 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 40ms
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
How to Solve a Destination Host Unreachable Error - Lifewire
Destination host unreachable errors are often caused by a misaligned gateway due to poor internet or cable connections.
Read more >Linksys Official Support - Learning about Ping test
Destination Network / Host unreachable – This means that the host that you are trying to ping is down or is not operating...
Read more >FIX: Ping destination host unreachable but no packet loss
Destination Host Unreachable – this error occurs whenever there's no route between the local system and the destination; Reply from x.x.x.x: ...
Read more >No reply for ping command. What does this mean? - Super User
It means that your ICMP packet (ping) was silently discarded with no response sent. That might happen for several ...
Read more >How can ping know if my host is down - Server Fault
When you get a Reply From [IP address]: 'Destination Host Unreachable,' then the problem occurred at/after a remote router, whose address is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi all,
I think I just fixed this problem. This bug is not related to platform, and I finally reproduced it. This bug occurs when there are a lot of packets passed to your network interface in a short time and in the meantime the pinging destination address timeouts.
Thanks a lot for your helps. Please try the new version (>= 2.4.4) and tell me if this bug is fixed.
Hi,kyan001 I have the same issue,e.g:
OS:CentOS Linux release 7.2.1511 (Core) 3.10.0-327.el7.x86_64 Python:3.7.1