Welcome to Centmin Mod Community
Register Now

Issues with memcached

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Steve Tozer, Jul 28, 2014.

Tags:
  1. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    2:59 AM
    1.91
    10.0.19
    Hello,

    I have just done a clean install of centmin and having some issues with memcached.
    I have tried reinstalling but same thing when running

    service memcached start
    env: /etc/init.d/memcached: No such file or directory

    Using CentOS 6.5 64bit
    Latest stable version of centmin


    Thanks
     
  2. Matt

    Matt Well-Known Member

    925
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    2:59 AM
    1.5.15
    MariaDB 10.2
    Anything in the install log files (/root/centminlogs/*memcached_reinstall.log)?
     
  3. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    11:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    only just ~9hrs ago I updated .07 stable and .08 betas with a new /etc/init.d/memcached file Install - Centmin Mod 1.2.3-eva2000.07 stable install | Centmin Mod Community so not sure if it's related.

    you can as per troubleshooting guide How to troubleshoot Centmin Mod initial install issues | Centmin Mod Community do what Matt suggests to check the memcached reinstall log to see what the problem is as well as check if the /etc/init.d/memcached file actually exists

    Code:
    ls -lah /etc/init.d/memcached
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    11:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    k tested a .07 stable new install and problem was with the new file and windows/linux line endings heh. I have fixed it in the .07 zip

    You can just replace your memcached file on Centmin Mod installed server with one that works via commands

    Code:
    rm -rf /etc/init.d/memcached
    wget -O /etc/init.d/memcached https://gist.githubusercontent.com/centminmod/94940d2f1cd75c5e18dd/raw/memcached.sh
    chmod +x /etc/init.d/memcached
    another way of fixing this is converting the /etc/init.d/memcached file from Windows CRLF line endings to Unix LF line endings via dos2unix command

    Code:
    yum -y install dos2unix
    dos2unix /etc/init.d/memcached
     
    Last edited: Jul 28, 2014
  5. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    11:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    for next .08 beta will add a CRLF line ending check for custom init.d files for nginx, php-fpm, memcached and maybe nsd just to be on the safe side

    edit: committed to .08 betas CRLF line endings check for custom init.d files · c98db2e · centminmod/centminmod · GitHub

    i.e.

    Code:
    # add check for Windows CLRF line endings
    if [[ $(file /etc/init.d/memcached) =~ CRLF && -f /etc/init.d/memcached ]]; then
        if [ ! -f /usr/bin/dos2unix ]; then
            yum -q -y install dos2unix
        fi
        echo "detected CRLF line endings converting to Unix LF"
        dos2unix /etc/init.d/memcached
    fi
     
    Last edited: Jul 28, 2014
  6. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    2:59 AM
    1.91
    10.0.19
  7. eva2000

    eva2000 Administrator Staff Member

    53,190
    12,113
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,649
    Local Time:
    11:59 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you're welcome and thanks for the confirmation :)