I have PHP Memcached running I have binary turned on (both memcached process & php) I am using Memcached::setSaslAuthData Using Ubuntu 14.04
SASL is enabled I just continually get:
mech: ``PLAIN'' with 46 bytes of data SASL (severity 2): Password verification failed sasl result code: -20 Unknown sasl response: -20
From what I understand this means SASL_NO_USR I have created the user in sasldb2 The user running the memcached process has read/write permissions to /etc/sasldb2 When I run the sudo sasldblistusers2 -f /etc/sasldb2 command the user is listed.
Question: How do I properly troubleshoot/fix the password verification failure above.
Answer: Even with suggestions below I couldn't get this sorted. However I changed memcached to use a unix socket and modified the user permissions on the file.
# Run memcached as a daemon. This command is implied, and is not needed for the
# daemon to run. See the README.Debian that comes with this package for more
# information.
-d
#Start with sasl
#-S
# Log memcached's output to /var/log/memcached
logfile [location_of_log_file_here]
# Be verbose
-v
# Be even more verbose (print client commands as well)
#-vvvv
# Start with a cap of 64 megs of memory. It's reasonable, and the daemon default
# Note that the daemon will grow to this size, but does not start out holding this much
# memory
-m 128
# Run the daemon as root. The start-memcached will default to running as root if no
# -u command is present in this config file
-u [user_name_here]
# Specify which IP address to listen on. The default is to listen on all IP addresses
# This parameter is one of the only security measures that memcached has, so make sure
# it's listening on a firewalled interface.
# Default connection port is 11211
#-l $webServerIP
#-p $memcachedPort
#-U 0
# Specify which socket to listen to and user permissions for that socket (more secure and faster)
-s /var/run/php/memcached.sock
-a 755
# Limit the number of simultaneous incoming connections. The daemon default is 1024
-c 1024
# Lock down all paged memory. Consult with the README and homepage before you do this
# -k
# Return error when memory is exhausted (rather than removing items)
# -M
# Maximize core file limit
# -r
-B binary