16th July 2021
For last few days was trying to see if "Elasticsearch" can be configured for Koha.
Tried installing Elasticsearch version 7.* but it did not work then installed ElasticSearch 6.* and without doing any further configuration tried building elasticsearch index.
It worked but it is autmatically going in non functioning mode. It does not show any records.
When tried rebuilding indexes again it threw error
koha-elasticsearch --rebuild --delete --biblios --authorities ncl
[NoNodes] ** No nodes are available: [http://127.0.0.1:9200], called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /usr/share/koha/lib/Koha/SearchEngine/Elasticsearch/Indexer.pm line 416.Something went wrong rebuilding indexes for ncl
It automatically stopped working. Hence ElasticSearch is not still in properly working. Will wait for some more time and then explore ElasticSearch feature.
7th January 2021
To change library code assigned in Koha at the backend one has to update following table
UPDATE `branches` SET `branchname` = 'NCL' WHERE `branches`.`branchcode` = 'TESTNCL';
Also update in borrowers table
7th June 2020
Tried installing koha 20.05.00 on Ubuntu 18.04 LTS but when tried installing koha-common it threw error
The following packages have unmet dependencies:
koha-common : Depends: libmojolicious-plugin-openapi-perl but it is not going to be installed
Depends: libnet-oauth2-authorizationserver-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Then tried to download tar.gz file and then tried installation of koha with following commands
1. created koha as a user in linux with adduser
2. created koha database in mysql with grant privileges
3. changed to /home/lib/koha-20.05.00 and ran perl Makefile.PL
4. make & make install
5. ln -s /etc/koha/koha-httpd.conf /etc/apache2/sites-available/koha.conf
6. vi /etc/apache2/sites-available/koha (changed ports for opac and intranet and changed
<VirtualHost 127.0.1.1:80> to <VirtualHost *:8000>
7. a2enmod rewrite
8. a2ensite koha.conf
9. ln -s /usr/share/koha/bin/koha-zebra-ctl.sh /etc/init.d/koha-zebra-daemon
10. update-rc.d koha-zebra-daemon defaults
11. sudo /usr/share/koha/bin/koha-zebra-ctl.sh start
11.
10th March 2020
I was trying to work on Ubuntu 18.04 with mariadb installation. Created livecd and when working on livecd and tried to create new instance of koha it threw error
error 1045 28000 ): access denied for user harsh '@' localhost using password no
struggled a lot to solve error and following commands helped me to solve the error and was able to create new instance of koha
First, connect in sudo mysql
sudo mysql -u root
Check your accounts present in your db
SELECT User,Host FROM mysql.user;
+------------------+-----------+
| User | Host |
+------------------+-----------+
| admin | localhost |
| debian-sys-maint | localhost |
| magento_user | localhost |
| mysql.sys | localhost |
| root | localhost |
Delete current root@localhost account
mysql> DROP USER 'root'@'localhost';
Query OK, 0 rows affected (0,00 sec)
Recreate your user
mysql> CREATE USER 'root'@'%' IDENTIFIED BY '';
Query OK, 0 rows affected (0,00 sec)
Give permissions to your user (don't forget to flush privileges)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
Query OK, 0 rows affected (0,00 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0,01 sec)
Exit MySQL and try to reconnect without sudo.
From the webpage
Thanks to the above link.
20th February 2018
Few libraries have issues with their koha patron categories code defined (such as additional space, extra chart. etc.) hence such patrons under those categories cannot be updated. To solve this issue one can go at database level and run
mysql>SET FOREIGN_KEY_CHECKS=0;
mysql>use koha_library
mysql>UPDATE categories SET categorycode='STAFF' WHERE categorycode='LIB STAFF';
mysql>SET FOREIGN_KEY_CHECKS=1;
mysql>quit
7th February 2018
Trying to upgrade koha on liblivedvd with latest koha plus mariadb.
1. To copy all mysql databases on existing mysql server used following command to backup all mysql databases
mysqldump --all-databases --single-transaction --user=root --password > all_databases.sql
2. Then run following commands to install latest mariadb-server on the liblivedvd by removing mysql. This will uninstall mysql and will install mariadb-server. It will keep all the koha_library database and other databases as it is.
sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 sudo add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.yz.yamagata-u.ac.jp/pub/dbms/mariadb/repo/10.2/ubuntu xenial main'
Once the key is imported and the repository added you can install MariaDB with:
sudo apt update sudo apt install mariadb-server
3. After checking above, then run apt-get upgrade koha-common to install latest version of koha on liblivedvd server.
4. If there is any error while adding item type run following command by using koha_library database in mysql
mariadb>use koha_library;
mariadb>SET GLOBAL sql_mode = '';
mariadb>exit
Now u can easily work with latest koha on liblivedvd with mariadb.
16 June 2017
Tried a lot to run koha 16.11.08 but while adding itemtype was getting an error as "An error occurred when inserting this item type. Perhaps the value already exists."
struggled a lot to find answer as well as asked on IRC but did not get any reply. After searching a lot found following link which gave answer and it worked.
An error occurred when inserting this item type. Perhaps the value already exists.
https://stackoverflow.com/questions/40811269/error-while-installing-koha
SET GLOBAL sql_mode = '';
3rd November 2016
If mysql cannot create any user in koha try to delete all instances of this user if already added
delete from mysql.user where user='username';
delete from mysql.db where user='username';
15th October 2016
After upgrading koha to latest version circulation breaks down as well as system throws error hence for one library I did following in mysql and circulation was ok. Before running the following command circulation was throwing back dated due dates etc.
UPDATE borrowers SET debarred=NULL WHERE debarred='0000-00-00';
24th February 2015 (Koha Backup)
For last few days I have been helping many koha users and many of the users lack taking proper backups. These commands will help all those users who are running their koha on Linux operating systems and are unfamiliar with linux but still need to take backup regularly. Koha takes backup automatically and keeps it in /var/spool/koha/library folder. It is necessary to regularly copy these files in external media so that even if anything happens to the existing installation of koha it can be restored easily with these files.
If you have installed koha using liblivecd latest version (3.18) open a terminal and use following commands
library@localhost:~$ sudo su
[sudo] password for library:
[enter library user password here]
Once password for root is entered you will go to 'root' area and then go to /var/spool/koha/library folder by running following command
root@localhost:/home/library# cd /var/spool/koha/library/
then check for the files by running following command
root@localhost:/var/spool/koha/library# ls -lh
root@localhost:/var/spool/koha/library# ls -lh
total 1.1M
-rw-r----- 1 root library-koha 479K Feb 16 16:15 library-2015-02-16.sql.gz
-rw------- 1 root root 37K Feb 16 16:15 library-2015-02-16.tar.gz
-rw-r----- 1 root library-koha 480K Feb 20 12:55 library-2015-02-20.sql.gz
-rw------- 1 root root 36K Feb 20 12:55 library-2015-02-20.tar.gz
Now all these files you can move to your external media by running following command. Here 4151-ACD0 is name of USB media.
root@localhost:/var/spool/koha/library# cp *.gz /media/library/4151-ACD0/
root@localhost:/var/spool/koha/library#cd /media/library/4151-ACD0/#ls -lh
and check whether all files are copied or not.
24th December 2014
One of the record in koha throws following error when it is searched
either on OPAC or admin page. Even if this record is deleted with
all its items, biblionumber and fresh record is added for the same
author and title same error is thrown.
Can't call method "as_string" on an undefined value at /usr/share
/koha/lib/C4/Koha.pm line 1608
The above query was asked on koha irc but no answer was found.
Then tried following and it sorted out the issue.
The current database was backed up. Koha 3.14.05 was installed.
Webinstallation was completed then backup file was restored. Data was
indexed with ./rebuild_zebra.pl -b -a -r -v. After doing this it was
found that those records which were throwing errors such as "goel" or
"library" was searchable properly. These these records with corresponding
items and biblios were deleted from Batch item deletion.
Backup was again taken up and then this backup was used with latest
koha installation where 3.18 was installed fresh database was created
and webinstallation was completed. Then the backup was restored and
data was also indexed. It threw some lock error then ran
/etc/init.d/koha-common stop and /etc/init.d/koha-common start
It allowed to then reindex data properly. In this database when 'goel' and
library was searched it said no records found. Then fresh entry
of author 'goel' with its other details were made and items were attached
and again data was reindexed and now no error was found which was
occuring for a particular record in koha.