If you try to add an ubuntu PPA using add-apt-repository, e.g.:
sudo add-apt-repository ppa:webupd8team/java
And you get the following error:
[...]  
gpg: keyring `/tmp/tmpG9Z_HY/secring.gpg' created  
gpg: keyring `/tmp/tmpG9Z_HY/pubring.gpg' created  
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com  
?: **keyserver.ubuntu.com: Connection refused**  
gpgkeys: HTTP fetch error 7: couldn't connect: Connection refused  
gpg: no valid OpenPGP data found.  
gpg: Total number processed: 0  
recv failed