Akismet Can't Connect to Server

  • Posted September 9, 2014

Akismet is reporting “We can’t connect to your site. Your firewall may be blocking us. Please contact your host and refer to our guide about firewalls.” This started a couple weeks ago.

When I type sudo ufw status, it says sudo: ufw: command not found.

When I type iptables -L, it says

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

which I guess means I don’t have any rules. Akismet says in their docs that they need a TCP connection. I don’t know how to give them that. I also don’t know what changed two weeks ago as it was working fine before that.

What else can I check? Is there a way to ping Akismet through TCP to make sure that’s the issue?

Ubuntu 12.10, Wordpress 4.0, Akismet 3.02



Do you use any DNS services like CloudFlare in your setup? Considering those sit between your DO server and Akismet, it could be preventing seemingly malicious activity. In other words, you can get to Akismet, but Akismet can’t get to you, because it’s being blocked.

Yep. Resinstall, activate, go to the settings page and the key is in the box and the other settings I had (which are not the default) were still there too. Strictness for instance, it remembered, but that’s in the wp_options table, so I get that. If API key is in there, I don’t know where.

Yeah that is rather odd. I will have to take a look at mine and see what happens. Did it put the key right back in automatically (like it was still hanging in the site or databases somewhere) or was it where your browser remembered it?

Just uninstalled and reinstalled with no effect. One reinstalled, it remembered my api key, which I thought was odd. So I uninstalled again and looked around for left over akismet files to delete. There were a few entries in the options table, but not the api key that I could see. Nothing in the plugins folder. I wasn’t too confident about deleting anything else.

So a reinstall didn’t work, but I’m not 100% sure I got all of it removed such that no corruption could remain.

I deactivated/reactivated it, but no joy. I didn’t try deleting it, so maybe that’s a good next step.

I still think this is a PHP, WP, or Akismet issue. Have you tried deactivating akismet and deleting it (delete settings and files), then reinstalling it from scratch? Maybe the akismet plugin was corrupted during the update? Make sure you keep a copy of your akismet key handy so you can put it back in if you remove the plugin.

I guess I’ll go with the ‘corruption’ theory. fsockopen and gethostbyname1 both are available. The wget shows that TCP 80 is open to akismet and I don’t have any firewall rules. If I have to start from scratch, I’ll probably move off DO - too many problems that I can’t solve. But maybe I can repair php in place or something. Thanks for the help on this.

Even though you havent upgraded PHP, is it possible that it has been upgraded in the background? Not saying that yours is or isnt but have seen this happen.

As far Wordpress 4.0 and akismet 3.02, I know they work together because I have these both running on one of my own personal sites. They were upgraded from WP 3.9.2 and akismet 3.01 recently and continue to work ok. It is on a CentOS server though. There are also so many differences between similar servers too though that may cause issues for some while it works fine for others.

That’s very helpful. Thanks. I didn’t know wget used TCP, so I agree it must be a PHP issue. I haven’t upgraded PHP, but I upgrade Wordpress whenever a new one comes out. I don’t think WP upgrades PHP, but I don’t know that for sure.

Not having touched PHP, it has to be a Wordpress issues. But if that were the case, there would be a lot more people complaining that just me.

I’ll get a firewall set up right away.

Yes, wget uses TCP. Dont worry about telnet. Actually if it isnt installed already, dont install it! It is insecure if used for logging in, etc. as it transmits passwords as well as anything else you type in as clear text.

If your site itself is accessible through a browser without having to type a port behind the domain (i.e., then port 80 is not blocked through a firewall. Also considering that you can communicate with akismet through wget, they are also not blocked. With both of these working, it is not a firewall issue. The wget working makes me think it is a PHP configuration issue or something is corrupt. Has PHP been updated or changed somehow around the time you began having issues? Did you do any sort of site update around that time? Is anything else not working correctly?

On a side note, I would recommend getting a firewall setup on your box. While it may be ok to disable it for testing purposes to rule it out as the cause, it is very insecure to leave a box running without one. I have seen brand new boxes at DCs get setup over night and before we got in the next morning (just a couple hours later) they had been compromised.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

As currapps said, it is DNS issue .

Have you tried to check /etc/resolv.conf file configuration? It might be an issue with DNS servers and you can just get timeout for Akismet server.