[Archivesspace_Users_Group] Upgrade to 1.3.0 fails with db_error

Chris Fitzpatrick Chris.Fitzpatrick at lyrasis.org
Wed Jul 22 09:10:42 EDT 2015




Hi Jason,


Hm, looks like maybe there's a import_job_input_file row that's been orphaned from its associated job.


Can you see if these queries return anything:


mysql> select * from import_job_input_file where job_id  NOT IN ( SELECT id from import_job);
mysql> select * from import_job_input_file where job_id IS NULL;



If it does, you probably should delete these rows.


b,chris.

Chris Fitzpatrick | Developer, ArchivesSpace
Skype: chrisfitzpat  | Phone: 918.236.6048
http://archivesspace.org/


________________________________
From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of KNOWLES Claire <Claire.Knowles at ed.ac.uk>
Sent: Wednesday, July 22, 2015 9:09 AM
To: Jason Brock
Cc: archivesspace_users_group at lyralists.lyrasis.org
Subject: Re: [Archivesspace_Users_Group] Upgrade to 1.3.0 fails with db_error

Hi Jason,

Not all of my jobs are being migrated to the new job table causing the same issue. I’ve not resolved it yet.

Claire

--
Claire Knowles
Library Digital Development Manager
Library and University Collections, Information Services
University of Edinburgh
Tel: 0131 6503023
Email: claire.knowles at ed.ac.uk


From: Jason Brock <Jason.Brock at georgetown.edu<mailto:Jason.Brock at georgetown.edu>>
Date: Tuesday, 21 July 2015 15:51
To: KNOWLES Claire <Claire.Knowles at ed.ac.uk<mailto:Claire.Knowles at ed.ac.uk>>
Cc: "archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>" <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: Re: [Archivesspace_Users_Group] Upgrade to 1.3.0 fails with db_error

Yes, Claire, we are running the setup-database.sh migration script in all cases.  Here is the error we receive:

# archivesspace-1.3.0/scripts/setup-database.sh
Loading ArchivesSpace configuration file from path: /opt/archivesspace-1.3.0/config/config.rb
Loading ArchivesSpace configuration file from path: /opt/archivesspace-1.3.0/config/config.rb
Running migrations against jdbc:mysql://localhost:3306/archivesspace?user=archives_db&password=archives_db&useUnicode=true&characterEncoding=UTF-8
*** ADDING SOME ENUMS
*** Genre Form to note_index_item_type  enum list
Triggering reindex of resource
Triggering reindex of archival_object
Triggering reindex of digital_object
Making location_temporary list editble
Sequel::ForeignKeyConstraintViolation: Java::ComMysqlJdbcExceptionsJdbc4::MySQLIntegrityConstraintViolationException: Cannot add or update a child row: a foreign key constraint fails (`archivesspace`.`job_input_file`, CONSTRAINT `job_input_file_ibfk_1` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`))
          raise_error at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/database/misc.rb:423
            statement at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:648
            statement at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:646
              execute at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:245
                 hold at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/connection_pool/threaded.rb:98
                 hold at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/connection_pool/threaded.rb:87
          synchronize at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:255
              execute at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:244
       execute_insert at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/adapters/jdbc.rb:276
       execute_insert at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:927
               insert at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:336
               (root) at /opt/archivesspace-1.3.0/lib/common.jar!/db/migrations/037_generalized_job_table.rb:75
                 each at org/jruby/RubyArray.java:1613
               (root) at /opt/archivesspace-1.3.0/lib/common.jar!/db/migrations/037_generalized_job_table.rb:73
        instance_eval at org/jruby/RubyBasicObject.java:1533
                apply at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:100
                  run at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:528
  checked_transaction at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:466
                  run at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:527
                 each at org/jruby/RubyArray.java:1613
                  run at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:524
                  run at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/extensions/migration.rb:391
       setup_database at file:/opt/archivesspace-1.3.0/lib/common.jar!/db/db_migrator.rb:184
               (root) at ../scripts/rb/migrate_db.rb:43
              connect at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:69
              connect at /opt/archivesspace-1.3.0/gems/gems/sequel-4.20.0/lib/sequel/core.rb:95
               (root) at ../scripts/rb/migrate_db.rb:28

On Tue, Jul 21, 2015 at 4:54 AM, KNOWLES Claire <Claire.Knowles at ed.ac.uk<mailto:Claire.Knowles at ed.ac.uk>> wrote:
Hi Jason,

Did you run the setup-database.sh script to update your database tables? I had that error too. Now my setup-database.sh is failing to migrate jobs, has anyone else had problems updating their database for 1.3.0?

Cheers,

Claire

--
Claire Knowles
Library Digital Development Manager
Library and University Collections, Information Services
University of Edinburgh
Tel: 0131 6503023
Email: claire.knowles at ed.ac.uk<mailto:claire.knowles at ed.ac.uk>


From: <archivesspace_users_group-bounces at lyralists.lyrasis.org<mailto:archivesspace_users_group-bounces at lyralists.lyrasis.org>> on behalf of Jason Brock <Jason.Brock at georgetown.edu<mailto:Jason.Brock at georgetown.edu>>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Date: Monday, 20 July 2015 19:54
To: "archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>" <archivesspace_users_group at lyralists.lyrasis.org<mailto:archivesspace_users_group at lyralists.lyrasis.org>>
Subject: [Archivesspace_Users_Group] Upgrade to 1.3.0 fails with db_error

When attempting to upgrade our ArchivesSpace instance either directly from 1.1.0 or incrementally from 1.1.0 to 1.1.2 to 1.2.0 to 1.3.0 we receive the following error when trying to start the service:

Connection to backend failed ({"error":{"db_error":["Database integrity constraint conflict: Java::ComMysqlJdbcExceptionsJdbc4::MySQLSyntaxErrorException: Unknown column 'position' in 'order clause'"]}}
).  Retrying...

We are running ArchivesSpace on RHEL 6 against a MySQL 5.6 database.

Any thoughts on this error are appreciated!

- Jason


--
Jason Brock
Sr. Systems Administrator
Georgetown University Library
202.687.5735<tel:202.687.5735>


The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20150722/53d8f2e8/attachment.html>


More information about the Archivesspace_Users_Group mailing list