Bug 39155

Summary: plack.psgi does not start if a logfile in log4perl.conf is not writable
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39153
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Marcel de Rooy 2025-02-18 13:56:02 UTC
Just stumbled over this while looking at bug 39153.

Your plack-error.log will have lots of:

Error while loading /etc/koha/plack.psgi: Can't load application from file "/usr/share/koha/api/v1/app.pl": Can't open /var/log/koha/myclone/sip.log (Permission denied) at /usr/share/perl5/Log/Log4perl/Appender/File.pm line 151.
Compilation failed in require at (eval 1988) line 1.
Child process 5032 exited with status 13

What is the issue here? I created sip.log with owner root and mode 600.
Comment 1 Marcel de Rooy 2025-02-18 14:12:49 UTC
If log4perl.conf is not found, plack.psgi does not start either:

Lost of:

Error while loading /etc/koha/plack.psgi: Can't load application from file "/usr/share/koha/api/v1/app.pl": Cannot open /etc/koha/sites/myclone/log4perl.conf (No such file or directory) at /usr/share/perl5/Log/Log4perl/Config/BaseConfigurator.pm line 51.
Compilation failed in require at (eval 1988) line 1.
Child process 6682 exited with status 2