Problems connecting to sites on the same server - Couldn't connect to host

I have a multisite setup and have just upgraded to Wordpress 3.6. I saw a notice at the top of the admin page that says I needed to do a network upgrade. I went to the page, clicked the "Upgrade Network" button and I receive the following error message:

Your server may not be able to connect to sites running on it. Error message: couldn't connect to host.

I am also having issues with the YOURLS plugin (http://wordpress.org/plugins/yourls-wordpress-to-twitter/) when it tries to locate the config.php file locally on the same webserver. When I try to locate it directly using a URL it also fails.

These 2 issues seem to point to some kind of issue connecting to sites on the same server, but I have no idea where to start looking for a solution.

If you need any more information then please let me know.

Many thanks,
James

  • landauforte

    Hi Jack

    Thanks for your quick reply. I wondered if there would be a name for it. I have contacted my hosts (UKFAST) but it's difficult to describe the issue without knowing exactly what's going on.

    I don't suppose you know if they disable it by default by any chance? Long shot I know :slight_smile:

    Could you briefly explain what a loopback HTTP connection is and how it works in the world of Wordpress? If I can understand what's going on I can maybe speak more confidently to my hosts about the issue.

    Many thanks,
    James

  • Jack Kitterhing

    Hi there James,

    I'm not sure and can't find if they disable it by default, though if it's shared hosting they should and most likely have :slight_smile:

    Sure, Loopback connections are when the the site tries to make http connections to the same server as the site is on- 'looping-back' on itself. These are an easy way for a malicious user to take down a webserver

    So it basically loops back on itself to upgrade each website on a multisite install, if that makes sense?

    Thank you!

    Kind Regards
    Jack.

  • landauforte

    Hi again Jack

    I've had an odd reply from my hosts which I don't understand (perhaps he fell on the keyboard!). I'll see if I can get to the bottom of it though.

    You mentioned though that it's an easy way for malicious users to take down the webserver. Is it advisable to leave this turned off then? From what I can tell Wordpress requires loopback connections to run it's cron process and perform scheduling (along with automatic upgrades of the multisite sites). I know there are ways around it using alternative cron, but I'd prefer not to use this method.

    Is there anywhere I can read up on the security implications of HTTP loopback connections?

    Thanks again for your help.

    James

  • Jack Kitterhing

    Hi James,

    I hope you are well today.

    I've had an odd reply from my hosts which I don't understand (perhaps he fell on the keyboard!). I'll see if I can get to the bottom of it though.

    If you'd like to send me his reply to contact(at)wpmudev.org with the subject line Attn: Jack Kitterhing and I'd be happy to take a look for you :slight_smile:

    I've been looking for an article for you, but unfortunately there doesn't appear to be one!

    It's quite insecure on a shared hosting environment, where a loopback connection can cause a security issue with the connections on a shared hosting, it's more secure on a dedicated hosting, where it can be correctly secured and doesn't risk bringing down other sites on the hosting.

    This is the most common reason a shared host disables it, due to the risk to other sites.

    You are correct that is is required by WordPress to run the cron process and upgrades etc.

    Many sites do have it enabled, it's mostly disabled on some shared hosting :slight_smile:

    Thank you!

    Kind Regards
    Jack.

  • landauforte

    Hi Jack

    I'll send the email over in a few minutes. I suspect they think I'm talking about something completely different...

    Thanks for the info. I own and run the dedicated server so I suspect enabling HTTP loopback connections won't cause an issue as I will be in control of all the sites on there.

    I've read an article recently on this and they mentioned (particularly on Multisites) that to enable the loopback you can add the site URL to the hosts file. I did this and it seemed to work and I managed to get the sites upgraded successfully. Is this how it should be enabled or is it better to do it via the firewall?

    Thanks again for your help.

    James

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.