Bug 24383 - koha-create doesn't restart / empty memcached causing installer fail
Summary: koha-create doesn't restart / empty memcached causing installer fail
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (command-line installer) (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 6416 31124
Blocks:
  Show dependency treegraph
 
Reported: 2020-01-09 07:36 UTC by Joonas Kylmälä
Modified: 2024-01-10 03:25 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Kylmälä 2020-01-09 07:36:50 UTC
If in /etc/koha/koha-sites.conf I have defined USE_MEMCACHED="yes" and then I run "koha-create --create-db kvkoha" and after that "koha-remove kvkoha" and then again "koha-create --create-db kvkoha" then when I try to access the web installer page I get the following error:

> DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: Access denied for user 'koha_kvkoha'@'localhost' (using password: YES) at /usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1520. at /usr/share/koha/lib/Koha/Database.pm line 107

This seems to happen because the memcached instance still holds the database credentials from the first time koha-create was run. The solution is to clear the memcached cache:

> $ systemctl restart memcached

After this the web installer loads correctly.
Comment 1 Joonas Kylmälä 2020-01-09 08:50:51 UTC
My proposed fix for this is to clear the memcached cache in koha-create script either by restarting memcached or by using some memcached command line tool to clear the cache.
Comment 2 Jonathan Druart 2020-01-09 15:24:15 UTC
FYI bug 20116 will add misc/bin/clear_cache.pl.
Comment 3 Katrin Fischer 2023-12-31 12:33:37 UTC
(In reply to Jonathan Druart from comment #2)
> FYI bug 20116 will add misc/bin/clear_cache.pl.

It looks like this has been pushed - can this be solved now?
Comment 4 Jonathan Druart 2024-01-04 10:25:09 UTC
Once we have fixed the other koha-remove bugs, it should be trivial to fix.