Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx upgrade fail

Discussion in 'Install & Upgrades or Pre-Install Questions' started by hson4787, Oct 20, 2020.

  1. hson4787

    hson4787 New Member

    5
    1
    3
    Sep 18, 2020
    Ratings:
    +1
    Local Time:
    5:40 AM
    1.19.2
    10.4.14
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: Nginx 1.19.2
    • PHP Version Installed: 7.4.9
    • MariaDB MySQL Version Installed: 10.4.xx
    • When was last time updated Centmin Mod code base ? : Oct 20
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      MARCH_TARGETNATIVE='n'
      LETSENCRYPT_DETECT='y'
      NGXDYNAMIC_BROTLI='y'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGINX_PAGESPEED='y'
      ENABLE_MARIADBTENTWOUPGRADE='y'
      ENABLE_MARIADBTENTHREEUPGRADE='y'
      ENABLE_MARIADBTENFOURUPGRADE='y'
      NGINX_IOURING_PATCH='y'
      KEYLENGTH='ec-256'
      
      

      Post output in CODE tags.
    Got error when i upgrade nginx 1.19.2 to 1.19.3
    My upgrade log:
    Code (Text):
    https://gist.github.com/hson4787/5684dd6559ec07de2a43c3c162e50baa


     
  2. eva2000

    eva2000 Administrator Staff Member

    46,853
    10,629
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,497
    Local Time:
    8:40 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    probably not enough free memory to compile nginx with ngx_pagespeed as it seems you don't have swap file setup which Centmin Mod 123.09beta01 initial install would of configured a swap file if one was missing

    Code (Text):
       -o objs/addon/src/ngx_caching_headers.o \
       ../incubator-pagespeed-ngx-1.13.35.2-stable/src/ngx_caching_headers.cc
    gcc: fatal error: Killed signal terminated program cc1plus
    

    Code (Text):
                 total        used        free      shared  buff/cache   available
    Mem:            983         488         154         207         340         121
    Swap:             0           0           0
    
    Filesystem     Type      Size  Used Avail Use% Mounted on
    devtmpfs       devtmpfs  480M     0  480M   0% /dev
    tmpfs          tmpfs     492M     0  492M   0% /dev/shm
    tmpfs          tmpfs     492M   50M  442M  11% /run
    tmpfs          tmpfs     492M     0  492M   0% /sys/fs/cgroup
    /dev/vda1      ext4       31G   11G   19G  36% /
    /dev/loop0     ext4      5.8G   25M  5.5G   1% /tmp
    tmpfs          tmpfs      99M     0   99M   0% /run/user/0
    
    CPU: Intel Core Processor (Skylake, IBRS) (1)
    

    what does contents of /etc/fstab look like?
    Code (Text):
    cat /etc/fstab

    For posting code or output from commands to keep the formatting, you might want to use CODE tags for code How to use forum BBCODE code tags :)

    To resize or create swap disk ensure you have enough free disk space on server / partition
    Code (Text):
    df -hT
    

    take note and backup /etc/fstab contents
    Code (Text):
    cat /etc/fstab
    

    then run these ssh commands one after another in same SSH client session.
    Code (Text):
    read -ep "enter size of desired swap disk space in gigabytes i.e. 2GB enter = 2: " size
    echo "create ${size}GB swap file"
    countsize=$((${size}*1024))
    dd if=/dev/zero of=/swapfile bs=1024 count=${countsize}k
    ls -lah /swapfile
    mkswap /swapfile
    swapoff -a
    swapon /swapfile
    chown root:root /swapfile
    chmod 0600 /swapfile
    swapon -s
    sed -i '/swap/d' /etc/fstab
    echo "/swapfile swap swap defaults 0 0" >> /etc/fstab
    mount -a
    

    verify new swap disk size
    Code (Text):
    free -m
    
     
  3. hson4787

    hson4787 New Member

    5
    1
    3
    Sep 18, 2020
    Ratings:
    +1
    Local Time:
    5:40 AM
    1.19.2
    10.4.14
    Thanks @eva2000 , it worked well now.
     
  4. TRINH AI QUOC

    TRINH AI QUOC New Member

    6
    0
    1
    Dec 28, 2020
    Ratings:
    +0
    Local Time:
    5:40 AM
    1.17.3
    10
    hi @eva2000 !!
    i try many time to update nginx but i can't
    Please help me to fix it.


    Code:
    make[1]: *** [objs/addon/src/ngx_pagespeed.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/svr-setup/nginx-1.19.6'
    make: *** [build] Error 2
    
    real    1m40.689s
    user    1m9.169s
    sys     0m25.927s
    
    Mon Dec 28 13:16:32 UTC 2020
    Error: 2, Nginx make failed
    
    report errors on the forums at community.centminmod.com/forums/8/
    with info asked at community.centminmod.com/threads/17778/
    
                  total        used        free      shared  buff/cache   available
    Mem:           1838         715         767         164         355         759
    Swap:          1023          10        1013
    
    Filesystem     Type      Size  Used Avail Use% Mounted on
    devtmpfs       devtmpfs  895M     0  895M   0% /dev
    tmpfs          tmpfs     920M     0  920M   0% /dev/shm
    tmpfs          tmpfs     920M   17M  903M   2% /run
    tmpfs          tmpfs     920M     0  920M   0% /sys/fs/cgroup
    /dev/vda1      xfs        25G   15G   10G  60% /
    tmpfs          tmpfs     184M     0  184M   0% /run/user/0
    
    CPU: Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz (1)
    
    version increment history
    123.09beta01.b631 #Mon Dec 28 09:25:19 UTC 2020
    123.09beta01.b631 #Mon Dec 28 11:51:59 UTC 2020
    123.09beta01.b631 #Mon Dec 28 12:11:35 UTC 2020
    123.09beta01.b640 #Mon Dec 28 12:20:13 UTC 2020
    123.09beta01.b640 #Mon Dec 28 12:58:35 UTC 2020
    
    last Centmin Mod local git commit entry
    /usr/local/src/centminmod /svr-setup/nginx-1.19.6 ~
    
    ecdbf64 George Liu Sun, 20 Dec 2020 00:15:28 +1000
    update addons/acmetool.sh 1.0.69
    
    2       2       addons/acmetool.sh
    1       1       centmin.sh
     2 files changed, 3 insertions(+), 3 deletions(-)
    /svr-setup/nginx-1.19.6 ~
    
    log files saved at /root/centminlogs
    -rw-r--r-- 1 root root  325 Dec 28 12:58 etc-centminmod-custom-config-settings_281220-125822.log
    -rw-r--r-- 1 root root    0 Dec 28 13:13 patch_opensslpatches_281220-125822.log
    -rw-r--r-- 1 root root   88 Dec 28 13:14 centminmod_opensslinstalltime_281220-125822.log
    -rw-r--r-- 1 root root  166 Dec 28 13:14 patch_patchnginx_281220-125822.log
    -rw-r--r-- 1 root root 8.9K Dec 28 13:14 nginx-configure-281220-125822.log
    -rw-r--r-- 1 root root 1.8M Dec 28 13:16 centminmod_123.09beta01.b640_281220-125822_nginx_upgrade.log
    Total Nginx Upgrade Time: 222.838968376 seconds
    Code:
    LETSENCRYPT_DETECT='y'
    MARCH_TARGETNATIVE='n'
    NGXDYNAMIC_NGXPAGESPEED='y'
    NGINX_PAGESPEEDPSOL_VER='1.12.34.2'
    NGXPGSPEED_VER='1.12.34.2-stable'
    NGINX_PAGESPEED='y'
    NGINX_PAGESPEEDGITMASTER='n'
    RCLONE_ENABLE='y'
    
     
  5. pamamolf

    pamamolf Premium Member Premium Member

    3,939
    399
    83
    May 31, 2014
    Ratings:
    +773
    Local Time:
    1:40 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    I think if you remove from your config the:

    Nginx will work....

    Then you can wait for eva2000 for more help.

    Consider also using Cloudflare free plan as it can offer what Pagespeed can do and even more for free...

    Let Cloudflare do that job for you so you can use less resources also...
     
  6. eva2000

    eva2000 Administrator Staff Member

    46,853
    10,629
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,497
    Local Time:
    8:40 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Remove these 2 entries as that is an old outdated ngx_pagespeed nginx module version. If you remove those and re-try centmin.sh menu option 4 for nginx recompile it should use ngx_pagespeed version that works with Centmin Mod Nginx.
     
  7. TRINH AI QUOC

    TRINH AI QUOC New Member

    6
    0
    1
    Dec 28, 2020
    Ratings:
    +0
    Local Time:
    5:40 AM
    1.17.3
    10
    THANK YOU SO MUCH !!!
    It works ^^

    Let Cloudflare do that job for you so you can use less resources also...[/QUOTE]
    THANK YOU SO MUCH !!!
    It works ^^
     
  8. eva2000

    eva2000 Administrator Staff Member

    46,853
    10,629
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,497
    Local Time:
    8:40 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Glad to hear :)
     
  9. TRINH AI QUOC

    TRINH AI QUOC New Member

    6
    0
    1
    Dec 28, 2020
    Ratings:
    +0
    Local Time:
    5:40 AM
    1.17.3
    10
    i see that error from my wordpress after upgrade .
    Please help me to fix it.
    @eva2000
     

    Attached Files:

    Last edited: Jan 9, 2021
  10. eva2000

    eva2000 Administrator Staff Member

    46,853
    10,629
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,497
    Local Time:
    8:40 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    after upgrade what ? Wordpress upgrade and/or nginx upgrade ?