504 Gateway timeout when logging into RoundCube - Murgero?

Hi!

I’m experiencing a 504 error after an upgrade to version 0.29, but only for one mailbox out of nine.
All other users (many connected to the same domain) login immediately, and run fine.

Anyone have any suggestion to what may be the problem, and how I can solve it?

Let me ask you on the 9 email accounts did you use the calendar or contacts function on any of them or perhaps ONLY on the one that you cannot log in to?

1 Like

I did only import contacts to that one account, does that count as “using the contacts function”?

You had commented that you upgraded from an older version (v0.16?) to the current version (v0.29) is that correct? If so, I have a theory - and it is just a theory. One that I do not know the proper way to fix but one that I may have a kludge to fix.

If you did indeed upgrade from v0.16 to v0.29 there was a major change in v0.23 in where the contact manager was switched from OwnCloud to NextCloud. So it is important to ask when/where did you import the contacts? As that may be the culprit.

1 Like

Yes that is correct, I was able to seamlessly upgrade from v0.16 to v0.29 with this only problem, which is amazing in itself.
I simply imported contacts via roundcube.

When? Before the upgrade? After the upgrade? and imported the contacts from where?

1 Like

I imported contacts before the upgrade, from a gmail export file, if I remember correctly.

If you go to the admin area there should be a menu bar across the top and one of the menu items should be Contacts/Calendar. On that page it will give two links to access the contact and the calendar. What happens if you click those links? I get a 404 error on your site. I would expect the same for you.

Did you actively use OwnCloud before? I am guessing no, that you only used the contacts within Roundcube … if that is so, and you are brave we can try my kludge - warning, no warranty. I think that the overriding issue here is that the contacts in the database are incompatible in some way … that is the one difference between the email account you cannot log in to and the other 8.

1 Like

I only used contacts through roundcube, never logged into owncloud.
But I was able to access nextcloud through the link provided on the Contacts/Calendar page (no 404).

I was able to login via the problematic account username and password, and see that it’s empty.

I’m OK with trying a possible solution!

The theory is a pretty good one, because that is the only difference between this one account vs the others

Just curious … have you rebooted at all at any time since the upgrade? If you have not, DON’T until you have secured an off-site backup of your data … this has gone too well so far - good luck always runs out at some point.

Once you have an offsite backup of your /home/user-data/backup/encrypted directory and your secret key file you can try to reboot if you desire. If that will change anything - I do not know. The proposed fix is to remove the email account in the admin area, by clicking on ‘archive account’ on the Mail>Users page and then to add the account back again on the same page. If that user is an admin account be sure that it is not the only admin account first.

Please note that due to things that are way beyond my knowledge level things MAY fail. If that happens you will need to reinstall everything from scratch. I expect that the chance of this happening is very low, but want you to be prepared for the worst case scenario.

1 Like

I have rebooted since the upgrade…no problems.
The server’s hosted at DigitalOcean, where I did make a snapshot (backup) to revert to if anything goes wrong.

I’m taking a snapshot at the moment to save the current state.

After the snapshot has been created I’ll try the method you proposed.

IT WORKED!!!

:partying_face:

I’m super-happy this worked out!!!

Thank you so much @alento !

1 Like

Now that you’ve opened my eyes to ownCloud, I’m trying to use it, but for some reason contacts that I add in the ownCloud admin don’t show up in roundcube. This goes for other accounts too, not only the one I previously had the problem with.
Furthermore the account that I had the 504 error with now has 6 ownCloud(Contacts) folders, but they are all empty, even though I created contacts in Nextcloud

roundcube_owncloudx6

I have outlived my usefulness … I do not use Own/NextCloud nor do I know anything about either really.
There is one thing that I am confused about … when you accessed https://box.dobom.website/contacts you accessed NextCloud, no? Not OwnCloud.
@murgero may be able to help you from here as he is much more familiar with this aspect of MiaB.

The correct link is:
https://box.dobom.website/cloud/contacts

And yes, I accessed Nextcloud, that’s true…
Maybe fresh installations of miab have nextcloud contacts folders in roundcube?
Thanks for suggesting a possible helper in the issue!

Heh, no wonder I couldn’t access it … I told ya I don’t ever use it. :blush:

So the question I have that maybe someone else can answer is why you have OwnCloud contacts in your Roundcube ??

1 Like

As @murgero had suggested, I restarted php-fpm and nginx, I noticed that on my end it was php8.0-fpm that is being used and not php-fpm.
So I ran sudo systemctl restart php8.0-fpm and also sudo systemctl restart nginx , plus also restarted the mailinabox service: sudo systemctl restart mailinabox
Dovecot: service dovecot restart
Postgrey: service postgrey restart
Postfix: service postfix restart
And I made sure I was accessing roundcube by using the url https://box.mydomain.com/mail to log in
NB: You can use another email client like Thuhderbird to access your emails if you are still getting the error.

I rebooted the whole machine so all the services got restarted, but it didn’t solve the issue… :\