Re: [dspace-tech] Error running cleanup task in DSpace 5.x

2017-04-26 Thread Mark Wood
On Tuesday, April 25, 2017 at 11:28:05 AM UTC-4, Alan Orth wrote:
>
> Hello, a small update.
>
> It took me a few days, but I ran the cleanup task over and over and waited 
> for it to crash, each time adding the conflicting bitstream ID to a long 
> list of IDs to delete (70 in total, in a SQL query like in my previous mail 
> in this thread). Once the conflicts in the database were resolved, I was 
> finally able to run the task from start to finish successfully. I never 
> knew this task was failing, so I suspect it's been silently failing for 
> years—now that it finally ran, it cleared 30,000 files (7GB or so) from the 
> assetstore!
>
> To make a long story short: manually check your cron jobs (and add 
> logging) from time to time. Thanks for the help, Claudia.
>
>
You might find  https://jira.duraspace.org/browse/DS-3074 interesting.

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


Re: [dspace-tech] Error running cleanup task in DSpace 5.x

2017-04-25 Thread Alan Orth
Hello, a small update.

It took me a few days, but I ran the cleanup task over and over and waited
for it to crash, each time adding the conflicting bitstream ID to a long
list of IDs to delete (70 in total, in a SQL query like in my previous mail
in this thread). Once the conflicts in the database were resolved, I was
finally able to run the task from start to finish successfully. I never
knew this task was failing, so I suspect it's been silently failing for
years—now that it finally ran, it cleared 30,000 files (7GB or so) from the
assetstore!

To make a long story short: manually check your cron jobs (and add logging)
from time to time. Thanks for the help, Claudia.

Regards,

On Sat, Apr 22, 2017 at 2:40 PM Alan Orth  wrote:

> Thanks for the hint, Claudia.
>
> I set that ID to NULL in the bundle table, and after running the cleanup
> task again I keep finding more items which have the same problem. I now
> have a quite long list like this on my test server!
>
> dspace=# update bundle set primary_bitstream_id=NULL where
> primary_bitstream_id in (435, 1136, 1132);
>
> I'll keep doing this until the cleanup command finishes successfully.
> Thanks again.
>
> On Fri, Apr 21, 2017 at 11:00 AM Claudia Jürgen <
> claudia.juer...@tu-dortmund.de> wrote:
>
>> Hi Alan,
>>
>> this is due to the fact that someone marked a bitstream as primary
>> during submission.
>> Just remove the primary_bitstream_id from the table bundle.
>> Unluckily once checked as primary bitstream during submission one can
>> not uncheck it.
>> It was intended for html files marking one as the primary.
>>
>> Hope this helps
>>
>> Claudia Jürgen
>>
>>
>> Am 20.04.2017 um 21:23 schrieb Alan Orth:
>> > Hi,
>> >
>> > I randomly checked my nightly `[dspace]/bin/dspace cleanup` task and
>> > noticed that it continuously fails to complete due to the following
>> error:
>> >
>> > Error: ERROR: update or delete on table "bitstream" violates foreign key
>> > constraint "bundle_primary_bitstream_id_fkey" on table "bundle"
>> >Detail: Key (bitstream_id)=(435) is still referenced from table
>> "bundle".
>> >
>> > We're running DSpace 5.5 with PostgreSQL 9.5. How can I resolve this?
>> >
>> > Thanks,
>>
>> --
>> Claudia Juergen
>> Eldorado
>>
>> Technische Universität Dortmund
>> Universitätsbibliothek
>> Vogelpothsweg 76
>> 44227 Dortmund
>>
>> Tel.: +49 231-755 40 43 <+49%20231%207554043>
>> Fax: +49 231-755 40 32 <+49%20231%207554032>
>> claudia.juer...@tu-dortmund.de
>> www.ub.tu-dortmund.de
>>
>> Wichtiger Hinweis: Die Information in dieser E-Mail ist vertraulich. Sie
>> ist ausschließlich für den Adressaten bestimmt. Sollten Sie nicht der für
>> diese E-Mail bestimmte Adressat sein, unterrichten Sie bitte den Absender
>> und vernichten Sie diese Mail. Vielen Dank.
>> Unbeschadet der Korrespondenz per E-Mail, sind unsere Erklärungen
>> ausschließlich final rechtsverbindlich, wenn sie in herkömmlicher
>> Schriftform (mit eigenhändiger Unterschrift) oder durch Übermittlung eines
>> solchen Schriftstücks per Telefax erfolgen.
>>
>> Important note: The information included in this e-mail is confidential.
>> It is solely intended for the recipient. If you are not the intended
>> recipient of this e-mail please contact the sender and delete this message.
>> Thank you. Without prejudice of e-mail correspondence, our statements are
>> only legally binding when they are made in the conventional written form
>> (with personal signature) or when such documents are sent by fax.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "DSpace Technical Support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to dspace-tech+unsubscr...@googlegroups.com.
>> To post to this group, send email to dspace-tech@googlegroups.com.
>> Visit this group at https://groups.google.com/group/dspace-tech.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Alan Orth
> alan.o...@gmail.com
> https://picturingjordan.com
> https://englishbulgaria.net
> https://mjanja.ch
>
-- 
Alan Orth
alan.o...@gmail.com
https://picturingjordan.com
https://englishbulgaria.net
https://mjanja.ch

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.


[dspace-tech] Error running cleanup task in DSpace 5.x

2017-04-20 Thread Alan Orth
Hi,

I randomly checked my nightly `[dspace]/bin/dspace cleanup` task and
noticed that it continuously fails to complete due to the following error:

Error: ERROR: update or delete on table "bitstream" violates foreign key
constraint "bundle_primary_bitstream_id_fkey" on table "bundle"
  Detail: Key (bitstream_id)=(435) is still referenced from table "bundle".

We're running DSpace 5.5 with PostgreSQL 9.5. How can I resolve this?

Thanks,
-- 
Alan Orth
alan.o...@gmail.com
https://picturingjordan.com
https://englishbulgaria.net
https://mjanja.ch

-- 
You received this message because you are subscribed to the Google Groups 
"DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dspace-tech+unsubscr...@googlegroups.com.
To post to this group, send email to dspace-tech@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.