[Koha-bugs] [Bug 28122] New: Remove old syslog config from SIPconfig.xml
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Apr 9 16:05:45 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28122
Bug ID: 28122
Summary: Remove old syslog config from SIPconfig.xml
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P5 - low
Component: SIP2
Assignee: koha-bugs at lists.koha-community.org
Reporter: magnus at libriotech.no
QA Contact: testopia at bugs.koha-community.org
It used to be that logging for the SIP2 server was configured in SIPconfig.xml:
<server-params
min_servers='1'
min_spare_servers='0'
log_file='Sys::Syslog'
syslog_ident='koha_sip'
syslog_facility='local6'
/>
The last 3 lines are the relevant ones. These lines are still present in the
template file for Debian packages:
https://git.koha-community.org/Koha-community/Koha/src/branch/master/debian/templates/SIPconfig.xml
Then "Bug 15253: Add Koha::Logger based logging for SIP2" added logging based
on log4perl for SIP2. But as far as I can see, the remnants of syslog config
makes the SIP2 server not run properly. To reproduce:
If you are on a dev setup (e.g. kohadevbox), copy the log4perl template to the
standard location:
$ sudo cp kohaclone/debian/templates/log4perl-site.conf.in
/etc/koha/log4perl-site.conf.in
Create a new site, called siptest:
$ sudo koha-create --create-db siptest
Verify that /etc/koha/sites/siptest/log4perl.conf has a section for SIP:
log4perl.logger.sip = DEBUG, SIP
log4perl.appender.SIP=Log::Log4perl::Appender::File
log4perl.appender.SIP.filename=/var/log/koha/siptest/sip.log
log4perl.appender.SIP.mode=append
log4perl.appender.SIP.layout=PatternLayout
log4perl.appender.SIP.layout.ConversionPattern=[%d] [%p] %m %l %n
log4perl.appender.SIP.utf8=1
Enable and start the SIP2 server:
$ sudo koha-sip --enable siptest
Enabling SIP server for siptest - edit /etc/koha/sites/siptest/SIPconfig.xml to
configure
$ sudo koha-sip --start siptest
Use ps to check if the SIP server is actually running:
$ ps aux | grep SIPServer
siptest+ 20084 0.0 0.0 18708 1732 ? S 15:40 0:00 daemon
--name=siptest-koha-sip --errlog=/var/log/koha/siptest/sip-error.log
--stdout=/var/log/koha/siptest/sip.log
--output=/var/log/koha/siptest/sip-output.log --verbose=1 --respawn --delay=30
--pidfiles=/var/run/koha/siptest --user=siptest-koha.siptest-koha -- perl
/home/vagrant/kohaclone/lib/C4/SIP/SIPServer.pm
/etc/koha/sites/siptest/SIPconfig.xml
vagrant 20294 0.0 0.0 12780 968 pts/0 R+ 15:44 0:00 grep SIPServer
This output means the daemon is running, but not the SIP-server itself.
Edit /etc/koha/sites/siptest/SIPconfig.xml and remove these three lines:
log_file='Sys::Syslog'
syslog_ident='koha_sip'
syslog_facility='local6'
Then restarte the SIP2 server:
$ sudo koha-sip --restart siptest
Then run ps again:
$ ps aux | grep SIPServer
siptest+ 20383 0.0 0.0 18708 196 ? S 15:44 0:00 daemon
--name=siptest-koha-sip --errlog=/var/log/koha/siptest/sip-error.log
--stdout=/var/log/koha/siptest/sip.log
--output=/var/log/koha/siptest/sip-output.log --verbose=1 --respawn --delay=30
--pidfiles=/var/run/koha/siptest --user=siptest-koha.siptest-koha -- perl
/usr/share/koha/lib/C4/SIP/SIPServer.pm /etc/koha/sites/siptest/SIPconfig.xml
siptest+ 20385 42.0 8.2 382120 169104 ? S 15:44 0:01 perl
/usr/share/koha/lib/C4/SIP/SIPServer.pm /etc/koha/sites/siptest/SIPconfig.xml
siptest+ 20390 0.0 7.6 382120 156460 ? S 15:44 0:00 perl
/usr/share/koha/lib/C4/SIP/SIPServer.pm /etc/koha/sites/siptest/SIPconfig.xml
vagrant 20392 0.0 0.0 12780 968 pts/0 S+ 15:44 0:00 grep SIPServer
Lines that contain "perl /usr/share/koha/lib/C4/SIP/SIPServer.pm
/etc/koha/sites/siptest/SIPconfig.xml" indicate the actual SIP2 server is
running.
I think what needs to be done is:
- Remove the 3 syslog-related lines from etc/SIPconfig.xml and
debian/templates/SIPconfig.xml
- Add a note to the release notes that the 3 lines need to be removed from
SIPconfig.xml fles that are in active use
PS! I have not looked deeply at *why* those three config lines makes the
SIPserver fail to run, just that removing them fixes the problem.
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list