[Bug 17342] New: Plack does not work after upgrading to 3.22.11
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Bug ID: 17342 Summary: Plack does not work after upgrading to 3.22.11 Change sponsored?: --- Product: Koha Version: 3.22 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: josef.moravec@gmail.com QA Contact: testopia@bugs.koha-community.org After upgrade to 3.22.11, plack does not start I used debian packages to install plack-error.log: Use of uninitialized value $ip in hash element at /usr/share/perl5/Cache/Memcached.pm line 267. Use of uninitialized value $ip in index at /usr/share/perl5/Cache/Memcached.pm line 293. Use of uninitialized value in subroutine entry at /usr/share/perl5/Cache/Memcached.pm line 302. Use of uninitialized value $ip in hash element at /usr/share/perl5/Cache/Memcached.pm line 267. Use of uninitialized value $ip in index at /usr/share/perl5/Cache/Memcached.pm line 293. Use of uninitialized value in subroutine entry at /usr/share/perl5/Cache/Memcached.pm line 302. Error while loading /etc/koha/plack.psgi: Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/x86_64-linux-gnu/perl5/5.20/Socket.pm line 833. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Context.pm line 107. Compilation failed in require at /usr/share/koha/lib/C4/Branch.pm line 22. BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Branch.pm line 22. Compilation failed in require at /etc/koha/plack.psgi line 30. BEGIN failed--compilation aborted at /etc/koha/plack.psgi line 30. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Andreas Jonsson <andreas.jonsson@kreablo.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andreas.jonsson@kreablo.se --- Comment #1 from Andreas Jonsson <andreas.jonsson@kreablo.se> --- The same problem is in koha 16.05.04 using the debian packages. The problem is that the memcached configuration variables are extracted from the apache configuration file incorrectly so you get '"127.0.0.1:11211"' including double quotes as the servers parameter to memcached. The below patch for koha-functions.sh fixes the problem. It is not nice to extract configuration from the apache configuration files like this. I would prefer if the memcached configuration was moved to the koha configuration file. diff --git a/debian/scripts/koha-functions.sh b/debian/scripts/koha-functions.sh index b6f1203..1e1d209 100755 --- a/debian/scripts/koha-functions.sh +++ b/debian/scripts/koha-functions.sh @@ -50,7 +50,7 @@ get_memcached_servers_for() local apache_file=$(get_apache_config_for $instance) local memcached_servers=$( grep 'MEMCACHED_SERVERS' ${apache_file} | - awk '{print $3}' | uniq + awk -F'[\t "]+' '{print $4}' | head -n 1 ) echo "${memcached_servers}" @@ -63,7 +63,7 @@ get_memcached_namespace_for() local apache_file=$(get_apache_config_for $instance) local memcached_namespace=$( grep 'MEMCACHED_NAMESPACE' ${apache_file} | - awk '{print $3}' | uniq + awk -F'[\t "]+' '{print $4}' | head -n 1 ) echo "${memcached_namespace}" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com | |, katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 --- Comment #2 from Josef Moravec <josef.moravec@gmail.com> --- In master the memcache configuration is set in koha-conf file, so I think for stable versions we could adapt this quick fix. See bug 11921 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17262 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Josef Moravec from comment #2)
In master the memcache configuration is set in koha-conf file, so I think for stable versions we could adapt this quick fix.
See bug 11921
Do you have a good idea for the fix? I really do not like the patch from bug 17262 actually. It won't work if the first virtualhost (from the apache config file) does not have a memcached config defined but the second has. It won't work either if the 2 are configured but are different. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Jonathan Druart from comment #3)
(In reply to Josef Moravec from comment #2)
In master the memcache configuration is set in koha-conf file, so I think for stable versions we could adapt this quick fix.
See bug 11921
Do you have a good idea for the fix? I really do not like the patch from bug 17262 actually. It won't work if the first virtualhost (from the apache config file) does not have a memcached config defined but the second has. It won't work either if the 2 are configured but are different.
I think we don't have a solution for these 2 cases actually and we will have to assume it will not happen (or not taken into account). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 55967 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=55967&action=edit Bug 17342: (bug 17262 follow-up) fix the way to retrieve memcached config from apache The problem is that the memcached configuration variables are extracted from the apache configuration file incorrectly so you get '"127.0.0.1:11211"' including double quotes as the servers parameter to memcached. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |andreas.jonsson@kreablo.se CC| |frederic@tamil.fr, | |mirko@abunchofthings.net, | |tomascohen@gmail.com Severity|enhancement |major -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 --- Comment #6 from Mirko Tietgen <mirko@abunchofthings.net> --- The fast fix is to disable memcached and wait for the real fix. I already built two package versions for 16.05.04 because of this. I am not doing another before this has been resolved properly. For the time being, comment out memcached in your config while I am on vacation. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55967|0 |1 is obsolete| | --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 56040 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56040&action=edit Bug 17342: (bug 17262 follow-up) fix the way to retrieve memcached config from apache The problem is that the memcached configuration variables are extracted from the apache configuration file incorrectly so you get '"127.0.0.1:11211"' including double quotes as the servers parameter to memcached. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Note this only applies on 3.22.x but it does fix the problem Definitely needed for 3.22.12 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56040|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 56048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56048&action=edit Bug 17342: (bug 17262 follow-up) fix the way to retrieve memcached config from apache The problem is that the memcached configuration variables are extracted from the apache configuration file incorrectly so you get '"127.0.0.1:11211"' including double quotes as the servers parameter to memcached. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Note this only applies on 3.22.x but it does fix the problem Definitely needed for 3.22.12 Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.22 |16.05 --- Comment #9 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Chris Cormack from comment #7)
Note this only applies on 3.22.x but it does fix the problem Definitely needed for 3.22.12
It's needed for 16.05.x as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Stable --- Comment #10 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 Josef Moravec <josef.moravec@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Plack does not work after |Plack does not work after |upgrading to 3.22.11 |upgrading to 3.22.11 and | |16.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17342 --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.12 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org