Discover Centmin Mod today
Register Now

Upgrade Nginx Unable to upgrade nginx

Discussion in 'Install & Upgrades or Pre-Install Questions' started by jcat, Aug 9, 2024.

  1. jcat

    jcat Member

    148
    22
    18
    Jun 21, 2015
    New Jersey
    Ratings:
    +62
    Local Time:
    9:57 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 131.00stable.b039
    • Nginx Version Installed: nginx/1.22.0
    • MariaDB MySQL Version Installed: 10.6
    • When was last time updated Centmin Mod code base ? : Just now
    • 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):
      NGINX_LIBBROTLI=y
      PHP_BROTLI=y
      PHP_LZFOUR=y
      PHP_LZF=y
      PHP_ZSTD=y
      PHPFINFO=y
      DISABLE_IPVSIX=y
      LETSENCRYPT_DETECT=y
      ENABLEMOTD='n'
      MARCH_TARGETNATIVE='n'
      

    Code (Text):
    2024-08-08 16:12:02 (13.5 MB/s) - ‘Nginx-accesskey-2.0.3.tar.gz’ saved [129/129]
    
    0
    Download done.
    
    gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    Error: Nginx-accesskey-2.0.3.tar.gz extraction failed.
    



    Code (Text):
    2024-08-08 16:12:08 (46.5 MB/s) - ‘ngx-fancyindex-0.3.1.tar.gz’ saved [130/130]
    
    
    gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    



    Code (Text):
    ls -lAhrt /usr/local/nginx-dep/lib | egrep 'libpcre.so|libpcre2-8.so'
    -rwxr-xr-x 1 root root 1.5M Mar 21  2023 libpcre.so.1.2.13
    lrwxrwxrwx 1 root root   17 Mar 21  2023 libpcre.so.1 -> libpcre.so.1.2.13
    lrwxrwxrwx 1 root root   17 Mar 21  2023 libpcre.so -> libpcre.so.1.2.13
    
    tar (child): /svr-setup/headers-more-v0.37.tar.gz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    tar (child): /svr-setup/ngx_http_redis-0.4.0-cmm.tar.gz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    11:57 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You might want to inspect the nginx upgrade log for clues around the download routines https://community.centminmod.com/threads/how-to-troubleshoot-nginx-installs-upgrades.17778/. From what you provided seems it could be network connectivity or failed completion for some /svr-setup/*.tar.gz download files

    You can try removing those tarball files and redownload them when you run centmin.sh menu option 4
    Code (Text):
    cmupdate
    cd /svr-setup
    rm -f /svr-setup/*.tar.gz
    

    added cmupdate to ensure you have latest updates synced first
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,142
    12,108
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,643
    Local Time:
    11:57 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I think I found the root cause.
    • Very early in Centmin Mod's life I opted to host some of the dependency download files on centminmod.com due to slow source direct downloads in unreliable downloads from direct source sites. As centminmod.com is a load balanced site across many servers in many geographical regions it was git repository backended by non-github git repository and these downloads were committed as non-LFS git objects and served by centminmod.com as such and all was well.
    • Over time, I moved away from committing the downloads into the git repository in favor of scripted downloads. As new dependency versions were released, they moved away from the git repo committed to the served directly from centminmod.com server file systems.
    • But recently, I decided for my non-github git repo to have a github backup repo and github supports git LFS for larger files to be stored outside of the repo, so I enabled that LFS support on the centminmod.com site repo but that seems to have messed with non-github main repo used for centminmod.com and those committed downloads all ended up as 129 or 130 byte sized files. For most of those files it was fine as Centmin Mod moved away from committing the downloads into the git repository in favor of scripted downloads so those newer dependency files were untouched. Nginx access and fancyindex are the last of the 2 dependencies that came from git committed repo so had problems. I've updated 131.00stable and 140.00beta01 to use newer dependency versions for Nginx access 2.0.5 and fancyindex 0.5.2 which are not using git committed repo versions :)