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

patch unexpectedly ends; centmin.sh fails

Discussion in 'Bug Reports' started by RPGX, Mar 3, 2016.

  1. RPGX

    RPGX New Member

    26
    4
    3
    Aug 14, 2014
    Ratings:
    +4
    Local Time:
    1:38 AM
    Nginx 1.9.15
    MariaDB 5.5.50
    I was updating centmin and ran into a problem.


    Total course of events (1-4 may be irrelevant?):
    1) I went into /usr/local/src/centminmod and hit option 23.
    2) I chose to update the current version. This took a while, but appeared to work.
    3) Then I chose to update to new branch. Unsure which option to choose, I then hit 'enter' (blank line) thinking that it would take me back a menu; instead, it started a new git repository and erased centmin entirely. (Oops -- possibly not the most user friendly implementation?)
    4) I restored the centminmod directory from a nightly backup using copy -r
    5) I ran centmin.sh, option 23, option 2 (update on current branch); this worked again
    6) my current problem: centmin.sh now won't run, with error

    Code:
    patch unexpectedly ends in middle of line
    1 out of 1 hunk FAILED -- saving rejects to file memcached.rej
    ./centmin.sh: line 663: inc/custom_config.inc: No such file or directory
    I suspect that everything from 1-4 is irrelevant, but I include it for completeness.

    I'm unsure what to try. I'll point out that inc/custom_config.inc does exist, and I verified that it was looking for it in the right place (by uncommented the echo line above in in centmin.sh to show the directory)
     
  2. RPGX

    RPGX New Member

    26
    4
    3
    Aug 14, 2014
    Ratings:
    +4
    Local Time:
    1:38 AM
    Nginx 1.9.15
    MariaDB 5.5.50
    More info: I managed to find memcached.rej (written today, and the only one on the server), and here it is:

    Code:
    cat /etc/rc.d/init.d/memcached.rej
    --- memcached 2015-11-24 00:22:37.512363496 +0000
    +++ memcached.new 2015-11-23 23:53:57.166708853 +0000
    @@ -26,6 +26,13 @@
     PIDA='/var/run/memcached/memcached1.pid'
     PIDB='/var/run/memcached/memcached2.pid'
     
    +# 1.4.25 new slab options
    +# https://github.com/memcached/memcached/wiki/ReleaseNotes1425
    +MEM_CURVER=$(/usr/local/bin/memcached -V | awk '{print $2}' | head -n1 | sed -e 's|\.|00|g')
    +if [[ "$MEM_CURVER" -ge '10040025' ]]; then
    +        OPTIONS='-o slab_reassign,slab_automove,lru_crawler,lru_maintainer,maxconns_fast,hash_algorithm=murmur3'
    +fi
    +
     if [ -f /proc/user_beancounters ]; then
     ulimit -s 256
     
    
     
  3. RPGX

    RPGX New Member

    26
    4
    3
    Aug 14, 2014
    Ratings:
    +4
    Local Time:
    1:38 AM
    Nginx 1.9.15
    MariaDB 5.5.50
    More info:

    I added a 'pwd' to the script before line 663. The problem appears to be that when the script fails whatever it is doing with memcached, the current directory remains:

    /etc/init.d

    So when it gets to line 663, it is assuming that it is in the wrong place, and inc is not found. The line before (662) checks for the existence of the file, but is a complete path.
     
  4. RPGX

    RPGX New Member

    26
    4
    3
    Aug 14, 2014
    Ratings:
    +4
    Local Time:
    1:38 AM
    Nginx 1.9.15
    MariaDB 5.5.50
    For now I have commented out lines 207-222 of inc/cpcheck.inc, but as this skips some kind of memcached update (I don't know how crucial this is) and causes a check of memcached to fail, I would love a better solution!

    With those lines commented out, centmin.sh runs at least.
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    3:38 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You probably was running a restored backup that had a bug in it. Just do a fresh Centmin Mod code replacement by wiping /usr/local/src/centminmod as outlined similar to update guide here for older than .07 releases.

    replace branchname with branch you want either 123.08stable or 123.09beta01
    Code:
    branchname=123.08stable
    cd /usr/local/src
    rm -rf centminmod*
    git clone https://github.com/centminmod/centminmod.git centminmod
    cd centminmod
    git checkout -f $branchname
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    3:38 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    ah i see, that you centmin.sh can't update memcached; script fails at line 663 · Issue #52 · centminmod/centminmod · GitHub ? thank's understand what's going on now :)

    fixed with this commit update inc/cpcheck.inc fix memcachedupdatechecks · centminmod/centminmod@1993c68 · GitHub
     
    Last edited: Mar 3, 2016