How to read Koha error logs using the Tail command

If you manage a Koha Library Management System, you will eventually run into a "500 Internal Server Error" or a screen that simply won't load. When this happens, the Koha error logs are the best assistant. The Linux system records events like a personal diary. It tells exactly what went wrong and where.

The most efficient way to watch these errors in real time is to use the tail command in the Linux terminal. Here are simple instructions on how to do it.


Location of the log files

In a standard Koha installation (on Debian or Ubuntu), the logs are stored in /var/log/koha/. Inside that folder, each "instance" (your library's specific setup) has its own directory.
The most important log file is usually plack-error.log or koha-error.log.
The general path looks like this: /var/log/koha/instancename/plack-error.log
Before using the command, find the Koha instance name. The following command will help you find the instance name.

sudo koha-list

Using the tail command

The tail command shows you the last few lines of a file. This is perfect for logs because the newest errors are always added to the bottom.

To see the last 20 lines
If you just want a quick snapshot of the recent activity, type: 

sudo tail -n 20 /var/log/koha/library/plack-error.log

To watch errors live (The "-f" switch)
This is the most helpful tool for troubleshooting. The -f stands for follow. It keeps the file open and updates your screen the exact second a new error occurs.

sudo tail -f /var/log/koha/library/plack-error.log

While this command is running, go to your Koha staff interface and refresh the page that is causing the error. You will see the technical details pop up instantly in your terminal.

When you are finished reading the logs and want to go back to the regular command prompt, simply press Ctrl + C

Reading logs might seem confusing at first, but it is the fastest way to fix Koha issues. Instead of guessing why a page isn't working, use tail -f and let the system tell you exactly what is broken.

Excel to MARC Converter Online

Transform your Excel spreadsheets into standard MARC format. Developed by Shivam Moradia, College Librarian, St. Xavier's College (Autonomous), Ahmedabad, under the guidance of project mentor Dr. Meghna Vyas, Associate Professor, PG Department of Library and Information Science, Sardar Patel University, Vallabh Vidyanagar.

Here is the link.

https://excel-to-marc-convetor-online.netlify.app

Configure SMTP server to send emails through Koha

Now, it's easy to configure an SMTP-based email account for Koha and send emails for various occasions. Koha provides a GUI for SMTP server configuration. Forget about cumbersome email server configuration using Exim and Postfix. Here are the steps to configure the SMTP server using Gmail. Gmail is accessible for most of the users. Other SMTP-based email users can directly go to Step 2 for configuration. The process involves two steps; creating an app password for a Google account and adding the server details to the Koha ILS.

Email sending limits in Gmail: Reasons to hire a transactional email service

Many libraries started to use SMTP-based email services in Koha. Koha provides SMTP server configuration from Administration > SMTP servers > New SMTP server. Such libraries use Gmail free account as the email service provider. Gmail allow you to send 100 emails per day. Users can't send new messages for up to 24 hours if the number of messages exceeds the limit. Google says, "If a user exceeds their sending limits, their account might be suspended". Another drawback of using an ordinary Gmail account is that libraries can't add their domain to the email ID. Sending emails from an ordinary Gmail account is a non-professional approach.

What's the solution?

Libraries can use a dedicated email service to deliver emails. Hiring an SMTP email service to work with Koha is a good idea. Libraries can choose email services from an array of service providers. Such services enable sending, receiving, and tracking emails. Netcore, MailGun, and Mailchimp are examples of transactional email service providers. Libraries can subscribe to the plan based on the number of transactions per day. Email services give the SMTP server settings details to configure with Koha.

Search for data inconsistencies

 


It's a script which searches for data inconsistencies.  The result shows the following inconsistencies in data;

items without a home or holding library
items without item type or with invalid item type
bibliographic records without item type or with invalid item type
bibliographic records with invalid MARCXML
bibliographic records without biblionumber or biblioitemnumber in MARCXML
bibliographic records without title
invalid values in fields where the framework limits to an authorized value category
authority records without authority type or with invalid authority type
patrons who are too old or too young for their category

The above-mentioned inconsistencies create problems in circulation and cataloguing searches.

Apply the following commands individually to get the information on data inconsistencies.

Load environmental variables

sudo su
export PERL5LIB="/usr/share/koha/lib"
export KOHA_CONF="/etc/koha/sites/library/koha-conf.xml"

Enter into the folder where the data inconsistencies script is located.

cd /usr/share/koha/bin/maintenance

Apply the command to run the script.

./search_for_data_inconsistencies.pl

Reference 

Patron searches give 500 error

Problem statement: The following error message when searching for patron names.

Something went wrong when loading the table.
500: Internal Server Error. 
Month out of range.
Month out of range.
Month out of range.
Month out of range
.

Reason: The date_renewed column has some proper dates, some NULLs and some 0000-00-00.

Solution: Uupdate borrowers set date_renewed = NULL where date_renewed = '0000-00-00'. Enter into the MariaDB and apply the following commands,

sudo mysql -uroot -p
use koha_library;
UPDATE borrowers
SET date_renewed = NULL;

Idea courtesyMahesh Palamuttath

Reference


Prepare Google Drive for Koha backup

Everybody is familiar with using Google Drive. Google Drive is the cloud storage service of Google Inc. Currently, 15 GB of free storage is available with a Google account. Koha users can make use of Google Drive storage to keep database backups. GNOME desktop facilitates synchronising online accounts like Google, Nextcloud, Facebook, Microsoft, Flickr, etc.