Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Resolved] All websites that use Apache (Nginx forwards requests to Apache) show 502 Bad Gateway after upgrade #372

Open
fbroen opened this issue Oct 13, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@fbroen
Copy link

fbroen commented Oct 13, 2024

The upgrade from CentOS 7.9 to AlmaLinux 8 went smoothly. The upgrade tool also did not indicate any problems. After the upgrade was complete, all websites that only used NGINX in proxy mode were no longer accessible. Only the websites that only used NGINX worked.

We have already tried to check for errors and repair them using the Plesk "Diagnostics & Repair" function. No improvement or change could be found here.

We also tried to follow these instructions, which also did not work: https://support.plesk.com/hc/en-us/articles/12377559249559-Site-does-not-work-on-PHP-FPM-handler-on-Plesk-server-503-service-unavailable

We also checked fail2ban. All server IP addresses are on the whitelist. We also deleted/activated all blocked IP addresses again for testing purposes.

Attached are screenshots of the problem and the errors.

I hope there is a quick fix for this. I had to reset the server to a snapshot before the upgrade.

Best regards
Falk

502_bad_gateway_from_all_websites_using_apache_fpm

plesk_domain_logs_connection_refused_nginx

plesk_php_settings_repair

@fbroen fbroen added the bug Something isn't working label Oct 13, 2024
@fbroen
Copy link
Author

fbroen commented Oct 25, 2024

@SandakovMM Do you have any ideas about that problem/bug?

@fbroen fbroen changed the title All websites that use Apache (Nginx forwards requests to Apache) show 502 Bad Gateway after upgrade [Resolved] All websites that use Apache (Nginx forwards requests to Apache) show 502 Bad Gateway after upgrade Oct 27, 2024
@fbroen
Copy link
Author

fbroen commented Oct 27, 2024

@SandakovMM

After another attempt with the migration script 1.4.3, the same error occurred again. Short Solution: Apache Module watchdog was not enabled after Upgrade to AlmaLinux 8.

After careful analysis, I found that the Apache service had not started and was in an error state.

I checked the status of the Apache service on AlmaLinux 8 with the following command:

systemctl status httpd

After this service could not be set to the status "Active: active (running)" even after a restart, I checked the log file:

cat /etc/httpd/logs/error_log

The output provided a clue as to what the problem was:

[Sun Oct 27 20:53:29.495534 2024] [lbmethod_heartbeat:notice] [pid 93807:tid 140021804460352] AH02282: No slotmem from mod_heartmonitor

[Sun Oct 27 20:53:29.617938 2024] [proxy_hcheck:crit] [pid 93807:tid 140021804460352] AH03262: mod_watchdog is required
[Sun Oct 27 20:53:29.618025 2024] [:emerg] [pid 93807:tid 140021804460352] AH00020: Configuration Failed, exiting

After the command to monitor the ports on which Apache must listen also produced no output:

netstat -tunap | grep httpd

I found it on the Internet: https://support.plesk.com/hc/en-us/articles/12377651410839-Unable-to-start-Apache-on-a-Plesk-server-AH02093-mod-watchdog-is-required

After I applied this KB article (Tools & Settings --> Apache Webserver --> check the watchdog box), the problem was solved.

By the way, temporarily disabling and re-enabling nginx reverse proxy didn't help before finding a solution. The problem remained. Nevertheless, this test may be helpful for one or the other, so I am also linking this KB article:

https://support.plesk.com/hc/en-us/articles/12377745816599-How-to-install-and-enable-nginx-reverse-proxy-on-a-Plesk-for-Linux-server

nginx status: /usr/local/psa/admin/sbin/nginxmng --status
temporarily disable nginx: /usr/local/psa/admin/sbin/nginxmng --disable
re-enable nginx: /usr/local/psa/admin/sbin/nginxmng --enable

@SandakovMM
Copy link
Collaborator

Hello @fbroen
I apologize for the delayed response, was occupied with publishing tasks.
Thank you for your thorough investigation! Let's keep this issue open until we add an action to re-enable the watchdog module during conversion, in case someone else face the same problem.

@bugrevealingbme
Copy link

same here. Any solution?

@bugrevealingbme
Copy link

[Fri Jan 03 19:19:19.036427 2025] [lbmethod_heartbeat:notice] [pid 47337:tid 140689681946944] AH02282: No slotmem from mod_heartmonitor
[Fri Jan 03 19:19:19.038807 2025] [proxy_hcheck:crit] [pid 47337:tid 140689681946944] AH03262: mod_watchdog is required
[Fri Jan 03 19:19:19.038816 2025] [:emerg] [pid 47337:tid 140689681946944] AH00020: Configuration Failed, exiting

@bugrevealingbme
Copy link

This trick is worked:

After I applied this KB article (Tools & Settings --> Apache Webserver --> check the watchdog box), the problem was solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants