500 Internal Error on Site Deploy, Rollback not working *Solved

Never mind, problem solved. disabling Jetpack worked. Now, I am still curious as to why it would kill the site…

Hi Everyone.

Facing some difficult challenges here… Not exactly sure how I have managed to crash my staging site.

What happened was that I Deployed the staging site 6 days ago with some new plugins and everything was working fine. Then a few days later I decided to # the plugins folder in .gitignore and just #composer-managed-plugins. Didn’t deploy it but didn’t think much about it.

Have done development on the staging server, but today I did “Vagrant up”, made some plugin changes but that’s all. I deploy the site and voila, 500 internal server error. Can it be linked to the VM somehow?

Error.log shows I had a rogue letter left in my child functions.php, so removed it but now I keep getting FastCGI errors restricting access. I have tried setting Caching to False and reprovisioned the Server a few times.

I have also tried running the rollback playbook from the trellis folder, but for both of them it just opens a new empty line like this:

Playbooks:

  1. ansible-playbook rollback.yml -e "site=example.org env=staging”
    and
  2. ansible-playbook rollback.yml -e "site=example.org env=staging” --extra-vars=‘release=20180430152337’

I know it is Sunday but if anybody has time to perhaps have a glance and maybe send me in the right direction to debug it, or if the solution is obvious, point it out to me:) that would be much appreciated!

Some of the errors in the 2 error logs are:

#error.log.1

2018/05/03 06:11:57 [error] 1569#1569: *1801 access forbidden by rule, client: 195.22.127.231, server: xxx.xx.xxx.xxx, request: “GET /.git/HEAD HTTP/1.1”, host: “xxx.xx.xxx.xxx”
2018/05/03 23:38:45 [error] 1569#1569: *2879 FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /srv/www/example.org/releases$
2018/05/03 23:39:14 [error] 1569#1569: *2879 FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /srv/www/example.org/releases$
2018/05/03 23:42:02 [error] 1569#1569: *2879 FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /srv/www/example.org/releases$
2018/05/03 23:45:43 [error] 1569#1569: *3010 FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /srv/www/example.org/releases$
2018/05/03 23:46:13 [error] 1569#1569: *3010 FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /srv/www/example.org/releases$
2018/05/03 23:46:38 [error] 1569#1569: *3044 FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /srv/www/example.org/releases$
2018/05/03 23:51:31 [error] 1569#1569: *3044 FastCGI sent in stderr: "PHP message: PHP Warning: Invalid argument supplied for foreach() in /srv/www/example.org/releases$
$0.212.84.160, server: xxx.xx.xxx.xxx, request: “POST /wp/wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php-fpm-wordpress.sock:”, host: “xxx.xx.xxx.xxx”, r$

#error.log

2018/05/06 07:15:10 [error] 1569#1569: *4374 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file in /srv/www/example.org/release$
2018/05/06 07:15:14 [error] 1569#1569: *4374 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file in /srv/www/example.org/release$
2018/05/06 07:15:17 [error] 1569#1569: *4374 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file in /srv/www/example.org/release$
2018/05/06 07:15:22 [error] 1569#1569: *4374 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file in /srv/www/example.org/release$
2018/05/06 07:15:25 [error] 1569#1569: *4374 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file in /srv/www/example.org/release$
2018/05/06 07:15:37 [error] 1569#1569: *4374 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file in /srv/www/example.org/release$
2018/05/06 07:17:23 [error] 1569#1569: *4395 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file in /srv/www/example.org/release$
2018/05/06 07:21:42 [error] 1569#1569: *4399 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected end of file in /srv/www/example.org/release$
2018/05/06 07:23:52 [error] 1569#1569: *4403 FastCGI sent in stderr: "PHP message: PHP Warning: require(includes/forum-compatibility.php): failed to open stream: No such file or $
PHP message: PHP Fatal error: require(): Failed opening required ‘includes/forum-compatibility.php’ (include_path=‘.:/usr/share/php’) in /srv/www/example.org/releases/2$

(removed lines in between…)

2018/05/06 08:01:09 [error] 1569#1569: *4436 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/srv/www/example.org/releases/20180506074320/web/app/plugin$
PHP message: PHP Fatal error: require_once(): Failed opening required '/srv/www/example.org/releases/20180506074320/web/app/plugins/jetpack/sync/class.jetpack-sync-simp$

2 Likes