504 gateway timeout

So - I made no changes to my box, but now, roundcube cannot connect - it times out with a 504 gateway timeout.

Mail log shows this under imap-login…
TLS handshaking: SSL_accept() syscall failed: Success, session=

Seems to be a TLS issue? Any thoughts on where to explore a solution?

Are you able to load Roundcube from a different browser or device?

No - doesn’t work in any other browswers/devices.

It seems to be a TLS issue - I have another service that cannot connect via SMTP… but, Thunderbird works just fine…

Still trying to dig into this…

What do you see when you login to the main MIAB admin page?

Admin is fine. The issue is not nginx, it’s an IMAP error on connection.

Still haven’t figured it out. Can connect fine via Thunderbird… Seems to be if the connection is local that’s it’s failing… ie, roundcubeand I have another app that can’t reach it via the internal network.

Just out of curiosity, did you happen to inadvertently install apache?

If not, what the the nginx logs showing when you try to access roundcube?

Let’s focus on clearing the 504 error first, then we can sort the IMAP.

So, it like like apache is installed… I’m not sure how perhaps in an apt update? Very strange, but they might be the issue. I should be safe to remove it?

Yup, Remove that, then restart nginx.

Let’s see what happens from there.

It SHOULDN’T install with a standard apt update/upgrade with MIAB, but if you have other applications that have it as a dependency running on your server, those apps might have done it.

Ok - so, in the end Apache was not installed - I was searching on another system in error. SO, I’m still at square one.

504 Gateway Time-out

When logging in via roundcube. When I search logs - it’s the TLS handshaking: SSL(accept() syscall failed…

If you’re seeing a 504 on a web call, you need to be looking at the nginx logs, not the mail logs.
What does tail /var/log/nginx/error.log show you?

Thanks for the help. This has been solved. As it turns out, it was a provider issue - they made an error in their MTU settings, making them too small, so it was creating delays, and everything was timing out.

Overall a day lost trying to figure out what I did wrong! Next time, I’m going to ask the provider first if they are experiencing any issues! Lesson learned!

I really appreciate your help.

1 Like

Geez, I was just reading about this the other day. It is actually a somewhat common problem that can also be a local ISP, not the hosting ISP, which can also create some problems. Apparently some really old and paranoid admins make their MTU yet lower than most, but that’s around where I stopped reading.

This topic was automatically closed 40 days after the last reply. New replies are no longer allowed.