[Koha] Fwd: Koha indexing error after importing data

Suresh Kumar Tejomurtula tejoskumar at gmail.com
Tue Jul 10 03:12:22 NZST 2018


Hi

Further to the below mail, I installed 16.11 on the server and was able to
import the data and system is working fine with indexing.

Then I took a backup of koha and tried to import into 17.05 again the same
issue. Not able to index the data.

Could you please help me in solving the issue.



---------- Forwarded message ---------
From: Suresh Kumar Tejomurtula <tejoskumar at gmail.com>
Date: Sun 8 Jul, 2018, 21:09
Subject: Koha indexing error after importing data
To: koha <koha at lists.katipo.co.nz>


Hi,

I installed koha 17.11 in a fresh PC as per the instructions at -
https://wiki.koha-community.org/wiki/Koha_on_ubuntu_-_packages and
successfully installed. When I try to index it is working after creating
few test records.

Iam able to import data from koha version 16.05(Installed on 14.04 ubuntu
and with mysql) to 17.11(16.04 ubuntu and mariadb) and issue / returns
etc...are working and during installation the following warnings / errors i
noticed during import / upgrade.

-----

Attempting upgrade to 16.06.00.028 (Bug 17135) ...
DBD::mysql::st execute failed: Unknown column 'me.no_auto_renewal_after' in
'field list' [for Statement "SELECT `me`.`categorycode`, `me`.`itemtype`,
`me`.`restrictedtype`, `me`.`rentaldiscount`, `me`.`reservecharge`,
`me`.`fine`, `me`.`finedays`, `me`.`maxsuspensiondays`, `me`.`firstremind`,
`me`.`chargeperiod`, `me`.`chargeperiod_charge_at`, `me`.`accountsent`,
`me`.`chargename`, `me`.`maxissueqty`, `me`.`maxonsiteissueqty`,
`me`.`issuelength`, `me`.`lengthunit`, `me`.`hardduedate`,
`me`.`hardduedatecompare`, `me`.`renewalsallowed`, `me`.`renewalperiod`,
`me`.`norenewalbefore`, `me`.`auto_renew`, `me`.`no_auto_renewal_after`,
`me`.`no_auto_renewal_after_hard_limit`, `me`.`reservesallowed`,
`me`.`holds_per_record`, `me`.`branchcode`, `me`.`overduefinescap`,
`me`.`cap_fine_to_replacement_price`, `me`.`onshelfholds`,
`me`.`opacitemholds`, `me`.`article_requests` FROM `issuingrules` `me`
WHERE ( ( `branchcode` IN ( ?, ? ) AND `categorycode` IN ( ?, ? ) AND
`itemtype` IN ( ?, ? ) ) ) ORDER BY `branchcode` DESC, `categorycode` DESC,
`itemtype` DESC LIMIT ?" with ParamValues: 0='IC-ARDC', 1='*', 2='PT',
3='*', 4='BK', 5='*', 6=1] at /usr/share/perl5/DBIx/Class/Storage/DBI.pm
line 1834.
DBIx::Class::Storage::DBI::_dbh_execute(): Unknown column
'me.no_auto_renewal_after' in 'field list' at
/usr/share/koha/lib/Koha/Objects.pm line 191
Upgrade to 16.06.00.028 done (Bug 17135 - Fine for the previous overdue may
get overwritten by the next one)
WARNING: There is a possibility (= just a possibility, it's configuration
dependent etc.) that - due to regression introduced by Bug 15675 - some old
fine records for overdued items (items which got renewed 1+ time while
being overdue) may have been overwritten in your production 16.05+
database. See Bugzilla reports for Bug 14390 and Bug 17135 for more details.
WARNING: Please note that this upgrade does not try to recover such
overwitten old fine records (if any) - it's just an follow-up for Bug
14390, its sole purpose is preventing eventual further-on overwrites from
happening in the future. Optional recovery of the overwritten fines (again,
if any) is like, totally outside of the scope of this particular upgrade!
Upgrade to 16.06.00.029 done (Bug 14707 - Change UsageStatsCountry from
free text to a dropdown list)

--------------------------------------------------------------------

Upgrade to 16.06.00.038 done (Bug 14874 - Add ability to search for patrons
by date of birth from checkout and patron quick searches)
item-level_itypes set but no itype defined for item (201671) at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
line 13447.
item-level_itypes set but no itype defined for item (39020) at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
line 13447.
item-level_itypes set but no itype defined for item (90632) at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
line 13447.
item-level_itypes set but no itype defined for item (1967) at
/usr/share/koha/intranet/cgi-bin/installer/data/mysql/updatedatabase.pl
line 13447.
Upgrade to 16.06.00.039 done (Bug 14598: itemtype is not set on statistics
by C4::Circulation::AddReturn)

-------------------------
U
pgrade to 16.12.00.003 done (Bug 17486 - Remove 'Mozilla Persona' as an
authentication method)
DBD::mysql::db do failed: Duplicate entry '700-marcxml-CHANGEME' for key
'biblio_metadata_uniq_key' [for Statement "
        INSERT INTO biblio_metadata ( biblionumber, format, marcflavour,
metadata ) SELECT biblionumber, 'marcxml', 'CHANGEME', marcxml FROM
biblioitems;
    "] at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/
updatedatabase.pl line 13819.
DBD::mysql::db do failed: Cannot add or update a child row: a foreign key
constraint fails (`koha_library`.`deletedbiblio_metadata`, CONSTRAINT
`deletedbiblio_metadata_fk_1` FOREIGN KEY (`biblionumber`) REFERENCES
`deletedbiblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE) [for
Statement "
        INSERT INTO deletedbiblio_metadata ( biblionumber, format,
marcflavour, metadata ) SELECT biblionumber, 'marcxml', 'CHANGEME', marcxml
FROM deletedbiblioitems;
    "] at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/
updatedatabase.pl line 13822.
Upgrade to 16.12.00.004 done (Bug 17196 - Move marcxml out of the
biblioitems table)

-----------------------------------------------------------------

Upgrade to 16.12.00.026 done (Bug 18427 - Add a primary key to serialitems)
DBD::mysql::db do failed: Invalid default value for 'date_created' [for
Statement "
        CREATE TABLE IF NOT EXISTS club_enrollments (
          id int(11) NOT NULL AUTO_INCREMENT,
          club_id int(11) NOT NULL,
          borrowernumber int(11) NOT NULL,
          date_enrolled timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
          date_canceled timestamp NULL DEFAULT NULL,
          date_created timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
          date_updated timestamp NULL DEFAULT NULL,
          branchcode varchar(10) NULL DEFAULT NULL,
          PRIMARY KEY (id),
          KEY club_id (club_id),
          KEY borrowernumber (borrowernumber),
          KEY branchcode (branchcode),
          CONSTRAINT club_enrollments_ibfk_1 FOREIGN KEY (club_id)
REFERENCES clubs (id) ON DELETE CASCADE ON UPDATE CASCADE,
          CONSTRAINT club_enrollments_ibfk_2 FOREIGN KEY (borrowernumber)
REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE,
          CONSTRAINT club_enrollments_ibfk_3 FOREIGN KEY (branchcode)
REFERENCES branches (branchcode) ON DELETE SET NULL ON UPDATE CASCADE
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    "] at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/
updatedatabase.pl line 14194.
DBD::mysql::db do failed: Can't create table
`koha_library`.`club_enrollment_fields` (errno: 150 "Foreign key constraint
is incorrectly formed") [for Statement "
        CREATE TABLE IF NOT EXISTS club_enrollment_fields (
          id int(11) NOT NULL AUTO_INCREMENT,
          club_enrollment_id int(11) NOT NULL,
          club_template_enrollment_field_id int(11) NOT NULL,
          `value` text NOT NULL,
          PRIMARY KEY (id),
          KEY club_enrollment_id (club_enrollment_id),
          KEY club_template_enrollment_field_id
(club_template_enrollment_field_id),
          CONSTRAINT club_enrollment_fields_ibfk_1 FOREIGN KEY
(club_enrollment_id) REFERENCES club_enrollments (id) ON DELETE CASCADE ON
UPDATE CASCADE,
          CONSTRAINT club_enrollment_fields_ibfk_2 FOREIGN KEY
(club_template_enrollment_field_id) REFERENCES
club_template_enrollment_fields (id) ON DELETE CASCADE ON UPDATE CASCADE
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    "] at /usr/share/koha/intranet/cgi-bin/installer/data/mysql/
updatedatabase.pl line 14227.
Upgrade to 16.12.00.027 done (Bug 12461 - Add patron clubs feature)


---------------------------------------------

During upgrade Club_enrollments table was not added.
So I added the table manually using the above mysql statement in the error.
Then I was able to go to do transactions in koha.

--------------------------------

Then after running the below command iam getting the below error and
indexing not working.

----------------------------------------------

sudo su
sudo koha-rebuild-zebra -b -f -v library

----------------------------------------------

Zebra configuration information

================================

Zebra biblio directory      = /var/lib/koha/library/biblios
Zebra authorities directory = /var/lib/koha/library/authorities
Koha directory              = /usr/share/koha/intranet/cgi-bin
Lockfile                    = /var/lock/koha/library/rebuild/rebuild..LCK
BIBLIONUMBER in :     999$c
BIBLIOITEMNUMBER in : 999$d
================================

skipping authorities

====================

exporting biblio

====================

1error retrieving biblio 1 at /usr/share/koha/bin/migration_tools/
rebuild_zebra.pl line 683
.

.
.
error retrieving biblio 303876 at /usr/share/koha/bin/migration_tools/
rebuild_zebra.pl line 683.
....

Records exported: 0
====================
REINDEXING zebra
====================
====================
CLEANING
====================
Zebra configuration information
================================
Zebra biblio directory      = /var/lib/koha/library/biblios
Zebra authorities directory = /var/lib/koha/library/authorities
Koha directory              = /usr/share/koha/intranet/cgi-bin
Lockfile                    = /var/lock/koha/library/rebuild/rebuild..LCK
BIBLIONUMBER in :     999$c
BIBLIOITEMNUMBER in : 999$d
================================
====================
exporting authority
====================
1............
Records exported: 13
====================
REINDEXING zebra
====================
skipping biblios
====================
CLEANING
====================

After this i installed koha 16.05 in 16.04 ubuntu, imported the data into
the installation and then from that i tried to port it to 17.11
installation and still the same iam getting the same error. Could any one
help me on how to resolve this.

Thanks in advance.


-- 
Regards
T. Suresh Kumar


More information about the Koha mailing list