bitnami / vms

Bitnami VMs
https://bitnami.com
Other
203 stars 43 forks source link

[<Wordpress>] <AWS EC2 goes down Apache sigkill php fpm not working> #1372

Closed tomie72168 closed 6 months ago

tomie72168 commented 7 months ago

Platform

AWS

bndiagnostic ID know more about bndiagnostic ID

b51b4187-e421-4f91-e546-61e1c4adc1c7

bndiagnostic output

===== Begin of bndiagnostic tool output =====

✓ Resources: No issues found
? Connectivity: Found possible issues
? Mariadb: Found possible issues
✓ Processes: No issues found
? Wordpress: Found possible issues
? Apache: Found possible issues
✓ Php: No issues found

[Connectivity]

Server ports 22, 80 and/or 443 are not publicly accessible. Please check the following guide to open server ports for remote access:

https://docs.bitnami.com/general/faq/administration/use-firewall/

[Mariadb]

Press [Enter] to continue: Found recent error messages in the MariaDB error log:

2024-01-18 15:30:40 1205 [Warning] Aborted connection 1205 to db: 
'bitnami_wordpress' user: 'bn_wordpress' host: '**ip_address**' (Got an error 
reading communication packets)

Please check the following guide to troubleshoot MariaDB issues:

https://docs.bitnami.com/aws/apps/wordpress/troubleshooting/debug-errors-m ariadb/

[Wordpress]

Found recent WordPress plugin related error messages in the Apache error log.

[Thu Jan 18 09:13:12.610141 2024] [proxy_fcgi:error] [pid 4140:tid 
139751550068480] [client **ip_address**:38494] AH01071: Got error 'PHP message: 
PHP Notice: Unknown: file created in the system's temporary directory in Unknown 
on line 0', referer: https://topchurch.net/wp-admin/plugin-install.php

Please check the following guide to deactivate plugins: Press [Enter] to continue:

https://developer.wordpress.org/cli/commands/plugin/deactivate/

[Apache]

Found recent error or warning messages in the Apache error log.

[Fri Jan 19 02:35:58.039513 2024] [proxy_fcgi:error] [pid 19052:tid 
140434298668800] [client **ip_address**:33552] AH01071: Got error 'PHP message: 
PHP Warning: require_once(/bitnami/wordpress/wp-settings.php): Failed to open 
stream: No such file or directory in /bitnami/wordpress/wp-config.php on line 
196PHP message: PHP Fatal error: Uncaught Error: Failed opening required 
'/bitnami/wordpress/wp-settings.php' (include_path='.:/opt/bitnami/php/lib/php') 
in /bitnami/wordpress/wp-config.php:196
S [Fri Jan 19 02:42:20.921212 2024] [autoindex:error] [pid 19052:tid 
140434866886400] [client **ip_address**:43016] AH01276: Cannot serve directory 
/opt/bitnami/wordpress/indexing-test/: No matching DirectoryIndex 
(index.html,index.html,index.htm,index.php) found, and server-generated 
directory index forbidden by Options directive
 [Fri Jan 19 03:24:18.329331 2024] [proxy_fcgi:error] [pid 20090:tid 
140434584086272] [client **ip_address**:60916] AH01071: Got error 'PHP message: 
PHP Notice: Unknown: file created in the system's temporary directory in Unknown 
on line 0', referer: 
Press [Enter] to continue:
https://topchurch.net/wp-admin/admin.php?page=revslider&view=slide&id=183

Please check the following guide to troubleshoot server issues:

https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-erro rs-apache/

A high number of incoming requests originate from one or more unique IP addresses. This could indicate a bot attack. The following guide shows how to check for and block suspicious IP addresses.

https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections- bots-apache/

===== End of bndiagnostic tool output =====

bndiagnostic was not useful. Could you please tell us why?

Still got problem

Describe your issue as much as you can

The site goes down occasionally. I had change the instance type to a large one, and modify php.ini to more memory limit and max input vars. Still get these error. Pls help. Thanks

mdhont commented 7 months ago

According to the diagnostic tool there is a high number of incoming connections from the same IP address. That could mean a bot attack. Please check the following guide to block them:

https://docs.bitnami.com/bch/apps/moodle/troubleshooting/deny-connections-bots-apache/

tomie72168 commented 7 months ago

Hi I checked. The ip is from sucuri where my WAF is. Following is access log of the ip.

185.93.231.4 - - [21/Jan/2024:17:20:49 +0000] "GET /wp-includes/js/underscore.min.js?ver=1.13.4 HTTP/1.1" 200 7311 185.93.231.4 - - [21/Jan/2024:17:20:49 +0000] "GET /wp-includes/js/wp-util.min.js?ver=6.4.2 HTTP/1.1" 200 756 185.93.231.4 - - [21/Jan/2024:17:20:50 +0000] "GET /wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart-variation.min.js?ver=8.5.1 HTTP/1.1" 200 3694 185.93.231.4 - - [21/Jan/2024:17:20:50 +0000] "GET /wp-content/plugins/woocommerce/assets/client/blocks/wc-blocks.css?ver=11.8.0-dev HTTP/1.1" 200 2492 185.93.231.4 - - [21/Jan/2024:17:20:51 +0000] "GET /wp-includes/css/dist/block-library/style.min.css?ver=6.4.2 HTTP/1.1" 200 14499 185.93.231.4 - - [21/Jan/2024:17:20:51 +0000] "GET /wp-content/plugins/revslider/public/assets/css/rs6.css?ver=6.6.15 HTTP/1.1" 200 12570 185.93.231.4 - - [21/Jan/2024:17:20:52 +0000] "GET /wp-content/plugins/fooevents/js/events-frontend.js?ver=1.0.0 HTTP/1.1" 200 440 185.93.231.4 - - [21/Jan/2024:17:20:52 +0000] "GET /wp-content/plugins/woocommerce/assets/js/sourcebuster/sourcebuster.min.js?ver=8.5.1 HTTP/1.1" 200 4543 185.93.231.4 - - [21/Jan/2024:17:20:53 +0000] "GET /wp-content/plugins/woocommerce/assets/js/frontend/order-attribution.min.js?ver=8.5.1 HTTP/1.1" 200 648 185.93.231.4 - - [21/Jan/2024:17:20:53 +0000] "GET /wp-includes/js/dist/vendor/wp-polyfill-inert.min.js?ver=3.1.2 HTTP/1.1" 200 2484 185.93.231.4 - - [21/Jan/2024:17:20:54 +0000] "GET /wp-includes/js/dist/vendor/regenerator-runtime.min.js?ver=0.14.0 HTTP/1.1" 200 2502 185.93.231.4 - - [21/Jan/2024:17:20:54 +0000] "GET /wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=3.15.0 HTTP/1.1" 200 35888 185.93.231.4 - - [21/Jan/2024:17:20:55 +0000] "GET /wp-includes/js/dist/vendor/react.min.js?ver=18.2.0 HTTP/1.1" 200 4155 185.93.231.4 - - [21/Jan/2024:17:20:55 +0000] "GET /wp-includes/js/dist/hooks.min.js?ver=c6aec9a8d4e5a5d543a1 HTTP/1.1" 200 1567 185.93.231.4 - - [21/Jan/2024:17:20:56 +0000] "GET /wp-includes/js/dist/deprecated.min.js?ver=73ad3591e7bc95f4777a HTTP/1.1" 200 456 185.93.231.4 - - [21/Jan/2024:17:20:56 +0000] "GET /wp-includes/js/dist/dom.min.js?ver=49ff2869626fbeaacc23 HTTP/1.1" 200 4722 185.93.231.4 - - [21/Jan/2024:17:20:57 +0000] "GET /wp-includes/js/dist/vendor/react-dom.min.js?ver=18.2.0 HTTP/1.1" 200 42012 185.93.231.4 - - [21/Jan/2024:17:20:57 +0000] "GET /wp-includes/js/dist/escape-html.min.js?ver=03e27a7b6ae14f7afaa6 HTTP/1.1" 200 544 185.93.231.4 - - [21/Jan/2024:17:20:58 +0000] "GET /wp-includes/js/dist/element.min.js?ver=ed1c7604880e8b574b40 HTTP/1.1" 200 5002 185.93.231.4 - - [21/Jan/2024:17:20:58 +0000] "GET /wp-includes/js/dist/is-shallow-equal.min.js?ver=20c2b06ecf04afb14fee HTTP/1.1" 200 529 185.93.231.4 - - [21/Jan/2024:17:20:59 +0000] "GET /wp-includes/js/dist/i18n.min.js?ver=7701b0c3857f914212ef HTTP/1.1" 200 3692 185.93.231.4 - - [21/Jan/2024:17:20:59 +0000] "GET /wp-includes/js/dist/keycodes.min.js?ver=3460bd0fac9859d6886c HTTP/1.1" 200 1833 185.93.231.4 - - [21/Jan/2024:17:21:00 +0000] "GET /wp-includes/js/dist/priority-queue.min.js?ver=422e19e9d48b269c5219 HTTP/1.1" 200 1525 185.93.231.4 - - [21/Jan/2024:17:21:00 +0000] "GET /wp-includes/js/dist/compose.min.js?ver=3189b344ff39fef940b7 HTTP/1.1" 200 12771 185.93.231.4 - - [21/Jan/2024:17:21:01 +0000] "GET /wp-includes/js/dist/private-apis.min.js?ver=11cb2ebaa70a9f1f0ab5 HTTP/1.1" 200 980 185.93.231.4 - - [21/Jan/2024:17:21:01 +0000] "GET /wp-includes/js/dist/redux-routine.min.js?ver=0be1b2a6a79703e28531 HTTP/1.1" 200 2828 185.93.231.4 - - [21/Jan/2024:17:21:02 +0000] "GET /wp-includes/js/dist/data.min.js?ver=dc5f255634f3da29c8d5 HTTP/1.1" 200 9042 185.93.231.4 - - [21/Jan/2024:17:21:02 +0000] "GET /wp-includes/js/dist/vendor/lodash.min.js?ver=4.17.19 HTTP/1.1" 200 24939 185.93.231.4 - - [21/Jan/2024:17:21:03 +0000] "GET /wp-content/plugins/woocommerce/assets/client/blocks/wc-blocks-registry.js?ver=1c879273bd5c193cad0a HTTP/1.1" 200 2753 185.93.231.4 - - [21/Jan/2024:17:21:03 +0000] "GET /wp-includes/js/dist/url.min.js?ver=b4979979018b684be209 HTTP/1.1" 200 3863 185.93.231.4 - - [21/Jan/2024:17:21:04 +0000] "GET /wp-includes/js/dist/api-fetch.min.js?ver=0fa4dabf8bf2c7adf21a HTTP/1.1" 200 2299 185.93.231.4 - - [21/Jan/2024:17:21:04 +0000] "GET /wp-content/plugins/woocommerce/assets/client/blocks/wc-settings.js?ver=07c2f0675ddd247d2325 HTTP/1.1" 200 2025 185.93.231.4 - - [21/Jan/2024:17:21:05 +0000] "GET /wp-includes/js/dist/data-controls.min.js?ver=fe4ccc8a1782ea8e2cb1 HTTP/1.1" 200 648 185.93.231.4 - - [21/Jan/2024:17:21:05 +0000] "GET /wp-includes/js/dist/html-entities.min.js?ver=36a4a255da7dd2e1bf8e HTTP/1.1" 200 451 185.93.231.4 - - [21/Jan/2024:17:21:06 +0000] "GET /wp-includes/js/dist/notices.min.js?ver=38e88f4b627cf873edd0 HTTP/1.1" 200 964 185.93.231.4 - - [21/Jan/2024:17:21:06 +0000] "GET /wp-content/plugins/woocommerce/assets/client/blocks/wc-blocks-middleware.js?ver=ca04183222edaf8a26be HTTP/1.1" 200 735 185.93.231.4 - - [21/Jan/2024:17:21:07 +0000] "GET /wp-content/plugins/woocommerce/assets/client/blocks/wc-blocks-data.js?ver=c96aba0171b12e03b8a6 HTTP/1.1" 200 19726 185.93.231.4 - - [21/Jan/2024:17:21:07 +0000] "GET /wp-includes/js/dist/dom-ready.min.js?ver=392bdd43726760d1f3ca HTTP/1.1" 200 331 185.93.231.4 - - [21/Jan/2024:17:21:08 +0000] "GET /wp-includes/js/dist/a11y.min.js?ver=7032343a947cfccf5608 HTTP/1.1" 200 960 185.93.231.4 - - [21/Jan/2024:17:21:08 +0000] "GET /wp-includes/js/dist/primitives.min.js?ver=6984e6eb5d6157c4fe44 HTTP/1.1" 200 1116 185.93.231.4 - - [21/Jan/2024:17:21:09 +0000] "GET /wp-includes/js/dist/warning.min.js?ver=122829a085511691f14d HTTP/1.1" 200 254

mdhont commented 7 months ago

196PHP message: PHP Fatal error: Uncaught Error: Failed opening required '/bitnami/wordpress/wp-settings.php' (include_path='.:/opt/bitnami/php/lib/php') in /bitnami/wordpress/wp-config.php:196

This seems a permissions issue. The following guide shows how to set the correct permissions:

https://docs.bitnami.com/aws/apps/wordpress/administration/understand-file-permissions/

tomie72168 commented 7 months ago

Yes I had change the permission of the file But server still go down occasionally, don't know why?

mdhont commented 7 months ago

Many times it's the plugins. I recommend disabling all plugins and check if the issue continues. If not, enable them one by one to find the one that's causing it.

wp plugin deactivate --all
tomie72168 commented 7 months ago

Got it, thanks

github-actions[bot] commented 7 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 6 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.