502 Bad Gateway / 504 Gateway Time-out Nginx

Hi there,

I successfully updated to Trellis 0.9.9 last weekend and re-provisioned my staging server without any problems. However, I forgot to update my group_vars/all/users.yml to php 7.1:

web_sudoers:
  - "/usr/sbin/service php7.1-fpm *"

Resulting in an error on my first deploy after updating.
So I edited the /etc/sudoers.d/webservices on my remote server and edited 7.0 to 7.1 manually and restarted the service.

That didn’t work so I reinstalled php 7.1 with:
sudo apt-get install php7.1

That also didn’t work so I re-provisioned the remote server 2 times with no errors what so ever. When I check if php is running with: sudo service php7.1-fpm status it outputs:

● php7.1-fpm.service - The PHP 7.1 FastCGI Process Manager
   Loaded: loaded (/lib/systemd/system/php7.1-fpm.service; enabled; vendor prese
   Active: active (running) since Mon 2016-12-19 15:16:36 UTC; 22min ago
     Docs: man:php-fpm7.1(8)
 Main PID: 1614 (php-fpm7.1)
   Status: "Processes active: 10, idle: 2, Requests: 120, slow: 0, Traffic: 0.5r
    Tasks: 13 (limit: 512)
   CGroup: /system.slice/php7.1-fpm.service
           ├─1614 php-fpm: master process (/etc/php/7.1/fpm/php-fpm.conf)       
           ├─1618 php-fpm: pool wordpress                                       
           ├─1619 php-fpm: pool www                                             
           ├─1620 php-fpm: pool www                                             
           ├─1622 php-fpm: pool wordpress                                       
           ├─1635 php-fpm: pool wordpress                                       
           ├─1637 php-fpm: pool wordpress                                       
           ├─1639 php-fpm: pool wordpress                                       
           ├─1641 php-fpm: pool wordpress                                       
           ├─1643 php-fpm: pool wordpress                                       
           ├─1645 php-fpm: pool wordpress                                       
           ├─1647 php-fpm: pool wordpress                                       
           └─1649 php-fpm: pool wordpress                                       

Dec 19 15:16:36 server01 systemd[1]: Stopped The PHP 7.1 FastCGI Process Manager

My remote is unavailable at the moment and I keep getting either 502 Bad Gateway or 504 Gateway Time-out nginx errors.

Also tried reloading nginx and rebooted my entire droplet already with no succes.

Any ideas how to fix this?
Thanks!

Why not just destroy and start over?

How exactly do I destroy a remote server?

Who is your web host? It’s usually straightforward with most VPS providers — are you not able to simply destroy/remove the VPS and re-create it?

You mentioned this is a staging server, and considering one of the biggest benefits of using Trellis is the ability to destroy/spin up servers quickly, that should be one of the first things you do instead of attempting to fix a damaged upgrade.

Ok thanks!
I’m with Cloudprovider in Amsterdam, I presume destroying a server will mean losing all uploads?