Learn about Centmin Mod LEMP Stack today
Become a Member

Upgrade PHP-FPM Beta Branch Centmin Mod .09 beta branch Testing

Discussion in 'Beta release code' started by eva2000, Aug 12, 2015.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    Interesting bug I sometimes get in 123.09beta01 initial installs as well as nginx upgrades involving LIBRESSL_SWITCH='n' to use openssl for Nginx. Seems openssl download domain reports invalid hostname on some servers despite the curl check working = HTTP/1.1 200 OK report !

    Code (Text):
    HTTP/1.1 200 OK
    Download openssl-1.0.2k.tar.gz ...
    2017-02-15 06:30:29 URL:https://www.openssl.org/source/openssl-1.0.2k.tar.gz [5309236/5309236] -> "openssl-1.0.2k.tar.gz" [1]
    http://: Invalid host name.
    FINISHED --2017-02-15 06:30:29--
    Total wall clock time: 0.3s
    Downloaded: 1 files, 5.1M in 0.3s (17.3 MB/s)
    Error: openssl-1.0.2k.tar.gz download failed.
    check Centmin Mod log for details at /root/centminlogs/
    Aborting script...


    Weird indeed only happens on some VPSes. Any other folks run into this ?


    Seems download url uses Akamai backed DNS
    Code (Text):
    dig $(echo "${OPENSSL_LINK}" | awk -F "/" '{print $3}')      
    
    ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> www.openssl.org
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35458
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;www.openssl.org.               IN      A
    
    ;; ANSWER SECTION:
    www.openssl.org.        170     IN      CNAME   www-ds.openssl.org.edgekey.net.
    www-ds.openssl.org.edgekey.net. 18844 IN CNAME  e3102.dscx.akamaiedge.net.
    e3102.dscx.akamaiedge.net. 19   IN      A       23.78.224.101
    
    ;; Query time: 20 msec
    ;; SERVER: 8.8.8.8#53(8.8.8.8)
    ;; WHEN: Wed Feb 15 09:06:01 2017
    ;; MSG SIZE  rcvd: 129
    


    Made some updates to 123.09beta01 to only attempt to download openssl tarball when LIBRESSL_SWITCH='n' is set. Default is for LIBRESSL_SWITCH='y' to use LibreSSL with Nginx.
     
    Last edited: Feb 15, 2017
  2. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
  3. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    Add devtoolset-6 GCC 6.2 support via optional DEVTOOLSETSIX='y' variable you can enable as alternative to devtoolset-4 GCC 5.3 for Nginx and PHP compiles community.centminmod.com/posts/45232/
     
  4. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x

    Update tools/backup-perm.sh



    Created dedicated thread for discussing this at https://community.centminmod.com/th...kup-restore-file-directory-permissions.10633/

    From getting started guide step 2

    When you upload via root user in sftp etc, you upload files as root user/group permissions so need to change them to nginx user/group. You can do that manually as per getting started guide step 2 or via cronjob run for tools/backup-perm.sh script. Just updated 123.09beta01's tools/backup-perm.sh script to also ensure nginx user/group permissions are set so you can copy the /usr/local/src/centminmod/tools/backup-perm.sh script to /home/nginx/domains/domain.com/tools/backup-perm.sh

    copy archive flag to preserve permssions where domain.com is your domain name

    Code (Text):
    mkdir -p /home/nginx/domains/domain.com/tools
    cp -a /usr/local/src/centminmod/tools/backup-perm.sh /home/nginx/domains/domain.com/tools/backup-perm.sh
    

    then as per script instructions setup cronjob

    the instructions
    Code (Text):
    ################################################################
    # 1, for centminmod.com LEMP stacks to be placed in
    # /home/nginx/domains/domain.com/tools/backup-perm.sh
    #
    # 2. setup cronjob to run every 6 hours at 11th minute
    # 11 */6 * * * /home/nginx/domains/domain.com/tools/backup-perm.sh backup 2>&1 /dev/null
    #
    

    set cronjob change domain.com to your domain name
    Code (Text):
    11 */6 * * * /home/nginx/domains/domain.com/tools/backup-perm.sh backup 2>&1 /dev/null
    


    example manual run
    Code (Text):
    /home/nginx/domains/newdomain.com/tools/backup-perm.sh backup
    
    -------------------------------------------------------
     backup directory & file permissions for:
     /home/nginx/domains/newdomain.com
    -------------------------------------------------------
    -rw-r--r-- 1 root nginx 3.8K Feb 26 04:11 /home/nginx/domains/newdomain.com/backup/permissions/permissions-260217-041103.acl
    -------------------------------------------------------
    
    ensure directory and files have correct nginx user:group permission
    /usr/bin/chown -R nginx:nginx /home/nginx/domains/newdomain.com
    
    total 0
    drwxr-s--- 7 nginx nginx  73 Feb 26 03:57 .
    drwxr-s--- 4 nginx nginx  49 Feb 26 03:57 ..
    drwxr-s--- 3 nginx nginx  25 Feb 26 03:58 backup
    drwxr-s--- 2 nginx nginx  41 Feb 26 03:57 log
    drwxr-s--- 2 nginx nginx   6 Feb 26 03:57 private
    drwxr-s--- 2 nginx nginx 191 Feb 26 04:00 public
    drwxr-sr-x 2 nginx nginx  28 Feb 26 03:58 tools
    

    Permissions backed up to /home/nginx/domains/newdomain.com/backup/permissions/permissions-260217-041103.acl

    Example excerpt from contents of /home/nginx/domains/newdomain.com/backup/permissions/permissions-260217-041103.acl
    Code (Text):
    cat /home/nginx/domains/newdomain.com/backup/permissions/permissions-260217-041103.acl
    # file: /home/nginx/domains/newdomain.com
    # owner: nginx
    # group: nginx
    # flags: -s-
    user::rwx
    group::r-x
    other::---
    
    # file: /home/nginx/domains/newdomain.com/public
    # owner: nginx
    # group: nginx
    # flags: -s-
    user::rwx
    group::r-x
    other::---
    
    # file: /home/nginx/domains/newdomain.com/public/index.html
    # owner: nginx
    # group: nginx
    user::rw-
    group::r--
    other::---
    


    Created dedicated thread for discussing this at https://community.centminmod.com/th...kup-restore-file-directory-permissions.10633/
     
    Last edited: Feb 26, 2017
  5. KeVo

    KeVo Active Member

    180
    71
    28
    May 28, 2014
    Ratings:
    +101
    Local Time:
    9:58 AM
    1.11.x
    10.1.18
    Is the custom_config file supposed to be set to 'n' then? Just installed betainstaller-latest and it was set to 'n' by default in the custom_config.inc file. Unless that's the way you meant to have it set up? heh
     
  6. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    betainstaller-latest.sh is as the name suggests it uses latest advances and enables what is usually disabled stuff from normal betainstaller.sh like switching to OpenSSL via LIBRESSL_SWITCH='n' via persistent config file so normal :)
     
  7. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
  8. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    12:58 AM
    I just updated one of my servers to .09beta01 and everything seems ok, except when I exit new version of centmin option 24, I have this error:

    Code:
     Centmin Mod local code is up to date at /usr/local/src/centminmod
     no available updates at this time...
    -------------------------------------------------------------
    /usr/bin/centmin: line 3: h: command not found
    
     
  9. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    strange there shouldn't even be a line 3 in that file /usr/bin/centmin
    Code (Text):
    #!/bin/bash
    pushd "/usr/local/src/centminmod"; bash centmin.sh
    
     
  10. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    12:58 AM
    There was a whitespace third line. I deleted it and no error message now.

    Also, I noticed that starting centmin menu is very slow now. Almost 15-20 seconds until I see the menu.
     
  11. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    weird one !

    When was last time you updated centmin mod code via centmin.sh menu option 23 ? some things have changed with more checks at centmin.sh menu launch and depending on your network connectivity speed could be slower.

    You can run centmin.sh in verbose debug mode and see where the slowness is
    Code (Text):
    cd /usr/local/src/centminmod
    bash -x centmin.sh
    

    then hit 24 to exit menu

    copy and paste output to gist.github.com or pastebin.com for investigating. You maybe able to visually see where it hangs up
     
  12. ethanpil

    ethanpil Active Member

    173
    55
    28
    Nov 8, 2015
    Ratings:
    +101
    Local Time:
    12:58 AM
    this was an update from 08 on this server... never had 09 here yet
     
  13. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    Ah guess i need to revisit 123.08stable to 123.09beta01 upgrade routines :)

    But yes, that means alot of initial centmin.sh triggered checks would happen to bring 123.08stable environment up to 123.09beta01 levels.
     
  14. Epic Internet Marketing

    Epic Internet Marketing Member

    40
    7
    8
    Aug 3, 2014
    New York, NY
    Ratings:
    +18
    Local Time:
    12:58 AM
    1.12.x | PHP 7.1.x
    10.1
    @eva2000 most recent fresh installs of beta builds are not passing nginx -t (minimal and regular beta installer on centos 7)
    nginx: [emerg] unknown directive "set_unescape_uri" in /usr/local/nginx/conf/wpincludes/XXX.com/rediscache_XXXXXXX.com.conf:39
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed​
     
    Last edited: Mar 14, 2017
  15. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    strange that would only happen if you set NGINX_OPENRESTY='n' in persistent config /etc/centminmod/custom_config.inc as that controls whether nginx set-misc-nginx-module is installed and it's required for redis cache at nginx level GitHub - openresty/set-misc-nginx-module
     
  16. Epic Internet Marketing

    Epic Internet Marketing Member

    40
    7
    8
    Aug 3, 2014
    New York, NY
    Ratings:
    +18
    Local Time:
    12:58 AM
    1.12.x | PHP 7.1.x
    10.1
    Just installed a fresh wordpress with option #2 redis cache enabled, no special configs or anything else set. This is actually my 3rd attempt in the last 24 hours, once on Linode, 2x on openvz ramnode.
     
  17. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    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
     
  18. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    post output for
    Code (Text):
    nginx -V
    

    to see if required Openresty nginx modules like set-misc are compiled

    edit: just tested centmin.sh menu option 22 for wordpress auto install with redis caching at nginx level option 2 and works fine
    bold highlight are some of Openresty nginx modules required for redis caching at nginx level when OPENRESTY_NGINX='y' is set (the default is enabled)
     
  19. Epic Internet Marketing

    Epic Internet Marketing Member

    40
    7
    8
    Aug 3, 2014
    New York, NY
    Ratings:
    +18
    Local Time:
    12:58 AM
    1.12.x | PHP 7.1.x
    10.1
    I'm using OpenVZ ramnode centos 7 minimal install. this is the error that starts it immediately after a fresh rediscache option 22 then 2 install:
    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.​
    then nginx -V results

    nginx version: nginx/1.11.10
    built by clang 3.4.2 (tags/RELEASE_34/dot2-final)
    built with LibreSSL 2.4.5
    TLS SNI support enabled
    configure arguments: --with-ld-opt='-lrt -ljemalloc -Wl,-z,relro -Wl,-rpath,/usr/local/lib' --with-cc-opt='-m64 -mtune=native -mfpmath=sse -g -O3 -fstack-protector -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wno-sign-compare -Wno-string-plus-int -Wno-deprecated-declarations -Wno-unused-parameter -Wno-unused-const-variable -Wno-conditional-uninitialized -Wno-mismatched-tags -Wno-sometimes-uninitialized -Wno-parentheses-equality -Wno-tautological-compare -Wno-self-assign -Wno-deprecated-register -Wno-deprecated -Wno-invalid-source-encoding -Wno-pointer-sign -Wno-parentheses -Wno-enum-conversion -Wno-c++11-compat-deprecated-writable-strings -Wno-write-strings -gsplit-dwarf' --sbin-path=/usr/local/sbin/nginx --conf-path=/usr/local/nginx/conf/nginx.conf --with-http_stub_status_module --with-libatomic --with-http_gzip_static_module --with-http_geoip_module --with-stream_geoip_module --with-stream_realip_module --with-stream_ssl_preread_module --with-threads --with-stream=dynamic --with-stream_ssl_module --with-http_realip_module --add-module=../ngx_cache_purge-2.3 --add-module=../ngx_http_redis-0.3.7 --add-module=../headers-more-nginx-module-0.32 --with-pcre=../pcre-8.40 --with-pcre-jit --with-zlib=../zlib-1.2.11 --with-http_ssl_module --with-http_v2_module --with-openssl=../libressl-2.4.5
    [root@epicXXX ~]# nginx -t
    nginx: [emerg] unknown directive "set_unescape_uri" in /usr/local/nginx/conf/wpincludes/XXXXX.com/rediscache_XXXXX.com.conf:39
    nginx: configuration file /usr/local/nginx/conf/nginx.conf test failed​
     
  20. eva2000

    eva2000 Administrator Staff Member

    49,039
    11,235
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,488
    Local Time:
    12:58 AM
    Nginx 1.21.x
    MariaDB 10.x
    yup @Epic Internet Marketing you are missing all the highlighted Nginx modules from OPENRESTY_NGINX='y' setting in your output - check /etc/centminmod/custom_config.inc to see if you have set OPENRESTY_NGINX='n'. If you have remove the variable and then start centmin.sh to recompile nginx via centmin.sh menu option 4.