[Archivesspace_Users_Group] Upgrade to 1.3.0 fails with db_error

Jason Brock Jason.Brock at georgetown.edu
Wed Jul 22 13:47:10 EDT 2015


Thanks for your response, Chris.  Based on the error I had been looking at
the relationship job_input_file(job_id) and job(id), but in either case I
cannot find an orphaned row.  Each of your suggested queries returns an
empty set, as does a similar query on the job_input_file table

mysql> select * from job_input_file where job_id NOT IN ( SELECT id from
job);

Empty set (0.00 sec)


I will continue to investigate and begin deleting rows to see if I can make
some progress with a little trial and error.

- Jason

On Wed, Jul 22, 2015 at 9:10 AM, Chris Fitzpatrick <
Chris.Fitzpatrick at lyrasis.org> wrote:

>
>
>
>  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>
> Date: Tuesday, 21 July 2015 15:51
> To: KNOWLES Claire <Claire.Knowles at ed.ac.uk>
> Cc: "archivesspace_users_group at lyralists.lyrasis.org" <
> 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?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>
> 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
>>
>>
>>   From: <archivesspace_users_group-bounces at lyralists.lyrasis.org> on
>> behalf of Jason Brock <Jason.Brock at georgetown.edu>
>> Reply-To: Archivesspace Users Group <
>> archivesspace_users_group at lyralists.lyrasis.org>
>> Date: Monday, 20 July 2015 19:54
>> To: "archivesspace_users_group at lyralists.lyrasis.org" <
>> 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
>>
>>
>> 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/c27dfa1c/attachment.html>


More information about the Archivesspace_Users_Group mailing list