Want to subscribe to topics you're interested in?
Become a Member

Upgrade Is this normal?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by Jon Snow, Jul 5, 2017.

  1. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: I think it was 123.09beta01 but should be latest now
    • Nginx Version Installed:
    • PHP Version Installed: 5.6.30
    • MariaDB MySQL Version Installed: 10.1.24
    So I upgraded from the latest beta (I think?) that was said to be almost similar to the stable version and just needed docs written to be called stable. Upgraded to the latest Centminmod version. Done it through the menu 23). Update Centmin Mod Code Base > Option 3).

    At the end it said :

    Code (Text):
    to update centmin mod 123.08stable branch repo via git
            cd /usr/local/src/centminmod
            git stash
            git pull
            chmod +x centmin.sh
    
    ####################### IMPORTANT #######################
     To complete update
    ####################### IMPORTANT #######################
     run:
    
      cd /usr/local/src/centminmod
    
     before invoking centmin.sh again
    ####################### IMPORTANT #######################
    
    shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
    sh: centmin.sh: No such file or directory
    You have new mail in /var/spool/mail/root

    I ran all of the above commands (some were up to date so I assume only the last was needed).

    When I logged back in via SSH, I no longer saw the centminmod stuff I'd normally see when logging in. I used the shortcode "centmin" to open the menu and centminmod was setting up. After a bit, I'm back at the menu.

    I've recently started opening up the menu so I'm not sure if this is normal behavior. Is it? And is that sh: centmin.sh: No such file or directory stuff anything I should worry about?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    that is ok if it only happens immediatelly and once after centmin.sh menu option 23, submenu option 3

    as long as subsequent calls to run centmin.sh are ok and error free

    the reason is getcwd can't find the /usr/local/src/centminmod updated directory until you re-enter /usr/local/src/centminmod i.e.
    Code (Text):
    cd /usr/local/src/centminmod
    

    hence why the end of routine states
    Code (Text):
    ####################### IMPORTANT #######################
     To complete update
    ####################### IMPORTANT #######################
     run:
    
      cd /usr/local/src/centminmod
    
     before invoking centmin.sh again
    ####################### IMPORTANT #######################
    
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    Can you post output for command
    Code (Text):
    alias
    

    and
    Code (Text):
    ls -lah /usr/local/src/
    
     
  4. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    Alias :
    Code (Text):
    alias cmdir='pushd /usr/local/src/centminmod'
    alias cp='cp -i'
    alias egrep='egrep --color=auto'
    alias fgrep='fgrep --color=auto'
    alias grep='grep --color=auto'
    alias l.='ls -d .* --color=auto'
    alias ll='ls -l --color=auto'
    alias ls='ls --color=auto'
    alias mv='mv -i'
    alias postfixlog='pflogsumm -d today --verbose_msg_detail /var/log/maillog'
    alias pwdh='echo -n "$HOSTNAME"; echo " $PWD"'
    alias rm='rm -i'
    alias top2='glances'
    alias wget='/usr/local/bin/wget'
    alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
    You have new mail in /var/spool/mail/root

    ls -lah /usr/local/src/ :
    Code (Text):
    total 12K
    drwxr-xr-x.  3 root root 4.0K Jul  5 07:34 .
    drwxr-xr-x. 18 root root 4.0K Jul  5 08:02 ..
    drwxr-xr-x  15 root root 4.0K Jul  5 07:34 centminmod
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    that looks correct :)
     
  6. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    I went ahead and made another upgrade through the menu btw :

    21). Update - Nginx + PHP-FPM + Siege

    After restarting the services, my site went down.
    Code:
    Restarting 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.
    More investigating :
    Code (Text):
    nginx: [emerg] module "ngx_http_image_filter_module" is already loaded in /usr/local/nginx/conf/dynamic-modules.conf:4
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed

    In /usr/local/nginx/conf/nginx.conf, I commented out :
    Code (Text):
    include /usr/local/nginx/conf/dynamic-modules.conf;

    And after a restart, my website was back up. I don't need that line, right?

    But there is one more problem :
    Code (Text):
    Starting php-fpm [05-Jul-2017 08:59:33] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20121212/mailparse.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20121212/mailparse.so: cannot open shared object file: No such file or directory in Unknown on line 0
     
  7. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    try doing centmin.sh menu 4 and 5 separately
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    you do need it so uncomment again
     
  9. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    Done 4 and 5.
    Site goes down and I can't restart :
    Code (Text):
    # nprestart
    Restarting 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]
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done

    More details :

    Code (Text):
    # systemctl status nginx.service
    ‚óŹ nginx.service - SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server
       Loaded: loaded (/etc/rc.d/init.d/nginx; bad; vendor preset: disabled)
       Active: failed (Result: exit-code) since Wed 2017-07-05 10:03:17 UTC; 1min 29s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 10332 ExecStop=/etc/rc.d/init.d/nginx stop (code=exited, status=0/SUCCESS)
      Process: 10341 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE)
     Main PID: 6429 (code=exited, status=0/SUCCESS)
    
    Jul 05 10:03:17 hostname.domain.com systemd[1]: Starting SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server...
    Jul 05 10:03:17 hostname.domain.com nginx[10341]: Starting nginx: nginx: [emerg] module "ngx_http_image_filter_module" is already loaded in /usr/...s.conf:4
    Jul 05 10:03:17 hostname.domain.com nginx[10341]: [FAILED]
    Jul 05 10:03:17 hostname.domain.com systemd[1]: nginx.service: control process exited, code=exited status=1
    Jul 05 10:03:17 hostname.domain.com systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
    Jul 05 10:03:17 hostname.domain.com systemd[1]: Unit nginx.service entered failed state.
    Jul 05 10:03:17 hostname.domain.com systemd[1]: nginx.service failed.
    Hint: Some lines were ellipsized, use -l to show in full.


    Code (Text):
    # journalctl -xe
    --
    -- Unit nginx.service has begun starting up.
    Jul 05 10:03:17 hostname.domain.com nginx[10341]: Starting nginx: nginx: [emerg] module "ngx_http_image_filter_module" is already loaded in /usr/local/nginx
    Jul 05 10:03:17 hostname.domain.com nginx[10341]: [FAILED]
    Jul 05 10:03:17 hostname.domain.com systemd[1]: nginx.service: control process exited, code=exited status=1
    Jul 05 10:03:17 hostname.domain.com systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server.
    -- Subject: Unit nginx.service has failed
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit nginx.service has failed.
    --
    -- The result is failed.
    Jul 05 10:03:17 hostname.domain.com systemd[1]: Unit nginx.service entered failed state.
    Jul 05 10:03:17 hostname.domain.com systemd[1]: nginx.service failed.
    Jul 05 10:03:17 hostname.domain.com polkitd[3200]: Unregistered Authentication Agent for unix-process:10326:260134505 (system bus name :1.19736, object path
    Jul 05 10:04:33 hostname.domain.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=f2:3c:91:60:dd:40:84:78:ac:57:aa:c1:08:00 SRC=91.230.47.38 DST=45.33
    Jul 05 10:04:33 hostname.domain.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=f2:3c:91:60:dd:40:84:78:ac:57:a8:41:08:00 SRC=119.1.109.17 DST=45.33
    Jul 05 10:05:01 hostname.domain.com systemd[1]: Started Session 9831 of user root.
    -- Subject: Unit session-9831.scope has finished start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-9831.scope has finished starting up.
    --
    -- The start-up result is done.
    Jul 05 10:05:01 hostname.domain.com systemd[1]: Starting Session 9831 of user root.
    -- Subject: Unit session-9831.scope has begun start-up
    -- Defined-By: systemd
    -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
    --
    -- Unit session-9831.scope has begun starting up.
    Jul 05 10:05:01 hostname.domain.com CROND[10365]: (root) CMD (/usr/lib64/sa/sa1 1 1)
    Jul 05 10:05:42 hostname.domain.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=f2:3c:91:60:dd:40:84:78:ac:57:aa:c1:08:00 SRC=119.1.109.17 DST=45.33
    Jul 05 10:06:18 hostname.domain.com kernel: Firewall: *TCP_IN Blocked* IN=eth0 OUT= MAC=f2:3c:91:60:dd:40:84:78:ac:57:a8:41:08:00 SRC=222.186.52.7 DST=45.33
    lines 1464-1498/1498 (END)
    
    
     
  10. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    contents of /usr/local/nginx/conf/dynamic-modules.conf ?
    Code (Text):
    cat /usr/local/nginx/conf/dynamic-modules.conf
     
  11. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    Code (Text):
    # place custom load_module lines in this dynamic-modules-includes.conf
    # file so that they persistent i.e. for manually dropped in dynamic modules
    include /usr/local/nginx/conf/dynamic-modules-includes.conf;
    load_module "modules/ngx_http_image_filter_module.so";
    load_module "modules/ngx_http_fancyindex_module.so";
    load_module "modules/ngx_stream_module.so";
    # place custom load_module lines in this dynamic-modules-includes.conf
    # file so that they persistent i.e. for manually dropped in dynamic modules
    include /usr/local/nginx/conf/dynamic-modules-includes.conf;
     
    Last edited: Jul 5, 2017
  12. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    that doesn't look right you have 2 include dynamic-modules-includes.conf files within the /usr/local/nginx/conf/dynamic-modules.conf file whereas working one has 1

    like this
    Code (Text):
    # place custom load_module lines in this dynamic-modules-includes.conf
    # file so that they persistent i.e. for manually dropped in dynamic modules
    include /usr/local/nginx/conf/dynamic-modules-includes.conf;
    load_module "modules/ngx_http_image_filter_module.so";
    load_module "modules/ngx_http_fancyindex_module.so";
    load_module "modules/ngx_stream_module.so";
    

    what's contained in your /usr/local/nginx/conf/dynamic-modules-includes.conf file ?
    Code (Text):
    cat /usr/local/nginx/conf/dynamic-modules-includes.conf
    

    by default it should be empty, the /usr/local/nginx/conf/dynamic-modules-includes.conf allows you to custom and load your own dynamic nginx modules which survive nginx recompiles.

    you can try to recompile nginx again but before hand manually delete the 2 include files
    Code (Text):
    rm -rf /usr/local/nginx/conf/dynamic-modules.conf
    rm -rf /usr/local/nginx/conf/dynamic-modules-includes.conf
    
     
  13. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    /usr/local/nginx/conf/dynamic-modules-includes.conf is empty.

    So I should use the commands at the bottom of your post to delete those files and recompile nginx? Just to confirm so I do the right thing, how do I recompile nginx? (Instructions to do so. Is it Centmin Mod Menu #4?).
     
  14. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    Yes those 2 rm -rf commands remove the files or you can use just rm command which prompts you to whether you want to delete

    recompile = centmin.sh menu option 4

    Code (Text):
    cd /usr/local/src/centminmod
    git pull
    ./centmin.sh
    


    If this nginx recompile fails, to troubleshoot, you need to check the the nginx and php upgrade logs (for previous mailparse extension error) 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 nginx_upgrade and php_upgrade logs. You can see full details at How to troubleshoot Centmin Mod initial install issues

    also what's output of
    Code (Text):
    nginx -t

    when you run centmin.sh menu option 4 there's a nginx upgrade log timestamped at /root/centminlogs

    if you type this command it lists all logs in date ascending order so latest log at bottom
    Code (Text):
    ls -lArt /root/centminlogs

    so copy the entire contents of latest nginx_upgrade log to gist.github.com or pastebin.com

    you can use grep to filter the logs, i.e. look for nginx_upgrade or php in log name
    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    

    Code (Text):
    ls -lahrt /root/centminlogs/ | egrep 'nginx_upgrade|php_upgrade'
    -rw-r--r--  1 root root  2.6M Oct  3 03:48 centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log
    -rw-r--r--  1 root root  664K Oct 12 09:24 centminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log
    

    So the last nginx upgrade log was named centminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log and located at /root/centminlogs/ccentminmod_1.2.3-eva2000.09.001_121016-092406_nginx_upgrade.log
    then use cat command to output the contents of that log. Do the same for php_upgrade.log log.

    clear your ssh window buffer/screen and type
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_031016-034409_php_upgrade.log

    then select and copy and paste output to pastebin.com or gist.github.com file to share. If your SSH client's scroll buffer isn't large enough using cat might not output the entire log file contents, so you may need to download the log and use local text editor to open and copy and paste.

    so only need content of 2 specific logs, in this case most recent nginx_upgrade.log and php_upgrade.log logs
     
  15. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    @eva2000 Should I run YUM install checks? That's what I've been doing every time.
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    only need to for initial 123.08stable to 123.09beta01 transition, subsequent times can answer no. Don't think it will cause your problems though.

    try calling centmin.sh like this
    Code (Text):
    cd /usr/local/src/centminmod
    git pull
    ./centmin.sh
    


    git pull is manual way and equivalent to centmin.sh menu option 23 submenu option 2 for centmin mod updates.
     
  17. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    Still fails to restart if I do not comment out include /usr/local/nginx/conf/dynamic-modules.conf;

    Going to get the log files now.
     
  18. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    And the two files remained deleted :
    • dynamic-modules.conf
    • dynamic-modules-includes.conf
     
  19. Jon Snow

    Jon Snow Active Member

    155
    25
    28
    Jun 30, 2017
    Ratings:
    +30
    Local Time:
    7:54 AM
    Nginx 1.13.4
    MariaDB 10.1.26
    @eva2000 Just confirming, but the nginx recompile went through fine (it said it was installed at the end at least). It's just that I can't restart nginx when I try to. The only way it works is by commenting out dynamic-modules.conf

    So should I try to troubleshoot centminmod?

    Or just get the output of nginx -t when nginx isn't restarting? I did this before in an earlier post btw - Upgrade - Is this normal?
     
  20. eva2000

    eva2000 Administrator Staff Member

    30,161
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,136
    Local Time:
    8:54 PM
    Nginx 1.13.x
    MariaDB 5.5
    yeah provide the nginx upgrade log post to pastebin.com or gist.github.com only way to know what nginx compiles are doing