Welcome to Centmin Mod Community
Become a Member

Upgrade Nginx PHP-FPM Centmin Mod Upgrade Failure: Best Practices?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by ljseals, Jun 1, 2017.

  1. ljseals

    ljseals Member

    88
    22
    8
    Dec 20, 2016
    Ratings:
    +42
    Local Time:
    5:39 AM
    Greetings,

    I am wondering if Centmin Mod fails on an nginx upgrade or php upgrade what is the best procedure in order to rectify the situation. From my experience at times a download from a repo may fail causing the entire upgrade to fail. This happened just yesterday when I decided to upgrade to nginx 1.13.1. When I go into production, I will not upgrade and downgrade as frequently but I am wondering what is the best practices as a system admin.

    I tried - unsuccessfully
    1. Attempted the Nginx upgrade several times all failing.
    2. Attempted to update the branch - Up to date
    3. Attempted git pull - Up to date
    4. Attempted to downgrade but the curret version was already running was successful.

    I guess my question is the upgrade procedure shielded from the current working nginx or php version? Does this fail status negatively affect the performance of the server. What would you do in this situation? All the sites were running fine if this a fail-safe procedure?

    Finally, I just reinstalled the OS and Centmin Mod but looking for alternatives at this point. God bless you!
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,057
    6,594
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,790
    Local Time:
    8:39 PM
    Nginx 1.13.x
    MariaDB 5.5
    First find out why it failed.

    To troubleshoot, you need to check the the nginx and php upgrade logs at /root/centminlogs and instructions under Sharing logs and errors heading for using Pastebin.com or Gists to share a sanitised version of the contents of the nginx_upgrade and php_upgrade logs. You can see full details at How to troubleshoot Centmin Mod initial install issues

    also what's output of
    Code (Text):
    nginx -t

    when you run centmin.sh menu option 4 there's a nginx upgrade log timestamped at /root/centminlogs

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest nginx_upgrade log to gist.github.com or pastebin.com

    you can use grep to filter the logs, i.e. look for nginx_upgrade or php in log name
    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    

    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    -rw-r--r--  1 root root  2.6M Oct  3 03:48 centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log
    -rw-r--r--  1 root root  664K Oct 12 09:24 centminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log
    

    So the last nginx upgrade log was named centminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log and located at /root/centminlogs/ccentminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log
    then use cat command to output the contents of that log. Do the same for php_upgrade.log log.

    clear your ssh window buffer/screen and type
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log

    then select and copy and paste output to pastebin.com or gist.github.com file to share. If your SSH client's scroll buffer isn't large enough using cat might not output the entire log file contents, so you may need to download the log and use local text editor to open and copy and paste.

    so only need content of 2 specific logs, in this case most recent nginx_upgrade.log and php_upgrade.log logs
     
    • Like Like x 1
  3. eva2000

    eva2000 Administrator Staff Member

    29,057
    6,594
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +9,790
    Local Time:
    8:39 PM
    Nginx 1.13.x
    MariaDB 5.5
    If you search this forum for nginx_upgrade.log, you may also find older troubleshooting and example solutions from past folks too :)
     
    • Like Like x 2
  4. ljseals

    ljseals Member

    88
    22
    8
    Dec 20, 2016
    Ratings:
    +42
    Local Time:
    5:39 AM
    Okay thanks, Eva just wondering.... I did not necessarily want bother you and others on the forum, so I will look at the past logs that were submitted. God bless you!