May, 2019
2019-05-01
- Help CCAFS with regenerating some item thumbnails after they uploaded new PDFs to some items on CGSpace
- A user on the dspace-tech mailing list offered some suggestions for troubleshooting the problem with the inability to delete certain items
- Apparently if the item is in the
workflowitem
table it is submitted to a workflow - And if it is in the
workspaceitem
table it is in the pre-submitted state
- Apparently if the item is in the
The item seems to be in a pre-submitted state, so I tried to delete it from there:
dspace=# DELETE FROM workspaceitem WHERE item_id=74648; DELETE 1
But after this I tried to delete the item from the XMLUI and it is still present…
I managed to delete the problematic item from the database
- First I deleted the item’s bitstream in XMLUI and then ran
dspace cleanup -v
to remove it from the assetstore Then I ran the following SQL:
dspace=# DELETE FROM metadatavalue WHERE resource_id=74648; dspace=# DELETE FROM workspaceitem WHERE item_id=74648; dspace=# DELETE FROM item WHERE item_id=74648;
- First I deleted the item’s bitstream in XMLUI and then ran
Now the item is (hopefully) really gone and I can continue to troubleshoot the issue with REST API’s
/items/find-by-metadata-value
endpointOf course I run into another HTTP 401 error when I continue trying the LandPortal search from last month:
$ curl -f -H "Content-Type: application/json" -X POST "http://localhost:8080/rest/items/find-by-metadata-field" -d '{"key":"cg.subject.cpwf", "value":"WATER MANAGEMENT","language": "en_US"}' curl: (22) The requested URL returned error: 401 Unauthorized
The DSpace log shows the item ID (because I modified the error text):
2019-05-01 11:41:11,069 ERROR org.dspace.rest.ItemsResource @ User(anonymous) has not permission to read item(id=77708)!
If I delete that one I get another, making the list of item IDs so far:
- 74648
- 77708
- 85079
Some are in the
workspaceitem
table (pre-submission), others are in theworkflowitem
table (submitted), and others are actually approved, but withdrawn…- This is actually a worthless exercise because the real issue is that the
/items/find-by-metadata-value
endpoint is simply designed flawed and shouldn’t be fatally erroring when the search returns items the user doesn’t have permission to access - It would take way too much time to try to fix the fucked up items that are in limbo by deleting them in SQL, but also, it doesn’t actually fix the problem because some items are submitted but withdrawn, so they actually have handles and everything
- I think the solution is to recommend people don’t use the
/items/find-by-metadata-value
endpoint
- This is actually a worthless exercise because the real issue is that the
CIP is asking about embedding PDF thumbnail images in their RSS feeds again
- They asked in 2018-09 as well and I told them it wasn’t possible
- To make sure, I looked at the documentation for RSS media feeds and tried it, but couldn’t get it to work
- It seems to be geared towards iTunes and Podcasts… I dunno
CIP also asked for a way to get an XML file of all their RTB journal articles on CGSpace
I told them to use the REST API like (where
1179
is the id of the RTB journal articles collection):https://cgspace.cgiar.org/rest/collections/1179/items?limit=812&expand=metadata
2019-05-03
A user from CIAT emailed to say that CGSpace submission emails have not been working the last few weeks
I checked the
dspace test-email
script on CGSpace and they are indeed failing:$ dspace test-email About to send test email: - To: woohoo@cgiar.org - Subject: DSpace test email - Server: smtp.office365.com Error sending email: - Error: javax.mail.AuthenticationFailedException Please see the DSpace documentation for assistance.
I will ask ILRI ICT to reset the password
- They reset the password and I tested it on CGSpace
2019-05-05
- Run all system updates on DSpace Test (linode19) and reboot it
- Merge changes into the
5_x-prod
branch of CGSpace: - Re-deploy CGSpace from
5_x-prod
branch - Run all system updates on CGSpace (linode18) and reboot it
- Tag version 1.1.0 of the dspace-statistics-api (with Falcon 2.0.0)
- Deploy on DSpace Test
2019-05-06
Peter pointed out that Solr stats are only showing 2019 stats
I looked at the Solr Admin UI and I see:
statistics-2018: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error opening new searcher
As well as this error in the logs:
Caused by: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/home/cgspace.cgiar.org/solr/statistics-2018/data/index/write.lock
Strangely enough, I do see the statistics-2018, statistics-2017, etc cores in the Admin UI…
I restarted Tomcat a few times (and even deleted all the Solr write locks) and at least five times there were issues loading one statistics core, causing the Atmire stats to be incomplete
- Also, I tried to increase the
writeLockTimeout
insolrconfig.xml
from the default of 1000ms to 10000ms - Eventually the Atmire stats started working, despite errors about “Error opening new searcher” in the Solr Admin UI
- I wrote to the dspace-tech mailing list again on the thread from March, 2019
- Also, I tried to increase the