Support

Akeeba Backup for Joomla!

#41282 Cannot update: No HTTP response received

Posted in ‘Akeeba Backup for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
5.2.0
PHP version
8.3.10
Akeeba Backup version
9.9.6

Latest post by nicholas on Sunday, 03 November 2024 09:09 CST

webfeuerflo

EXTREMELY IMPORTANT: Please attach a ZIP file containing your Akeeba Backup log file in order for us to help you with any backup or restoration issue. If the file is over 10MiB, please upload it on your server and post a link to it.

I cannot update Akeeba Backup and Admin Tools from the Joomla backend, I only get this error: No HTTP response received

When I manually download the file with the link provided (containing the dlid) it works. 

How can I fix the update process?

nicholas
Akeeba Staff
Manager

You need to contact your host. This message means that your site tries to access the URL (with the dlid), but PHP gets no response back. Since you've already established the URL works, the only reasonable conclusion is that something on your host's side is blocking the response.

I can tell you that in pretty much every case like this the problem has been a misconfigured transparent HTTP proxy used by the host. 

Transparent HTTP proxies automatically handle all HTTP requests made by anything running on the server – including your site, and its core or extensions update code. From the host's point of view it makes sense. Most of these HTTP requests are duplicated across several sites. It makes no sense doing the same request over, and over, and paying for the bandwidth to do so when you can cache their results and deliver them faster. However, a misconfiguration of this transparent proxy may result in some circumstances in the proxy caching the wrong data, or no data at all. For example, if the caching does not take into account request parameters, if POST requests are cached, or if requests with an HTTP status other than 2xx are cached (all of which violate the RFCs governing how proxies should work) you end up with invalid or no data cached. On top of that, it is possible that the proxy fails outright to provide a response back to the initiating programme (PHP in this case). This is not idle speculation. I have both troubleshoot these issues, and reproduced them in the lab (using Squid Proxy enforced transparently with iptables, like many hosts do – this method also works with Varnish and other caches). The good news is that the host can easily fix that once you tell them what your problem is.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

webfeuerflo

I can open the XML with Curl on the server with ssh. the hosting support told me the problem is not on their side. I don't know who's right...

nicholas
Akeeba Staff
Manager

The XML file is the update information, hosted on Amazon CloudFront CDN. We already know that you can load that; that's why you can see the update to begin with.

The XML update information file, however, IS NOT the update package. It points to the update package which, as you already know, is a different URL on our site which is behind CloudFlare CDN. This is important for them to know, as it has implications about DNS resolution which might be important depending on their server configuration.

I would recommend asking them to escalate the issue to someone who actually knows what they are doing.

And since you're wondering if you can trust me over your host, yes, you can. I wrote the code in Joomla which retrieves the update package, back in 2012. I have troubleshot these connectivity issues very thoroughly over the years. In my previous reply I even told you how I've simulated this exact failure mode in a lab setting. In case the significance of that escapes you: this requires troubleshooting the issue, identifying the problem, understanding it to minute detail, and only then can you create a configuration to reproduce it. I've been doing server management for over two decades, and maintaining our backup software –which requires a deep understanding of server internals to pull off– the last 18 years. I will also tell you that my expertise is contained within the host/VM; I don't do network routing, VM migration, etc. But that's okay, because I don't run a hosting service, I am here to help with the application and that only requires me to be an expert in the application and its execution environment up to and including the server (host) environment everything runs in. I hope that helps you understand better where I come from and why I know what I'm talking about.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

webfeuerflo

Sorry, I didn't mean to offend you, I know about you and your role in the joomla universe. I just wrote my hoster again

nicholas
Akeeba Staff
Manager

No, no, no offense taken! I just wanted to clarify who I am because I don't think I am anywhere near as important for people to magically know who I am and what I spend my time on – and that's perfectly okay. If you know who I am, no problem, you already had all the info to make an informed decision, ignore the last paragraph of my previous reply :)

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

webfeuerflo

The support from the hoster told me they have no restriction and were able to get the file with WGET on the server... what else can I tell them?

nicholas
Akeeba Staff
Manager

First of all, make sure that Joomla! does indeed see the correct version being available: 9.9.9. If you see a different version, go to System, Update, Extensions and click on Check For Updates.

If you do see version 9.9.9 and get the error you mentioned, note that it comes from the file libraries/src/Http/Transport/CurlTransport.php line 177. This happens when the PHP cURL extension's curl_exec() function returns an empty string, but it does not report any error message through curl_error().

Why could that be, when they can fetch the URL from the same server with wget? Well, there are a few differences.

First of all, have you accidentally set up a proxy on your site (System, Global Configuration, Server, Enable Outbound Proxy), or maybe need to set one up but have not? It's easy to check if you have set one up, and the host can tell you if you should set one up (and what the settings would be).

The second difference is the timeout. Since Joomla! runs on the web it sets a limited timeout during which the entire file needs to be downloaded. It is hard-coded to 20 seconds. When the host downloaded the file, did they time the time it took? If it took more than 20 seconds, there's your problem.

The third difference si taht Joomla! uses a special User-Agent string (Joomla). While this is a valid User-Agent as per RFC 7231 §5.5.3, it is unusual in that it has no version part, i.e. it's NOT something like Joomla/1.2.3. We DO allow that on OUR server, but transparent proxies might choke at this kind of valid but unusual User-Agent strings. It's rare, I've seen it though, so I ought to discuss it.

Finally, here's a bit of esoteric knowledge which might be the key. Joomla! sends the HTTP header Expect: header for all requests, not just POST, but also GET. This might be very relevant indeed, because the purpose of this header is to tell the server to send an HTTP 100 Continue with an empty response body before continuing processing the request. However, this could lead to a proxy server seeing the HTTP 100 Continue response and return that as-is ignoring the rest of the request. This would indeed result in Joomla! receiving an empty message body, with an HTTP header that's NOT a redirection or error code. This would indeed cause the condition in line 170 to be true, and the condition in line 173 to be true as well, leading to the perplexing message from line 175. Of course the problem is not really in Joomla! itself, but the fact that a proxy cocked up and treated an HTTP 100 Continue as the final response to be forwarded to the client. If I recall correctly, Squid does that, even though it's not supposed to. We've seen that a few times with some third party remote storage services which rely on HTTP 1xx messages to convey status during file upload. This is not the kind of situation I would expect any host technician to troubleshoot themselves.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

webfeuerflo

I forwarded them your answer and the told me that they have no proxy configured or anything that would prevent a download. 

They said I should try and add this to my htaccess:

 

RequestHeader unset Range Header always set Cache-Control: s-maxage=0 <IfModule mod_headers.c> Header set Cache-Control "no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires 0 </IfModule> <FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|mp3|mp4|png|pdf|swf|txt)$"> <IfModule mod_expires.c> ExpiresActive Off </IfModule> <IfModule mod_headers.c> FileETag None Header unset ETag Header unset Pragma Header unset Cache-Control Header unset Last-Modified Header set Pragma "no-cache" Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT" </IfModule> </FilesMatch>

nicholas
Akeeba Staff
Manager

Are they sure they know what they are doing? What on Earth would the .htaccess ON YOUR SITE have to do with a request made to a completely different site?!

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

webfeuerflo

I am beginning to doubt they know what they are doing

webfeuerflo

I switched my PHP from 8.3 to 8.2 and now the update works!!

nicholas
Akeeba Staff
Manager

I know exactly what the problem is, and they should've caught it before deploying this PHP version. Hint for them: different PHP versions are linked against different libcurl versions, of which the support tech tested none.

Unfortunately, this leaves us with only one possible recommendation for you: Move your site to a competent host.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

webfeuerflo

They said they tested the download of the update file with libcurl und PHP8.3 and had no problems downloading it...

nicholas
Akeeba Staff
Manager

Then they can tell us exactly how they step-debugged Joomla's code and why the download from Joomla! fails. Because, according to what they said, it's not a problem with our server, it's not a problem with their server, so it would have to be a problem with Joomla – which they also now say it's not.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!