- I looked at the top user agents and IPs in the Solr statistics for last month and I see these user agents:
- "RI/1.0", 1337
- "Microsoft Office Word 2014", 941
- I will add the RI/1.0 pattern to our DSpace agents overload and purge them from Solr (we had previously seen this agent with 9,000 hits or so in 2020-09), but I think I will leave the Microsoft Word one... as that's an actual user...
<!--more-->
- I should probably add the `RI/1.0` pattern to COUNTER-Robots project
- As well as these IPs:
- 193.169.254.178, 21648
- 181.62.166.177, 20323
- 45.146.166.180, 19376
- The first IP seems to be in Estonia and their requests to the REST API change user agents from curl to Mac OS X to Windows and more
- Also, they seem to be trying to exploit something:
- I set up a clean DSpace 6.4 instance locally to test some things against, for example to be able to rule out whether some issues are due to Atmire modules or are fixed in the as-of-yet-unreleased DSpace 6.4
- I had to delete all the Atmire schemas, then it worked fine on Tomcat 8.5 with Mirage (I didn't want to bother with npm and ruby for Mirage 2)
- Then I tried to see if I could reproduce the mapping issue that Marianne raised last month
- I tried unmapping and remapping to the CGIAR Gender grants collection and the collection appears in the item view's list of mapped collections, but not on the collection browse itself
- Then I tried mapping to a new collection and it was the same as above
- So this issue is really just a DSpace bug, and nothing to do with Atmire and not fixed in the unreleased DSpace 6.4
- I will try one more time after updating the Discovery index (I'm also curious how fast it is on vanilla DSpace 6.4, though I think I tried that when I did the flame graphs in 2019 and it was miserable)
```console
$ time ~/dspace64/bin/dspace index-discovery -b
~/dspace64/bin/dspace index-discovery -b 4053.24s user 53.17s system 38% cpu 2:58:53.83 total
```
- Nope! Still slow, and still no mapped item...
- I even tried unmapping it from all collections, and adding it to a single new owning collection...
- Ah hah! Actually, I was inspecting the item's authorization policies when I noticed that someone had made the item private!
- After making it public again I was able to see it in the target collection
- The indexes on AReS Explorer are messed up after last week's harvesting:
- The AReS harvesting from yesterday finished, but the indexes are messed up again so I will have to fix them again before I harvest next time
- I also spent some time looking at IWMI's reports again
- On AReS we don't have a way to group by peer reviewed or item type other than doing "if type is Journal Article"
- Also, we don't have a way to check the IWMI Strategic Priorities because those are communities, not metadata...
- We can get the collections an item is in from the `parentCollectionList` metadata, but it is saved in Elasticsearch as a string instead of a list...
- I told them it won't be possible to replicate their reports exactly
- I decided to look at the CLARISA controlled vocabularies again
- They now have 6,200 institutions (was around 3,400 when I last looked in 2020-07)
- They have updated their Swagger interface but it still requires an API key if you want to use it from curl
- They have ISO 3166 countries and UN M.49 regions, but I notice they have some weird names like "Russian Federation (the)", which is not in ISO 3166 as far as I can see
- I exported a list of the institutions to look closer
- I found twelve items with whitespace issues
- There are some weird entries like `Research Institute for Aquaculture No1` and `Research Institute for Aquaculture No2`
- A few items have weird Unicode characters like U+00AD, U+200B, and U+00A0
- I found 100+ items with multiple languages in there name like `Ministère de l’Agriculture, de la pêche et des ressources hydrauliques / Ministry of Agriculture, Hydraulic Resources and Fisheries`
- Over 600 institutions have the country in their name like `Ministry of Coordination of Environmental Affairs (Mozambique)`
- For URLs they have `null` in some places... which is weird... why not just leave it blank?
- I checked the CLARISA list against ROR's April, 2020 release ("Version 9", on figshare, though it is version 8 in the dump):
- Fix a few thousand IWMI URLs that are using HTTP instead of HTTPS on CGSpace:
```console
localhost/dspace63= > UPDATE metadatavalue SET text_value = REGEXP_REPLACE(text_value, 'http://www.iwmi.cgiar.org','https://www.iwmi.cgiar.org', 'g') WHERE text_value LIKE 'http://www.iwmi.cgiar.org%' AND metadata_field_id=219;
UPDATE 1132
localhost/dspace63= > UPDATE metadatavalue SET text_value = REGEXP_REPLACE(text_value, 'http://publications.iwmi.org','https://publications.iwmi.org', 'g') WHERE text_value LIKE 'http://publications.iwmi.org%' AND metadata_field_id=219;
UPDATE 1803
```
- In the case of the latter, the HTTP links don't even work! The web server returns HTTP 404 unless the request is HTTPS
- IWMI also says that their subjects are a subset of AGROVOC so they no longer want to use `cg.subject.iwmi` for their subjects
- They asked if I can move them to `dcterms.subject`
- Delete two items for Udana because he was getting the "Authorization denied for action OBSOLETE (DELETE) ..." error when trying to delete them (DSpace 6 bug I found a few months ago)
- I have to fix the Elasticsearch indexes on AReS after last week's harvesting because, as always, the `openrxv-items` index should be an alias of `openrxv-items-final` instead of `openrxv-items-temp`:
- I sent a message to Biruk so he can check the LDAP account
- IWMI confirmed that they do indeed want to move all their subjects to AGROVOC, so I made the changes in the XMLUI and config ([#467](https://github.com/ilri/DSpace/pull/467))
- Then I used the `migrate-fields.sh` script to move them (46,000 metadata entries!)
- I tested Abdullah's latest pull request to add clickable filters to AReS and I think it works
- I had some issues with my local AReS installation so I was only able to do limited testing...
- I will have to wait until I have more time to test before I can merge that
- CCAFS asked me to add eight more phase II project tags to the CGSpace input form
- I extracted the existing ones using xmllint, added the new ones, sorted them, and then replaced them in `input-forms.xml`:
line 3658 column 26 - Warning: unescaped & or unknown entity "&WA_EU-IFAD"
line 3659 column 23 - Warning: unescaped & or unknown entity "&WA_EU-IFAD"
```
- After testing whether this escaped value worked during submission, I created and merged a pull request to `6_x-prod` ([#468](https://github.com/ilri/DSpace/pull/468))
- Paola from the Alliance emailed me some new ORCID identifiers to add to CGSpace
- I saved the new ones to a text file, combined them with the others, extracted the ORCID iDs themselves, and updated the names using `resolve-orcids.py`:
- I realized that I need to lower case the IWMI subjects that I just moved to AGROVOC because they were probably mostly uppercase
- To my surprise I checked `dcterms.subject` has 47,000 metadata fields that are upper or mixed case!
```console
dspace=# UPDATE metadatavalue SET text_value=LOWER(text_value) WHERE dspace_object_id IN (SELECT uuid FROM item) AND metadata_field_id=187 AND text_value ~ '[[:upper:]]';
UPDATE 47405
```
- That's interesting because we lowercased them all a few months ago, so these must all be new... wow
- We have 405,000 total AGROVOC terms, with 20,600 of them being unique
- I will have to start another Discovery re-indexing to pick up these new changes
## 2021-05-20
- Export the top 5,000 AGROVOC terms to validate them:
```console
localhost/dspace63= > \COPY (SELECT DISTINCT text_value, count(*) FROM metadatavalue WHERE dspace_object_id in (SELECT dspace_object_id FROM item) AND metadata_field_id = 187 GROUP BY text_value ORDER BY count DESC LIMIT 5000) to /tmp/2021-05-20-agrovoc.csv WITH CSV HEADER;
COPY 5000
$ csvcut -c 1 /tmp/2021-05-20-agrovoc.csv| sed 1d > /tmp/2021-05-20-agrovoc.txt
- Meeting with Medha and Pythagoras about the FAIR Workflow tool
- Discussed the need for such a tool, other tools being developed, etc
- I stressed the important of controlled vocabularies
- No real outcome, except to keep us posted and let us know if they need help testing on DSpace
- Meeting with Hector Tobon to discuss issues with CLARISA
- They pushed back a bit, saying they were more focused on the needs of the CG
- They are not against the idea of aligning closer to ROR, but lack the man power
- They pointed out that their countries come directly from the [ISO 3166 online browsing platform on the ISO website](https://www.iso.org/iso-3166-country-codes.html)
- Indeed the text value for Russia is "Russian Federation (the)" there... I find that strange
- I filed [an issue](https://salsa.debian.org/iso-codes-team/iso-codes/-/issues/33) on the iso-codes GitLab repository
## 2021-05-24
- Add ORCID identifiers for missing ILRI authors and tag 550 others based on a few authors I noticed that were missing them:
- The AReS harvest last night got stuck at 3:20AM (UTC+3) at 752 pages for some reason...
- Something seems to have happened on CGSpace this morning around then as I have an alert from UptimeRobot as well
- I re-created everything as above (again) and restarted the harvest
- Looking in the DSpace log for this morning I see a big hole in the logs at that time (UTC+2 server time):
```
2021-05-26 02:17:52,808 INFO org.dspace.curate.Curator @ Curation task: countrycodetagger performed on: 10568/70659 with status: 2. Result: '10568/70659: item has country codes, skipping'
2021-05-26 02:17:52,853 INFO org.dspace.curate.Curator @ Curation task: countrycodetagger performed on: 10568/66761 with status: 2. Result: '10568/66761: item has country codes, skipping'
2021-05-26 03:00:05,772 INFO org.dspace.statistics.SolrLoggerServiceImpl @ solr-statistics.spidersfile:null
2021-05-26 03:00:05,773 INFO org.dspace.statistics.SolrLoggerServiceImpl @ solr-statistics.server:http://localhost:8081/solr/statistics
```
- There are no logs between 02:17 and 03:00... hmmm.
- I see a similar gap in the Solr log, though it starts at 02:15:
2021-05-26 02:28:03,633 INFO org.apache.solr.core.SolrCore @ QuerySenderListener done.
```
- Ah, it seems to have been a [Linode network issue in the Frankfurt region](https://status.linode.com/incidents/byqmt6nss9l0):
```
May 26, 2021
Connectivity Issue - Frankfurt
Resolved - We haven’t observed any additional connectivity issues in our Frankfurt data center, and will now consider this incident resolved. If you continue to experience problems, please open a Support ticket for assistance.
May 26, 02:57 UTC
```
- While looking in the logs I noticed an error about SMTP:
```
2021-05-26 02:00:18,015 ERROR org.dspace.eperson.SubscribeCLITool @ Failed to send subscription to eperson_id=934cb92f-2e77-4881-89e2-6f13ad4b1378
2021-05-26 02:00:18,015 ERROR org.dspace.eperson.SubscribeCLITool @ javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Could not convert socket to TLS (javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)))
```
- And indeed the email seems to be broken:
```console
$ dspace test-email
About to send test email:
- To: fuuuuuu
- Subject: DSpace test email
- Server: smtp.office365.com
Error sending email:
- Error: javax.mail.SendFailedException: Send failure (javax.mail.MessagingException: Could not convert socket to TLS (javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)))
Please see the DSpace documentation for assistance.
```
- I saw a recent thread on the dspace-tech mailing list about this that makes me wonder if Microsoft changed something on Office 365
- I added `mail.smtp.ssl.protocols=TLSv1.2` to the `mail.extraproperties` in dspace.cfg and the test email sent successfully