Join the community today
Become a Member

Nginx 1.23.1 upgrade failure

Discussion in 'Install & Upgrades or Pre-Install Questions' started by dce, Aug 5, 2022.

  1. dce

    dce Member

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    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

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    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

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Should be fine doing it that way :)
     
  5. kernelpanic

    kernelpanic New Member

    3
    0
    1
    Jan 9, 2018
    Ratings:
    +0
    Local Time:
    10:26 PM
    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

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    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

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Proper order of steps :)
     
  9. dce

    dce Member

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    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

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  11. eva2000

    eva2000 Administrator Staff Member

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    @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

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    @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
     
  13. kernelpanic

    kernelpanic New Member

    3
    0
    1
    Jan 9, 2018
    Ratings:
    +0
    Local Time:
    10:26 PM
    Yes this worked. Sorry missed that step. Appreciate all you do!
     
  14. dce

    dce Member

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    Thanks eva2000, I stopped using ngx_pagespeed a while back anyway (disabled per website instance) since it was causing problems with Drupal's advanced CSS/JS aggregation module.

    Will try the update tonight.
     
    Last edited: Aug 10, 2022
  15. dce

    dce Member

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    still failing. Same info as the parent post, the only difference is centmin mod is now 124.00stable. Ran cmupdate and disabled ngx_pagespeed in
    Hi eva2000

    Ran cmupdate and also disabled ngx_pagespeed in custom_config.inc
    Server information is the same as the parent post except the server is running the latest version of 124.00stable.

    Nginx upgrade failed.

    Here is the upgrade log
     
  16. eva2000

    eva2000 Administrator Staff Member

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Looks like it's related to Lua Nginx module, you actively using your own custom Lua code at Nginx level? If not you can disable the optional Lua Nginx module with ORESTY_LUANGINX='n' or remove ORESTY_LUANGINX='y' from persistent config file /etc/centminmod/custom_config.inc
    Code (Text):
    ../lua-nginx-module-0.10.19/src/ngx_http_lua_headers_in.c:156:50: error: ‘ngx_http_headers_in_t’ has no member named ‘cookies’; did you mean ‘cookie’?
      156 |                  offsetof(ngx_http_headers_in_t, cookies),
         |                                                  ^~~~~~~
    cc1: note: unrecognized command-line option ‘-Wno-vla-parameter’ may have been intended to silence earlier diagnostics
    make[1]: *** [objs/addon/src/ngx_http_lua_headers_in.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/svr-setup/nginx-1.23.1'
    make: *** [build] Error 2
    

    Centmin Mod 124.00stable uses Lua Nginx 0.10.19 while 130.00beta01 uses newer Lua Nginx 0.10.21 so that's probably why my 130.00beta01 tested Nginx 1.23.1 with Lua Nginx worked. Will see about updating 124.00stable's Lua Nginx version
     
  17. eva2000

    eva2000 Administrator Staff Member

    53,506
    12,132
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,675
    Local Time:
    12:26 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I've updated 124.00stable with updated Lua Nginx module versions, so try cmupdate to pull latest updates and then retry Nginx 1.23 update with NGINX_ONETWOTHREE_COMPAT='y' set
     
  18. dce

    dce Member

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    Thank you eva-2000. I am not using Lua functionality. I will do as instructed tonight and report back.
     
  19. dce

    dce Member

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    Did as you advised and Nginx upgraded successfully to 1.23.1

    Thank you for the usual stellar help!
     
  20. dce

    dce Member

    51
    7
    8
    Feb 21, 2018
    Ratings:
    +9
    Local Time:
    10:26 PM
    Actually, seems I spoke too soon! I was careless and did not check server and sites after the nginx upgrade. A few hours later, I got messages from Google Ads that landing pages could not be accessed. The site was down!
    Logged in and did a quick check on Nginx. When I tried to start it, I got the error below:

    Starting nginx (via systemctl): Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. [FAILED]

    The first time this server has been down in 4 years!

    Since it was a critical site and it had been down for a few hours and I needed it backup ASAP, I just restored the disk from a linode backup from a few days ago and got running again. Now I have to figure out what the problem is!

    To avoid further server interruptions while troubleshooting, I am going to deploy one of the linode backups to a new temporary instance and troubleshoot there. What is the best plan of action when a seemly successful compile of nginx causes nginx to stop running and not restart?