5 seconds looks like a DNS query timeout. That was for me. Just make sure the hostname of your computer is resolved ip. You can check what ping does:
ping `hostname`
If he resolves the name and starts pinging, your problem is something else. But if you see the message "bad address", this may explain your problem.
To fix this simply, you can simply add your hostname to the /etc/hosts . Just add the hostname at the end of the line, starting with 127.0.0.1. This change should be applied immediately. This may not be the cleanest way to fix this, especially on modern Linux with dhcp and so on. But if that works, you will have a good pointer on how to solve the name resolution problem forever.
source share