Bug 31567 - Onboarding stuck at "Cardnumber or Userid may already exist"
Summary: Onboarding stuck at "Cardnumber or Userid may already exist"
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Installation and upgrade (web-based installer) (show other bugs)
Version: 21.11
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-15 07:27 UTC by Magnus Enger
Modified: 2024-03-17 21:23 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 Magnus Enger 2022-09-15 07:27:48 UTC
I'm installing Koha 22.05.04-1 on Ubuntu 20.04.5, using the Debian packages. When I got to the "create a user" part of the onboarding I entered some made up user data and tried to save. This gave the message "The patron has not been created! Cardnumber or Userid may already exist." Tried with another cardnumber and userid, but got the same message. 

Checked the logs and saw this: 

==> /var/log/koha/koha/intranet-error.log <==
[Thu Sep 15 09:09:38.507240 2022] [cgi:error] [pid x] [client x.x.x.x:x] AH01215: {UNKNOWN}: Can't open /var/log/koha/koha/opac-error.log (Permission denied) at /usr/share/perl5/Log/Log4perl/Appender/File.pm line 151. at /usr/share/koha/lib/Koha/Patron.pm line 362: /usr/share/koha/intranet/cgi-bin/installer/onboarding.pl, referer: http://koha.example.com/cgi-bin/koha/installer/onboarding.pl

Checked the permissions of the logs files: 

$ sudo ls -l /var/log/koha/koha/*
-rw-r--r-- 1 koha-koha koha-koha       0 Sep 14 10:08 /var/log/koha/koha/indexer-error.log
-rw-r--r-- 1 koha-koha koha-koha 3884632 Sep 15 08:43 /var/log/koha/koha/indexer-output.log
-rw-r--r-- 1 root         root          259998 Sep 15 09:09 /var/log/koha/koha/intranet-error.log
-rw-r--r-- 1 root         root         5465262 Sep 14 16:33 /var/log/koha/koha/opac-error.log
-rw-rw-r-- 1 koha-koha koha-koha       0 Sep 15 06:25 /var/log/koha/koha/plack-api-error.log
-rw-rw-r-- 1 koha-koha koha-koha       0 Sep 15 06:25 /var/log/koha/koha/plack-intranet-error.log
-rw-rw-r-- 1 koha-koha koha-koha       0 Sep 15 06:25 /var/log/koha/koha/plack-opac-error.log
-rw-rw-r-- 1 koha-koha koha-koha       0 Sep 15 06:25 /var/log/koha/koha/sip.log
-rw-r--r-- 1 koha-koha koha-koha       0 Sep 14 10:08 /var/log/koha/koha/worker-error.log
-rw-r--r-- 1 koha-koha koha-koha     258 Sep 14 10:08 /var/log/koha/koha/worker-output.log
-rw-rw-r-- 1 koha-koha koha-koha       0 Sep 15 06:25 /var/log/koha/koha/z3950-error.log
-rw-r--r-- 1 koha-koha koha-koha       0 Sep 14 10:08 /var/log/koha/koha/zebra-error.log
-rw-r--r-- 1 koha-koha koha-koha       0 Sep 14 10:08 /var/log/koha/koha/zebra-output.log

Changed the ownership of all logs:

$ sudo chown koha-koha:koha-koha /var/log/koha/koha/*

And now I could add the patron without any problems. 

Two problems here: 

- The ownership of the logs
- The error message pointing in the wrong direction
Comment 1 Katrin Fischer 2024-03-17 21:23:03 UTC
I just had someone report this to me the other day as well - do you have an idea how the logs ended up with wrong permissions?