Author Topic: Cloudflare 524 Error with Roudcube  (Read 1406 times)

Offline peaceharbor

  • Newbie
  • *
  • Posts: 3
    • Peace Harbor Companies
Cloudflare 524 Error with Roudcube
« on: May 04, 2024, 11:51:03 AM »
There is an issue between the Cloudflare DNS proxy of the webmail record (either A or CNAME) and accessing the Roundcube Inbox directly. When trying to reach a client's mailbox via https://webmail.domain.com, the page will load with SSL as it should. Whenever you try to log in, the page will try to load until it eventually gives a Cloudflare 524 timeout.

If you just set up a new mailbox account and log in for the first time, you can access the mail account configuration page, but once you try to enter the Roundcube mailbox, you will encounter the same issue as above.

On the other hand, if accessing the same mail account through WHM, which is not proxied via Cloudflare, Roundcube loads without issue. I have spent several days working with the tech team at my data center (LiquidWeb), and they are also seeing the same problem. They have ruled out conflicts except those between Cloudflare and Roundcube playing nicely.

This issue has also reached the Cloudflare forums, but a resolution has yet to be brought to light.

https://community.cloudflare.com/t/roundcube-524-a-timeout-occurred/485616/6
https://community.cloudflare.com/t/webmail-time-out/369911/4
https://community.cloudflare.com/t/mail-timeout-after-activated-cloudflare/325753
https://community.cloudflare.com/t/cpanel-webmail-after-login-does-not-load-and-gives-error-524/523763
https://community.cloudflare.com/t/cpanel-webmail-fatal-error-or-timeout-occurred-while-processing-this-directive/631322

Hopefully, someone at Roundcube can fix this issue, as the only option is to disable the proxy on the A or CNAME record. Here's a short video showing this in further detail that I also sent to my data center. https://share.peaceharbor.com/NQuAdEod

I opened a ticket on Roundcube's Github here: https://github.com/roundcube/roundcubemail/issues/9436

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,893
    • SKaero - Custom Roundcube development
Re: Cloudflare 524 Error with Roudcube
« Reply #1 on: May 05, 2024, 01:43:18 AM »
This isn't a Roundcube issue. I have Roundcube installed behind a Cloudflare DNS proxy and it works fine. I believe this is a cPanel issue, there is a recent thread on there forum indicating that they are aware of a issue and are working to address it: https://support.cpanel.net/hc/en-us/community/posts/23150240197399-RoundCube-Not-Loading

Offline peaceharbor

  • Newbie
  • *
  • Posts: 3
    • Peace Harbor Companies
Re: Cloudflare 524 Error with Roudcube
« Reply #2 on: May 05, 2024, 10:43:29 PM »
Thanks for the insight. This comment made by this user on that thread was particularly interesting: https://support.cpanel.net/hc/en-us/community/posts/23150240197399/comments/23180533983767

Offline MagdAlmuntaser

  • Newbie
  • *
  • Posts: 3
Re: Cloudflare 524 Error with Roudcube
« Reply #3 on: May 06, 2024, 10:58:24 PM »
Alright, I've solved the problem, and indeed it was caused by Roundcube. I performed a downgrade of Roundcube from version 1.6.6 to 1.6.0, and the issue was resolved.

Here's how I did it:
I navigated to the following path:

Code: [Select]
/usr/local/cpanel/base/3rdparty
and renamed the Roundcube folder to roundcube_bak. Then, I pulled files from another website for Roundcube version 1.6.0 and uploaded them to the same path on my server.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,893
    • SKaero - Custom Roundcube development
Re: Cloudflare 524 Error with Roudcube
« Reply #4 on: May 07, 2024, 12:14:27 AM »
I have a installation of Roundcube 1.6.6 behind a Cloudflare proxy and it works fine. I'm guessing it is aa issue with the cPanel customizations or web server config that is causing the problem.

Offline MagdAlmuntaser

  • Newbie
  • *
  • Posts: 3
Re: Cloudflare 524 Error with Roudcube
« Reply #5 on: May 07, 2024, 02:01:46 AM »
I have a installation of Roundcube 1.6.6 behind a Cloudflare proxy and it works fine. I'm guessing it is aa issue with the cPanel customizations or web server config that is causing the problem.

I have 8 dedicated servers, and all the websites hosted on them are experiencing the same issue. Two of these servers were installed just 4 days ago without any modifications to cPanel. I only installed the system, cPanel, and transferred the websites to them without NS or anything only change DNS from cloudflare, yet the same problem.

But I followed the steps I mentioned above and solved the issue on all of my servers.
It's a temporary solution until roundcube and cpanel fix this issue.

Just so you know, when the issue was present, I created a subdomain in Cloudflare for another domain and linked the IP address of the server experiencing the problem. This allowed the webmail to work for me.

Example:
The problem was with this domain, "webmail.server1.com."
I added a subdomain on the domain "test.server2.com" and linked the IP address of server1 to the subdomain "test.server2."
This made the webmail work for me.
« Last Edit: May 07, 2024, 02:08:48 AM by MagdAlmuntaser »

Offline peaceharbor

  • Newbie
  • *
  • Posts: 3
    • Peace Harbor Companies
Re: Cloudflare 524 Error with Roudcube
« Reply #6 on: May 07, 2024, 09:48:07 AM »
I posted this issue on Roundcubes Git as well, and someone there posted this: https://github.com/roundcube/roundcubemail/issues/9436#issuecomment-2097345467
It seems like the latest version of Roundcube is the culprit.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,862
Re: Cloudflare 524 Error with Roudcube
« Reply #7 on: May 07, 2024, 03:08:12 PM »
A similar comment was posted earlier in this thread. I do not use cPanel or Cloudflare. Based on posts about other cPanel powered systems I believe cPanel adds their own plugins like cpanellogin and cpanellogout for example to the Roundcube. The suggested "fix" would, I guess, remove the cPanel plugins from the application as it says Roundcube was installed from source rather than through cPanel. So my question is, have you tested a 1.6.6 install of Roundcube without the cPanel plugins?
« Last Edit: May 07, 2024, 03:52:47 PM by JohnDoh »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline MagdAlmuntaser

  • Newbie
  • *
  • Posts: 3
Re: Cloudflare 524 Error with Roudcube
« Reply #8 on: May 07, 2024, 05:36:20 PM »
I posted this issue on Roundcubes Git as well, and someone there posted this: https://github.com/roundcube/roundcubemail/issues/9436#issuecomment-2097345467
It seems like the latest version of Roundcube is the culprit.

yah it's me ..Yes, the issue is from Roundcube

A similar comment was posted earlier in this thread. I do not use cPanel or Cloudflare. Based on posts about other cPanel powered systems I believe cPanel adds their own plugins like cpanellogin and cpanellogout for example to the Roundcube. The suggested "fix" would, I guess, remove the cPanel plugins from the application as it says Roundcube was installed from source rather than through cPanel. So my question is, have you tested a 1.6.6 install of Roundcube without the cPanel plugins?

I took the files from another website that also uses cPanel because I know cPanel has additional files within Roundcube. That's why I pulled an older version of Roundcube from a website using cPanel.
you can download my files to try it ..
https://github.com/roundcube/roundcubemail/files/15241442/roundcube.tar.gz
« Last Edit: May 07, 2024, 05:55:40 PM by MagdAlmuntaser »