• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Intermittent 502 bad gateway on websites when opening passive FTP ports.

helpchrisplz

Basic Pleskian
Hi we have customers who always ask why they can't connect to FTP and i always have to tell them how to setup their filezilla to use active in the settings instead of the passive default.

When researching how to get it to work on the default passive settings i found some instructions online to open the ports on the plesk firewall and set these ports in the /etc/proftpd.conf then restarting xinetd

These are the instructions that i followed:
Enable passive mode for FTP in Plesk Panel

This actually worked and customers could connect to the ftp over the default passive ports but we started to notice that we had a lot of intermittent 502 bad gateways when people are loading any of the domains on plesk. It was happening every 1 in 15 webpage reloads. So we ended up undoing what we had done with the passive ports and it stopped the 502 errors.

What i would like to ask is:
Why did this cause this problem?
Was there anything else we could have done differently?

We do host over 150 sites from the same server but our server is not overloaded:

From plesk health monitor:
Real memory usage7.6% used(4.76 GB of 62.8 GB)

Cpu Total usage11.2%
But it does list apache as 40%

Thanks.

Sent from my SM-G930F using Tapatalk
 
Hi helpchrisplz,

but we started to notice that we had a lot of intermittent 502 bad gateways when people are loading any of the domains on plesk. It was happening every 1 in 15 webpage reloads. So we ended up undoing what we had done with the passive ports and it stopped the 502 errors.
Could you pls. explain, why the service "xinetd" and it's configuration should be related to the webserver services ( apache and/or nginx ) ?
Or/and why the firewall settings at port 20/21 should be related to "502" errors at port 80/443 - 7080/7081 ?


Or did I misunderstood your statement
we had a lot of intermittent 502 bad gateways when people are loading any of the domains on plesk
... and you experience "502" errors at your Plesk Control Panel?
 
Hi i was guessingthat the ports might be allocated for ftp and that would make less available for web traffic? I didn't notice if the the plesk backend was showing 502s as i didn't load plesk dashboard pages that much when the issue occurred. The occurrence of the 502s was spotted by one of our customers who has web hosting with us and he has an eager eye as he has a very lucrative woocommerce shop. The i also noticed it happening across a lot of the other sites we host.

Sent from my SM-G930F using Tapatalk
 
Sorry about the spelling mistakes. I'm supposed to be on holiday and i only have my phone with me and the predictive text is getting in the way!

Sent from my SM-G930F using Tapatalk
 
Hi helpchrisplz,

pls. note that "502" ( Bad gateway ) issues/errors/problems can have a lot of root causes ( consider to have a look at the search results at the Plesk Knowledge Base: => Plesk Help Center ), which are all not related to your "xinetd" - configuration or your firewall settings at port 20/21. ;)
 
Thanks but the 502s happend for a complete day until we undone what we did with the passive ports. Im not sure how those search results could help as the problem had already been fixed by reverting what we did with the passive ports. The reason i posted this was to hope that there might be a known reason.

Sent from my SM-G930F using Tapatalk
 
Thanks but the 502s happend for a complete day until we undone what we did with the passive ports. Im not sure how those search results could help as the problem had already been fixed by reverting what we did with the passive ports. The reason i posted this was to hope that there might be a known reason.

Sent from my SM-G930F using Tapatalk
Ok sorry for my stubbornness i have now found out that it was the server backups using pigz command. Our backups are getting up to 230GB so they take ages to complete and while the backups are ongoing it seems to be using a lot if resources and it causes the 502 errors.

Sent from my SM-G930F using Tapatalk
 
Back
Top