I tried with and without UFW (disabled/enabled), I ran /etc/init.d/memcached status:
● memcached.service - memcached daemon
Loaded: loaded (/lib/systemd/system/memcached.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-05-11 22:14:15 UTC; 11min ago
Docs: man:memcached(1)
Main PID: 845 (memcached)
Tasks: 10 (limit: 2361)
CGroup: /system.slice/memcached.service
└─845 /usr/bin/memcached -m 64 -p 11211 -u www-data -l 127.0.0.1 -P /var/run/memcached/memcached.pid -s /v…id
May 11 22:14:15 atlantsecurity systemd[1]: Started memcached daemon.
May 11 22:14:16 atlantsecurity systemd-memcached-wrapper[845]: Could not open the pid file /var/run/memcached/memc…enied
Hint: Some lines were ellipsized, use -l to show in full.
telnet localhost 11211: returns:
telnet: Unable to connect to remote host: Connection refused
After a lot of troubleshooting, I figured that if I commented these lines in /etc/memcached.conf, it starts just fine on reboot:
# Use a pidfile
#-P /var/run/memcached/memcached.pid
#-s /var/www/memcached.sock
#-a 0770
#-p /tmp/memcached.pid
do you have an idea why these options prevent it from starting?