Join the community today
Become a Member

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:
    12:55 PM
    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 Moderator Staff Member

    691
    319
    63
    May 25, 2014
    Sheffield, UK
    Ratings:
    +444
    Local Time:
    12:55 PM
    1.7.1
    MariaDB 10
    Anything in the install log files (/root/centminlogs/*memcached_reinstall.log)?
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    9:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    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

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    9:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
    • Like Like x 2
  5. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    9:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
    • Like Like x 1
  6. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    12:55 PM
    1.91
    10.0.19
    • Like Like x 1
  7. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    9:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    you're welcome and thanks for the confirmation :)