Welcome to Centmin Mod Community
Become a Member

Nginx Dynamic Modules stopped working after update (1.11.09 to 1.11.10)

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Simon Brown, Feb 21, 2017.

  1. Simon Brown

    Simon Brown Premium Member Premium Member

    60
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    2:10 PM
    1.11.9
    I'll live with it :)
    Just so you know this is a brand new dedicated server that's just come online a week or two ago.
    There's no other software on there except the centmin installs.

     
  2. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    one more thing can you post output for this command
    Code (Text):
    strings /usr/local/nginx/modules/ngx_http_image_filter_module.so | egrep '1\.11|\.so|111'
    

    and
    Code (Text):
    strings /usr/local/nginx/modules/ngx_http_image_filter_module.so.old | egrep '1\.11|\.so|111'
    

    Might want to use CODE tags for code How to use forum BBCODE code tags :)

    i.e.
    Code (Text):
     strings /usr/local/nginx/modules/ngx_http_image_filter_module.so.old | egrep '1\.11|\.so|111'
    librt.so.1
    libjemalloc.so.1
    libgd.so.2
    libc.so.6
    8,4,8,0000111111010111001111111111100110
    /svr-setup/nginx-1.11.10
    /svr-setup/nginx-1.11.10
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Also FYI, yum check prompt you can answer no to on nginx and php updates to speed up compiles :)
     
  4. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    ah found your problem nothing to do with dynamic modules, for some reason your nginx init.d service file is missing see error on this line of your nginx_upgrade log gist:0e8c0b87f97e9ddd664a8ce5e118f63d · GitHub

    Code (Text):
    inc/nginx_upgrade.inc: line 806: /etc/init.d/nginx: No such file or directory

    but don't know how you are able to use 1.11.9 and restart ??

    does /etc/init.d/nginx exist on your system?
    Code (Text):
    ls -lah /etc/init.d/nginx
    

    i.e.
    Code (Text):
    ls -lah /etc/init.d/nginx
    -rwxr-xr-x. 1 root root 2.0K Nov 25 08:19 /etc/init.d/nginx
    

    try copying over a fresh version from local centmin mod config directory at /usr/local/src/centminmod/init/nginx
    Code (Text):
    \cp -f /usr/local/src/centminmod/init/nginx /etc/init.d/nginx
    chmod +x /etc/init.d/nginx
    chkconfig nginx on
    
     
    Last edited: Feb 22, 2017
  5. Simon Brown

    Simon Brown Premium Member Premium Member

    60
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    2:10 PM
    1.11.9
    Wow, that is interesting... so the answer is 'no' there wasn't. How come Nginx was starting and working fine?

    Code (Text):
    ls -lah /etc/init.d/nginx
    ls: cannot access /etc/init.d/nginx: No such file or directory


    I've now followed your terminal commands and it's copied over:

    Code (Text):
    ls -lah /etc/init.d/nginx
    -rwxr-xr-x 1 root root 2.0K Feb 21 15:14 /etc/init.d/nginx


    Will this start two Nginx services?
     
  6. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    no idea on that one, you shouldn't even be able to start nginx if it was missing !

    edit: i know now, without init.d/nginx nginx 1.11.9 continued to run hence the dynamic module errors ! downgrade from 1.11.10 to 1.11.9 didn't do anything really as no init.d/nginx to restart the service so existing 1.11.9 binary was still in use.

    no just 1 instance, using nprestart should work now even for 1.11.10
     
  7. Simon Brown

    Simon Brown Premium Member Premium Member

    60
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    2:10 PM
    1.11.9
    Hmmmm, that didn't work...
    Code (Text):
    nginx: [emerg] module "/usr/local/nginx/modules/ngx_http_image_filter_module.so" version 1011010 instead of 1011009 in /usr/local/nginx/conf/dynamic-modules.conf:1
     
  8. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    try
    Code (Text):
    systemctl daemon-reload
    ngxrestart
    


    Might need to go back to initial install log to see whether nginx cleanly installed the first time. If you want to dig deeper, to troubleshoot initial installation, you need to check the initial install log 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 initial install log. You can see full details at How to troubleshoot Centmin Mod initial install issues

    Example list /root/centminlogs files in date ascending order and grep for install.log
    Code (Text):
    ls -lahrt /root/centminlogs | grep install.log
    

    example output returns install log at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    Code (Text):
    ls -lahrt /root/centminlogs | grep install.log
    -rw-r--r--  1 root root 2.2M Oct 11 01:40 centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    

    in SSH use cat to ouput contents of /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log. Clear your SSH client window/buffer so only output is the contents of the file
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_install.log
    

    Then copy and paste into Pastebin.com or Gists entry. If your SSH window scroll buffer isn't that large to get the whole contents of the install log, you can download file manually and copy and paste contents. But makes sure it's sanitised version of the contents of the initial install log as outlined at How to troubleshoot Centmin Mod initial install issues
     
  9. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    also post the latest nginx_upgrade log for the most recent 1.11.10 upgrade
     
  10. Simon Brown

    Simon Brown Premium Member Premium Member

    60
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    2:10 PM
    1.11.9
    Hi again,
    first off thank you so much for your help so far. This is a weird one!

    The reload, restart didn't work.

    Here's the logs
    Install: snipped
    Upgrade: gist:392b6f16e8337a042398d738db209088 · GitHub

    If you're open to the idea I happy to pay you for an hour or two to access the server and workout what's going on?
     
  11. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    removed the install log as it wasn't sanitised for passwords contained in it !

    let's see what those logs reveal first.

    so what does command report now ?
    Code (Text):
    nginx -t
    
     
  12. Simon Brown

    Simon Brown Premium Member Premium Member

    60
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    2:10 PM
    1.11.9
    Oh no!... I forgot key access wasn't setup then :-/
    Thanks for noticing so quickly...
     
  13. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Yeah install log can be tricky hence why i ask folks to sanitise it first :)

    For initial install log noticed you had an older version of nginx installed before centmin mod was installed ? 1.10.2
    Code (Text):
    [1;32;40m===============================================================================
    (B[m[1;33;40m* Nginx Update May Be Available via centmin.sh menu option 4
    (B[m[1;33;40m* see https://centminmod.com/nginx.html#nginxupgrade
    (B[m[1;32;40m===============================================================================
    (B[m[1;33;40m* Current Nginx Version: 1.10.2
    (B[m[1;33;40m* Latest Nginx Available: 1.11.9
    (B[m[1;32;40m===============================================================================
    (B[m
    


    what is output for
    Code (Text):
    yum list nginx --disableexcludes=main --disableplugin=priorities
    
     
  14. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    also noticing the differences in initial install log's nginx part when stripping binaries the after stripping nginx binary reports correct smaller size for initial install
    Code (Text):
    make[1]: Leaving directory `/svr-setup/nginx-1.11.9'
    
    real    0m31.923s
    user    2m58.610s
    sys    0m32.095s
    
    strip nginx binary...
    -rwxr-xr-x 1 root root 11M Feb  8 17:49 objs/nginx
    -rwxr-xr-x 1 root root 3.1M Feb  8 17:49 objs/nginx
    

    But on upgrade attempts it isn't
    Code (Text):
    make[1]: Leaving directory `/svr-setup/nginx-1.11.10'
    
    real    0m53.276s
    user    4m47.600s
    sys    0m53.433s
    
    strip nginx binary...
    -rwxr-xr-x 1 root root 27M Feb 21 15:27 objs/nginx
    -rwxr-xr-x 1 root root 14M Feb 21 15:27 objs/nginx
    
    
    Tue Feb 21 15:27:19 UTC 2017
    Success: Nginx make ok
    


    also noticed some differences in paths between your latest nginx upgrade log and my working nginx upgrade log on centos 7.. are you using real full root user or did you setup a sudo user with root privileges ?

    also now that you have working nginx init.d enable ngx_pagespeed as a dynamic module in persistent config
    Code (Text):
    NGXDYNAMIC_NGXPAGESPEED='y'
    NGINX_PAGESPEED='y'
    

    probably why stripped nginx binary is still 14M in size :)

    left is your nginx upgrade log, right is mine

    compare-nginxlogs-01.png

    compare-nginxlogs-02.png
     
  15. Simon Brown

    Simon Brown Premium Member Premium Member

    60
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    2:10 PM
    1.11.9
    Here's the output:
    Code (Text):
    Installed Packages
    nginx.x86_64                        1:1.10.2-1.el7                         @epel
     
  16. Simon Brown

    Simon Brown Premium Member Premium Member

    60
    6
    8
    Feb 9, 2017
    Ratings:
    +18
    Local Time:
    2:10 PM
    1.11.9
    Oookay, didn't know there was already an old version of Nginx installed!... How can I fix the directory structure so Nginx works as it should for Centmin?

    I'm not sure exactly what I'm looking for but I can see the diff's.

    Yeah, I have 'real full root user' access, no sudo user(s).

    Do I have a working Nginx init.d?... I still can't upgrade to 1.11.10.

    You've been absolutely amazing with your help. The offer is still there if you can/want to access my server and I pay you for an hour of two :)
     
  17. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:10 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    check your private conversations :)