Get the most out of your Centmin Mod LEMP stack
Become a Member

Nginx 1.23.1 upgrade failure

Discussion in 'Install & Upgrades or Pre-Install Questions' started by dce, Aug 5, 2022 at 4:12 PM.

  1. dce

    dce Member

    37
    6
    8
    Feb 21, 2018
    Ratings:
    +7
    Local Time:
    7:31 AM
    Hello,


    I am attempting to upgrade Nginx and it results in a make error. Thanks for any help in advance.

    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.21.6
    • PHP Version Installed: 5.6.40
    • MariaDB MySQL Version Installed: mysql Ver 9.1
    • When was last time updated Centmin Mod code base ? : centmin codebase current
    • Persistent Config:
      Code (Text):
      NGINX_DEVTOOLSETGCC='y'
      ORESTY_LUANGINX='y'
      NGXDYNAMIC_LUA='y'
      NGXDYNAMIC_DEVELKIT='y'
      NGINX_HPACK='y'
      CLOUDFLARE_ZLIB='y'
      LIBRESSL_SWITCH='n'
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGINX_PAGESPEED='y'
      MARCH_TARGETNATIVE='n'
      LETSENCRYPT_DETECT='y'
      AUDITD_ENABLE='y'
      PUREFTPD_DISABLED=y
      


     
  2. eva2000

    eva2000 Administrator Staff Member

    48,987
    11,227
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,477
    Local Time:
    9:31 PM
    Nginx 1.21.x
    MariaDB 10.x
    What Centmin Mod version? Did Nginx 1.23.0 work?

    FYI, both 124.00stable and 130.00beta01 got updates for Nginx 1.23.0 compatibility and other updates. Older Centmin Mod versions won't work.

    centmin.sh menu option 4 nginx updates to 1.23.0 still are blocked off by default via NGINX_ONETWOTHREE_COMPAT='n' variable until further testing is done. However, you can also help test with NGINX_ONETWOTHREE_COMPAT='y' set in persistent config file /etc/centminmod/custom_config.inc prior to centmin.sh menu option 4 runs which will unblock nginx 1.23.0 updates.
     
  3. dce

    dce Member

    37
    6
    8
    Feb 21, 2018
    Ratings:
    +7
    Local Time:
    7:31 AM
    Thank you for the info eva2000.

    I have been a little behind the times with this server (running some legacy drupal 7 instances).

    I am thinking my best avenue forward would be to just move from 123.09beta01 to 124.00 stable as detailed here. Then update Nginx.

    Looks to be a straight forward update. Anything to look out for? This is a critical server until I move the present sites on it to Drupal 10 in early 2023.
     
  4. eva2000

    eva2000 Administrator Staff Member

    48,987
    11,227
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,477
    Local Time:
    9:31 PM
    Nginx 1.21.x
    MariaDB 10.x
    Should be fine doing it that way :)
     
  5. kernelpanic

    kernelpanic New Member

    2
    0
    1
    Jan 9, 2018
    Ratings:
    +0
    Local Time:
    7:31 AM
    I have had this same issue. Did the update to 124.00 didn’t help. Did restart and check version again still no go. When I run nginx from centmin menu it will prompt for version etc but stops immediately. Should I aren’t going to beta?
     
  6. eva2000

    eva2000 Administrator Staff Member

    48,987
    11,227
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,477
    Local Time:
    9:31 PM
    Nginx 1.21.x
    MariaDB 10.x
    Did you set NGINX_ONETWOTHREE_COMPAT='y' set in persistent config file /etc/centminmod/custom_config.inc prior to centmin.sh menu option 4 run?
     
  7. dce

    dce Member

    37
    6
    8
    Feb 21, 2018
    Ratings:
    +7
    Local Time:
    7:31 AM
    Was just about to do the update to 124.00 when I say the post you are replying to!

    Should I set NGINX_ONETWOTHREE_COMPAT='y' before doing the centmin mod update procedure to 124 followed by the Nginx update?

    Or do the centmin 124 update, set NGINX_ONETWOTHREE_COMPAT='y', then update Nginx?

    Or it does not matter the sequence of steps!
     
  8. eva2000

    eva2000 Administrator Staff Member

    48,987
    11,227
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,477
    Local Time:
    9:31 PM
    Nginx 1.21.x
    MariaDB 10.x
    Proper order of steps :)
     
  9. dce

    dce Member

    37
    6
    8
    Feb 21, 2018
    Ratings:
    +7
    Local Time:
    7:31 AM
    Thanks eva2000
    Did the steps as advised. Centmin Mod now shows version 124.00stable.

    The Nginx upgrade ended with a make fail.

    "Error: 2, Nginx make failed"
     
  10. eva2000

    eva2000 Administrator Staff Member

    48,987
    11,227
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,477
    Local Time:
    9:31 PM
    Nginx 1.21.x
    MariaDB 10.x
  11. eva2000

    eva2000 Administrator Staff Member

    48,987
    11,227
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,477
    Local Time:
    9:31 PM
    Nginx 1.21.x
    MariaDB 10.x
    @dce looks like nginx pagespeed module isn't compatible with Nginx 1.23.x so I'd disable nginx pagespeed module if you want to use Nginx 1.23.x. Looks like Nginx pagespeed module hasn't been updated in 2yrs now Releases · apache/incubator-pagespeed-ngx
    Code (Text):
    ../incubator-pagespeed-ngx-1.14.33.1-RC1/src/ngx_pagespeed.cc: In function ‘bool net_instaweb::{anonymous}::ps_get_cache_control(ngx_http_request_t*, GoogleString*)’:
    ../incubator-pagespeed-ngx-1.14.33.1-RC1/src/ngx_pagespeed.cc:442:74: error: request for member ‘elts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?)
      442 |   auto ccp = static_cast<ngx_table_elt_t**>(r->headers_out.cache_control.elts);
          |                                                                          ^~~~
    ../incubator-pagespeed-ngx-1.14.33.1-RC1/src/ngx_pagespeed.cc:447:59: error: request for member ‘nelts’ in ‘r->ngx_http_request_s::headers_out.ngx_http_headers_out_t::cache_control’, which is of pointer type ‘ngx_table_elt_t*’ {aka ‘ngx_table_elt_s*’} (maybe you meant to use ‘->’ ?)
      447 |   for (ngx_uint_t i = 0; i < r->headers_out.cache_control.nelts; i++) {
          |                                                           ^~~~~
    make[1]: *** [objs/Makefile:3329: objs/addon/src/ngx_pagespeed.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    
    make[1]: Leaving directory '/svr-setup/nginx-1.23.1'
    make: *** [Makefile:10: build] Error 2
    
    
     
  12. eva2000

    eva2000 Administrator Staff Member

    48,987
    11,227
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,477
    Local Time:
    9:31 PM
    Nginx 1.21.x
    MariaDB 10.x
    @dce updated 124.00stable and 130.00beta01, so that if Nginx 1.23+ is used that ngx_pagespeed module is auto disabled as it's no longer compatible right now. So on 124.00stable or 130.00beta01, run cmupdate to pull this update and try Nginx 1.23.1 again