Learn about Centmin Mod LEMP Stack today
Register Now

Upgrade error in cpcheck.inc

Discussion in 'Install & Upgrades or Pre-Install Questions' started by upgrade81, Apr 19, 2019.

  1. upgrade81

    upgrade81 Member

    296
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    7:15 PM
    1.17
    10.3
    after updating with cmupdate (beta), launch centmin and return the following warning:


    Code:
    /usr/local/src/centminmod /usr/local/src/centminmod
    
    inc/cpcheck.inc: line 610: [[: 50000
    5092: syntax error in expression (error token is "5092")
    inc/cpcheck.inc: line 610: [[: 50000
    5092: syntax error in expression (error token is "5092")
    inc/cpcheck.inc: line 382: 4128
    1024: syntax error in expression (error token is "1024")
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com     


     
  2. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:15 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    related to detected values for nginx.conf when you set AUTOTUNE_CLIENTMAXBODY='y' and NGINX_ALLOWOVERRIDE='y' which are usually disabled by default

    what's the value of worker_connections and client_max_body_size options in /usr/local/nginx/conf/nginx.conf for your server ?
    Code (Text):
    grep 'worker_connections' /usr/local/nginx/conf/nginx.conf
    

    Code (Text):
    grep 'client_max_body_size' /usr/local/nginx/conf/nginx.conf
    
     
  3. upgrade81

    upgrade81 Member

    296
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    7:15 PM
    1.17
    10.3
    I understand, yes I touched those two parameters the other day.

    But I have not activated in the custom config ..
    AUTOTUNE_CLIENTMAXBODY='y'
     
  4. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:15 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Run these command to run centmin.sh in debug mode and saved contents to /root/centminlogs/centmin-debug.txt. wait until you return to command prompt for completion of debug mode
    Code (Text):
    cd /usr/local/src/centminmod
    echo 24 | bash -x centmin.sh 2>&1 | sed -e "s|$(hostname -f)|hostname|g" -e "s|$(hostname -s)|hostname|g" | tee /root/centminlogs/centmin-debug.txt
    

    then post the contents of /root/centminlogs/centmin-debug.txt to pastebin.com or gist.github.com and share the link here or private message me with the link
     
  5. eva2000

    eva2000 Administrator Staff Member

    58,905
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    3:15 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    from debug log shows both options are enabled
    Code (Text):
    + AUTOTUNE_CLIENTMAXBODY=y
    + USE_NGINXMAINEXTLOGFORMAT=n
    + NGINX_ALLOWOVERRIDE=y
    

    you might have 2 sets of worker_connections in nginx.conf ? one commented out for a value of 5092 ? that is probably tripping up centmin.sh routine so remove 2nd commented out worker_connections with value 5092
    Code (Text):
    + update_nginxconf
    + [[ -f /usr/local/nginx/conf/nginx.conf ]]
    + [[ y = [yY] ]]
    ++ LC_ALL=C
    ++ grep -w worker_connections /usr/local/nginx/conf/nginx.conf
    ++ column -t
    ++ tr -s ' '
    ++ sed -e 's|;||g'
    ++ LC_ALL=C
    ++ grep -v worker_connections
    ++ awk '{print $2}'
    + NGX_WRKCON='50000
    5092'
    ++ LC_ALL=C
    ++ grep -w keepalive_timeout /usr/local/nginx/conf/nginx.conf
    ++ column -t
    ++ tr -s ' '
    ++ sed -e 's|;||g'
    ++ awk '{print $2}'
    ++ LC_ALL=C
    ++ grep -v keep
    + NGX_KT=6s
    + [[ 50000
    5092 -eq 4096 ]]
    inc/cpcheck.inc: line 610: [[: 50000
    5092: syntax error in expression (error token is "5092")
    + [[ 50000
    5092 -eq 10000 ]]
    inc/cpcheck.inc: line 610: [[: 50000
    5092: syntax error in expression (error token is "5092")
    

    same issue for client_max_body_size with 2 values for it, one might be commented out for 1024m size ?
    Code (Text):
     [[ y = [yY] ]]
    ++ awk '/client_max_body_size/ {print $2}' /usr/local/nginx/conf/nginx.conf
    + GET_CLIENTMAXBODY='4128m;
    1024m;'
    ++ echo '4128m;' '1024m;'
    ++ LC_ALL=C
    ++ grep m
    + [[ -n 4128m; 1024m; ]]
    ++ awk '/client_max_body_size/ {print $2}' /usr/local/nginx/conf/nginx.conf
    ++ sed -e 's|m;||'
    inc/cpcheck.inc: line 382: 4128
    1024: syntax error in expression (error token is "1024")
    
     
  6. upgrade81

    upgrade81 Member

    296
    17
    18
    Sep 5, 2016
    CH
    Ratings:
    +30
    Local Time:
    7:15 PM
    1.17
    10.3
    yes, exactly, they are commented.
    I provide to put them back as they were before.

    Thanks