[Bug 36492] New: memcached: Unclear where the pid file of memcached should be
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36492 Bug ID: 36492 Summary: memcached: Unclear where the pid file of memcached should be Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Sometimes at container restart the memcached process does not come up for some reason. (Running Debian11.) In the logs I found: Could not open the pid file /var/run/memcached/memcached.pid.tmp for writing: No such file or directory The *funny* thing is that the init.d script refers to /var/run/memcached.pid but the /etc/memcached.conf file contains: -P /var/run/memcached/memcached.pid In my case this folder does not exist in /var/run. Seems like a Debian problem, but directly affects daily Koha operation. Solving it temporarily by a sed on memcached.conf. Maybe this workaround may also help others. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36492 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36492 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Changing the conf file is not the complete answer. Actually this fix from https://github.com/saz/puppet-memcached/issues/27 does it the other way around: mkdir /var/run/memcached chown memcache:memcache /var/run/memcached memcached.conf should (still) contain: -P /var/run/memcached/memcached.pid What happens now when stopping and starting? (Note that /etc/init.d/memcached stop does not work! Try: start-stop-daemon --stop --quiet --oknodo --retry 5 --name memcached) In var/run: -rw-r--r-- 1 root root 5 Apr 3 13:24 memcached.pid In var/run/memcached: -rw-r--r-- 1 memcache memcache 6 Apr 3 13:24 memcached.pid Both files contain the same PID but the latter one contains a newline too. A new stop/start will create new pid files. No warnings anymore. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36492 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- This confusing situation still exists under Debian 12 btw. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36492 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Still an issue as of today. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36492 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- @Tomas: Does KTD do something to prevent this from happening? Like removing BOTH pid files? /var/run/memcached.pid as well as /var/run/memcached/memcached.pid -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36492 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|memcached: Unclear where |memcached: Double pid file |the pid file of memcached |may cause memcached to not |should be |start up -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36492 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to Marcel de Rooy from comment #4)
@Tomas: Does KTD do something to prevent this from happening? Like removing BOTH pid files? /var/run/memcached.pid as well as /var/run/memcached/memcached.pid
It looks like KTD just uses the upstream memcached container image. There's no pid in /var/run. Found memcached in /usr/local/bin/memcached but that's about it at a glance. It looks like it's just running "memcached -m 64m" so all defaults. Couldn't see any config files. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org