cgspace-notes/public/post/index.xml

3249 lines
181 KiB
XML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Posts on CGSpace Notes</title>
<link>https://alanorth.github.io/cgspace-notes/post/</link>
<description>Recent content in Posts on CGSpace Notes</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Thu, 01 Sep 2016 15:53:00 +0300</lastBuildDate>
<atom:link href="https://alanorth.github.io/cgspace-notes/post/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>September, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-09/</link>
<pubDate>Thu, 01 Sep 2016 15:53:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-09/</guid>
<description>
&lt;h2 id=&#34;2016-09-01&#34;&gt;2016-09-01&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Discuss helping CCAFS with some batch tagging of ORCID IDs for their authors&lt;/li&gt;
&lt;li&gt;Discuss how the migration of CGIAR&amp;rsquo;s Active Directory to a flat structure will break our LDAP groups in DSpace&lt;/li&gt;
&lt;li&gt;We had been using &lt;code&gt;DC=ILRI&lt;/code&gt; to determine whether a user was ILRI or not&lt;/li&gt;
&lt;li&gt;It looks like we might be able to use OUs now, instead of DCs:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ldapsearch -x -H ldaps://svcgroot2.cgiarad.org:3269/ -b &amp;quot;dc=cgiarad,dc=org&amp;quot; -D &amp;quot;admigration1@cgiarad.org&amp;quot; -W &amp;quot;(sAMAccountName=admigration1)&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;User who has been migrated to the root vs user still in the hierarchical structure:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;distinguishedName: CN=Last\, First (ILRI),OU=ILRI Kenya Employees,OU=ILRI Kenya,OU=ILRIHUB,DC=CGIARAD,DC=ORG
distinguishedName: CN=Last\, First (ILRI),OU=ILRI Ethiopia Employees,OU=ILRI Ethiopia,DC=ILRI,DC=CGIARAD,DC=ORG
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Changing the DSpace LDAP config to use &lt;code&gt;OU=ILRIHUB&lt;/code&gt; seems to work:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/09/ilri-ldap-users.png&#34; alt=&#34;DSpace groups based on LDAP DN&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Notes for local PostgreSQL database recreation from production snapshot:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ dropdb dspacetest
$ createdb -O dspacetest --encoding=UNICODE dspacetest
$ psql dspacetest -c &#39;alter user dspacetest createuser;&#39;
$ pg_restore -O -U dspacetest -d dspacetest ~/Downloads/cgspace_2016-09-01.backup
$ psql dspacetest -c &#39;alter user dspacetest nocreateuser;&#39;
$ psql -U dspacetest -f ~/src/git/DSpace/dspace/etc/postgres/update-sequences.sql dspacetest -h localhost
$ vacuumdb dspacetest
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Some names that I thought I fixed in July seem not to be:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Poole, %&#39;;
text_value | authority | confidence
-----------------------+--------------------------------------+------------
Poole, Elizabeth Jane | b6efa27f-8829-4b92-80fe-bc63e03e3ccb | 600
Poole, Elizabeth Jane | 41628f42-fc38-4b38-b473-93aec9196326 | 600
Poole, Elizabeth Jane | 83b82da0-f652-4ebc-babc-591af1697919 | 600
Poole, Elizabeth Jane | c3a22456-8d6a-41f9-bba0-de51ef564d45 | 600
Poole, E.J. | c3a22456-8d6a-41f9-bba0-de51ef564d45 | 600
Poole, E.J. | 0fbd91b9-1b71-4504-8828-e26885bf8b84 | 600
(6 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;At least a few of these actually have the correct ORCID, but I will unify the authority to be c3a22456-8d6a-41f9-bba0-de51ef564d45&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set authority=&#39;c3a22456-8d6a-41f9-bba0-de51ef564d45&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Poole, %&#39;;
UPDATE 69
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And for Peter Ballantyne:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Ballantyne, %&#39;;
text_value | authority | confidence
-------------------+--------------------------------------+------------
Ballantyne, Peter | 2dcbcc7b-47b0-4fd7-bef9-39d554494081 | 600
Ballantyne, Peter | 4f04ca06-9a76-4206-bd9c-917ca75d278e | 600
Ballantyne, P.G. | 4f04ca06-9a76-4206-bd9c-917ca75d278e | 600
Ballantyne, Peter | ba5f205b-b78b-43e5-8e80-0c9a1e1ad2ca | 600
Ballantyne, Peter | 20f21160-414c-4ecf-89ca-5f2cb64e75c1 | 600
(5 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Again, a few have the correct ORCID, but there should only be one authority&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set authority=&#39;4f04ca06-9a76-4206-bd9c-917ca75d278e&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Ballantyne, %&#39;;
UPDATE 58
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And for me:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Orth, A%&#39;;
text_value | authority | confidence
------------+--------------------------------------+------------
Orth, Alan | 4884def0-4d7e-4256-9dd4-018cd60a5871 | 600
Orth, A. | 4884def0-4d7e-4256-9dd4-018cd60a5871 | 600
Orth, A. | 1a1943a0-3f87-402f-9afe-e52fb46a513e | 600
(3 rows)
dspacetest=# update metadatavalue set authority=&#39;1a1943a0-3f87-402f-9afe-e52fb46a513e&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Orth, %&#39;;
UPDATE 11
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And for CCAFS author Bruce Campbell that I had discussed with CCAFS earlier this week:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set authority=&#39;0e414b4c-4671-4a23-b570-6077aca647d8&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Campbell, B%&#39;;
UPDATE 166
dspacetest=# select distinct text_value, authority, confidence from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Campbell, B%&#39;;
text_value | authority | confidence
------------------------+--------------------------------------+------------
Campbell, Bruce | 0e414b4c-4671-4a23-b570-6077aca647d8 | 600
Campbell, Bruce Morgan | 0e414b4c-4671-4a23-b570-6077aca647d8 | 600
Campbell, B. | 0e414b4c-4671-4a23-b570-6077aca647d8 | 600
Campbell, B.M. | 0e414b4c-4671-4a23-b570-6077aca647d8 | 600
(4 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After updating the Authority indexes (&lt;code&gt;bin/dspace index-authority&lt;/code&gt;) everything looks good&lt;/li&gt;
&lt;li&gt;Run authority updates on CGSpace&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-05&#34;&gt;2016-09-05&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;After one week of logging TLS connections on CGSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# zgrep &amp;quot;DES-CBC3&amp;quot; /var/log/nginx/cgspace.cgiar.org-access-ssl.log* | wc -l
217
# zcat -f -- /var/log/nginx/cgspace.cgiar.org-access-ssl.log* | wc -l
1164376
# zgrep &amp;quot;DES-CBC3&amp;quot; /var/log/nginx/cgspace.cgiar.org-access-ssl.log* | awk &#39;{print $6}&#39; | sort | uniq
TLSv1/DES-CBC3-SHA
TLSv1/EDH-RSA-DES-CBC3-SHA
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So this represents &lt;code&gt;0.02%&lt;/code&gt; of 1.16M connections over a one-week period&lt;/li&gt;
&lt;li&gt;Transforming some filenames in OpenRefine so they can have a useful description for SAFBuilder:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value + &amp;quot;__description:&amp;quot; + cells[&amp;quot;dc.type&amp;quot;].value
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This gives you, for example: &lt;code&gt;Mainstreaming gender in agricultural R&amp;amp;D.pdf__description:Brief&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-06&#34;&gt;2016-09-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Trying to import the records for CIAT from yesterday, but having filename encoding issues from their zip file&lt;/li&gt;
&lt;li&gt;Create a zip on Mac OS X from a SAF bundle containing only one record with one PDF:
&lt;ul&gt;
&lt;li&gt;Filename: Complementing Farmers Genetic Knowledge Farmer Breeding Workshop in Turipaná, Colombia.pdf&lt;/li&gt;
&lt;li&gt;Imports fine on DSpace running on Mac OS X&lt;/li&gt;
&lt;li&gt;Fails to import on DSpace running on Linux with error &lt;code&gt;No such file or directory&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Change diacritic in file name from á to a and re-create SAF bundle and zip
&lt;ul&gt;
&lt;li&gt;Success on both Mac OS X and Linux&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Looks like on the Mac OS X file system the file names represent á as: a (U+0061) + ́ (U+0301)&lt;/li&gt;
&lt;li&gt;See: &lt;a href=&#34;http://www.fileformat.info/info/unicode/char/e1/index.htm&#34;&gt;http://www.fileformat.info/info/unicode/char/e1/index.htm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;See: &lt;a href=&#34;http://demo.icu-project.org/icu-bin/nbrowser?t=%C3%A1&amp;amp;s=&amp;amp;uv=0&#34;&gt;http://demo.icu-project.org/icu-bin/nbrowser?t=%C3%A1&amp;amp;s=&amp;amp;uv=0&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;If I unzip the original zip from CIAT on Windows, re-zip it with 7zip on Windows, and then unzip it on Linux directly, the file names seem to be proper UTF-8&lt;/li&gt;
&lt;li&gt;We should definitely clean filenames so they don&amp;rsquo;t use characters that are tricky to process in CSV and shell scripts, like: &lt;code&gt;,&lt;/code&gt;, &lt;code&gt;&#39;&lt;/code&gt;, and &lt;code&gt;&amp;quot;&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value.replace(&amp;quot;&#39;&amp;quot;,&amp;quot;&amp;quot;).replace(&amp;quot;,&amp;quot;,&amp;quot;&amp;quot;).replace(&#39;&amp;quot;&#39;,&#39;&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I need to write a Python script to match that for renaming files in the file system&lt;/li&gt;
&lt;li&gt;When importing SAF bundles it seems you can specify the target collection on the command line using &lt;code&gt;-c 10568/4003&lt;/code&gt; or in the &lt;code&gt;collections&lt;/code&gt; file inside each item in the bundle&lt;/li&gt;
&lt;li&gt;Seems that the latter method causes a null pointer exception, so I will just have to use the former method&lt;/li&gt;
&lt;li&gt;In the end I was able to import the files after unzipping them ONLY on Linux
&lt;ul&gt;
&lt;li&gt;The CSV file was giving file names in UTF-8, and unzipping the zip on Mac OS X and transferring it was converting the file names to Unicode equivalence like I saw above&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Import CIAT Gender Network records to CGSpace, first creating the SAF bundles as my user, then importing as the &lt;code&gt;tomcat7&lt;/code&gt; user, and deleting the bundle, for each collection&amp;rsquo;s items:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./safbuilder.sh -c /home/aorth/ciat-gender-2016-09-06/66601.csv
$ JAVA_OPTS=&amp;quot;-Dfile.encoding=UTF-8 -Xmx512m&amp;quot; /home/cgspace.cgiar.org/bin/dspace import -a -e aorth@mjanja.ch -c 10568/66601 -s /home/aorth/ciat-gender-2016-09-06/SimpleArchiveFormat -m 66601.map
$ rm -rf ~/ciat-gender-2016-09-06/SimpleArchiveFormat/
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-09-07&#34;&gt;2016-09-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Erase and rebuild DSpace Test based on latest Ubuntu 16.04, PostgreSQL 9.5, and Java 8 stuff&lt;/li&gt;
&lt;li&gt;Reading about PostgreSQL maintenance and it seems manual vacuuming is only for certain workloads, such as heavy update/write loads&lt;/li&gt;
&lt;li&gt;I suggest we disable our nightly manual vacuum task, as we&amp;rsquo;re a mostly read workload, and I&amp;rsquo;d rather stick as close to the documentation as possible since we haven&amp;rsquo;t done any testing/observation of PostgreSQL&lt;/li&gt;
&lt;li&gt;See: &lt;a href=&#34;https://www.postgresql.org/docs/9.3/static/routine-vacuuming.html&#34;&gt;https://www.postgresql.org/docs/9.3/static/routine-vacuuming.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CGSpace went down and the error seems to be the same as always (lately):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-09-07 11:39:23,162 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL connection Error -
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Since CGSpace had crashed I quickly deployed the new LDAP settings before restarting Tomcat&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-13&#34;&gt;2016-09-13&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace crashed twice today, errors from &lt;code&gt;catalina.out&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I enabled logging of requests to &lt;code&gt;/rest&lt;/code&gt; again&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-14&#34;&gt;2016-09-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace crashed again, errors from &lt;code&gt;catalina.out&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:114)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I restarted Tomcat and it was ok again&lt;/li&gt;
&lt;li&gt;CGSpace crashed a few hours later, errors from &lt;code&gt;catalina.out&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-25&amp;quot; java.lang.OutOfMemoryError: Java heap space
at java.lang.StringCoding.decode(StringCoding.java:215)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;We haven&amp;rsquo;t seen that in quite a while&amp;hellip;&lt;/li&gt;
&lt;li&gt;Indeed, in a month of logs it only occurs 15 times:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# grep -rsI &amp;quot;OutOfMemoryError&amp;quot; /var/log/tomcat7/catalina.* | wc -l
15
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I also see a bunch of errors from dspace.log:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-09-14 12:23:07,981 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL connection Error -
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Looking at REST requests, it seems there is one IP hitting us nonstop:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# awk &#39;{print $1}&#39; /var/log/nginx/rest.log | sort -n | uniq -c | sort -h | tail -n 3
820 50.87.54.15
12872 70.32.99.142
25744 70.32.83.92
# awk &#39;{print $1}&#39; /var/log/nginx/rest.log.1 | sort -n | uniq -c | sort -h | tail -n 3
7966 181.118.144.29
54706 70.32.99.142
109412 70.32.83.92
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Those are the same IPs that were hitting us heavily in July, 2016 as well&amp;hellip;&lt;/li&gt;
&lt;li&gt;I think the stability issues are definitely from REST&lt;/li&gt;
&lt;li&gt;Crashed AGAIN, errors from dspace.log:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-09-14 14:31:43,069 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL connection Error -
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And more heap space errors:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# grep -rsI &amp;quot;OutOfMemoryError&amp;quot; /var/log/tomcat7/catalina.* | wc -l
19
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;There are no more rest requests since the last crash, so maybe there are other things causing this.&lt;/li&gt;
&lt;li&gt;Hmm, I noticed a shitload of IPs from 180.76.0.0/16 are connecting to both CGSpace and DSpace Test (58 unique IPs concurrently!)&lt;/li&gt;
&lt;li&gt;They seem to be coming from Baidu, and so far during today alone account for &lt;sup&gt;1&lt;/sup&gt;&amp;frasl;&lt;sub&gt;6&lt;/sub&gt; of every connection:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# grep -c ip_addr= /home/cgspace.cgiar.org/log/dspace.log.2016-09-14
29084
# grep -c ip_addr=180.76.15 /home/cgspace.cgiar.org/log/dspace.log.2016-09-14
5192
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Other recent days are the same&amp;hellip; hmmm.&lt;/li&gt;
&lt;li&gt;From the activity control panel I can see 58 unique IPs hitting the site &lt;em&gt;concurrently&lt;/em&gt;, which has GOT to hurt our stability&lt;/li&gt;
&lt;li&gt;A list of all 2000 unique IPs from CGSpace logs today:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# grep ip_addr= /home/cgspace.cgiar.org/log/dspace.log.2016-09-11 | awk -F: &#39;{print $5}&#39; | sort -n | uniq -c | sort -h | tail -n 100
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Looking at the top 20 IPs or so, most are Yahoo, MSN, Google, Baidu, TurnitIn (iParadigm), etc&amp;hellip; do we have any real users?&lt;/li&gt;
&lt;li&gt;Generate a list of all author affiliations for Peter Ballantyne to go through, make corrections, and create a lookup list from:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# \copy (select text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=211 group by text_value order by count desc) to /tmp/affiliations.csv with csv;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Looking into the Catalina logs again around the time of the first crash, I see:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Wed Sep 14 09:47:27 UTC 2016 | Query:id: 78581 AND type:2
Wed Sep 14 09:47:28 UTC 2016 | Updating : 6/6 docs.
Commit
Commit done
dn:CN=Haman\, Magdalena (CIAT-CCAFS),OU=Standard,OU=Users,OU=HQ,OU=CIATHUB,dc=cgiarad,dc=org
Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-193&amp;quot; java.lang.OutOfMemoryError: Java heap space
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And after that I see a bunch of &amp;ldquo;pool error Timeout waiting for idle object&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Later, near the time of the next crash I see:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dn:CN=Haman\, Magdalena (CIAT-CCAFS),OU=Standard,OU=Users,OU=HQ,OU=CIATHUB,dc=cgiarad,dc=org
Wed Sep 14 11:29:55 UTC 2016 | Query:id: 79078 AND type:2
Wed Sep 14 11:30:20 UTC 2016 | Updating : 6/6 docs.
Commit
Commit done
Sep 14, 2016 11:32:22 AM com.sun.jersey.server.wadl.generators.WadlGeneratorJAXBGrammarGenerator buildModelAndSchemas
SEVERE: Failed to generate the schema for the JAX-B elements
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
java.util.Map is an interface, and JAXB can&#39;t handle interfaces.
this problem is related to the following location:
at java.util.Map
at public java.util.Map com.atmire.dspace.rest.common.Statlet.getRender()
at com.atmire.dspace.rest.common.Statlet
java.util.Map does not have a no-arg default constructor.
this problem is related to the following location:
at java.util.Map
at public java.util.Map com.atmire.dspace.rest.common.Statlet.getRender()
at com.atmire.dspace.rest.common.Statlet
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Then 20 minutes later another outOfMemoryError:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-25&amp;quot; java.lang.OutOfMemoryError: Java heap space
at java.lang.StringCoding.decode(StringCoding.java:215)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Perhaps these particular issues &lt;em&gt;are&lt;/em&gt; memory issues, the munin graphs definitely show some weird purging/allocating behavior starting this week&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/09/tomcat_jvm-day.png&#34; alt=&#34;Tomcat JVM usage day&#34; /&gt;
&lt;img src=&#34;2016/09/tomcat_jvm-week.png&#34; alt=&#34;Tomcat JVM usage week&#34; /&gt;
&lt;img src=&#34;2016/09/tomcat_jvm-month.png&#34; alt=&#34;Tomcat JVM usage month&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;And really, we did reduce the memory of CGSpace in late 2015, so maybe we should just increase it again, now that our usage is higher and we are having memory errors in the logs&lt;/li&gt;
&lt;li&gt;Oh great, the configuration on the actual server is different than in configuration management!&lt;/li&gt;
&lt;li&gt;Seems we added a bunch of settings to the &lt;code&gt;/etc/default/tomcat7&lt;/code&gt; in December, 2015 and never updated our ansible repository:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;JAVA_OPTS=&amp;quot;-Djava.awt.headless=true -Xms3584m -Xmx3584m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8 -XX:-UseGCOverheadLimit -XX:MaxGCPauseMillis=250 -XX:GCTimeRatio=9 -XX:+PerfDisableSharedMem -XX:+ParallelRefProcEnabled -XX:G1HeapRegionSize=8m -XX:InitiatingHeapOccupancyPercent=75 -XX:+UseLargePages -XX:+AggressiveOpts&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So I&amp;rsquo;m going to bump the heap +512m and remove all the other experimental shit (and update ansible!)&lt;/li&gt;
&lt;li&gt;Increased JVM heap to 4096m on CGSpace (linode01)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-15&#34;&gt;2016-09-15&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looking at Google Webmaster Tools again, it seems the work I did on URL query parameters and blocking via the &lt;code&gt;X-Robots-Tag&lt;/code&gt; HTTP header in March, 2016 seem to have had a positive effect on Google&amp;rsquo;s index for CGSpace&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/09/google-webmaster-tools-index.png&#34; alt=&#34;Google Webmaster Tools for CGSpace&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;2016-09-16&#34;&gt;2016-09-16&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace crashed again, and there are TONS of heap space errors but the datestamps aren&amp;rsquo;t on those lines so I&amp;rsquo;m not sure if they were yesterday:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dn:CN=Orentlicher\, Natalie (CIAT),OU=Standard,OU=Users,OU=HQ,OU=CIATHUB,dc=cgiarad,dc=org
Thu Sep 15 18:45:25 UTC 2016 | Query:id: 55785 AND type:2
Thu Sep 15 18:45:26 UTC 2016 | Updating : 100/218 docs.
Thu Sep 15 18:45:26 UTC 2016 | Updating : 200/218 docs.
Thu Sep 15 18:45:27 UTC 2016 | Updating : 218/218 docs.
Commit
Commit done
Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-247&amp;quot; java.lang.OutOfMemoryError: Java heap space
Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-241&amp;quot; java.lang.OutOfMemoryError: Java heap space
Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-243&amp;quot; java.lang.OutOfMemoryError: Java heap space
Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-258&amp;quot; java.lang.OutOfMemoryError: Java heap space
Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-268&amp;quot; java.lang.OutOfMemoryError: Java heap space
Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-263&amp;quot; java.lang.OutOfMemoryError: Java heap space
Exception in thread &amp;quot;http-bio-127.0.0.1-8081-exec-280&amp;quot; java.lang.OutOfMemoryError: Java heap space
Exception in thread &amp;quot;Thread-54216&amp;quot; org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Exception writing document id 7feaa95d-8e1f-4f45-80bb
-e14ef82ee224 to the index; possible analysis error.
at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:552)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:124)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:116)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:102)
at com.atmire.statistics.SolrLogThread.run(SourceFile:25)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I bumped the heap space from 4096m to 5120m to see if this is &lt;em&gt;really&lt;/em&gt; about heap speace or not.&lt;/li&gt;
&lt;li&gt;Looking into some of these errors that I&amp;rsquo;ve seen this week but haven&amp;rsquo;t noticed before:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# zcat -f -- /var/log/tomcat7/catalina.* | grep -c &#39;Failed to generate the schema for the JAX-B elements&#39;
113
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I&amp;rsquo;ve sent a message to Atmire about the Solr error to see if it&amp;rsquo;s related to their batch update module&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-19&#34;&gt;2016-09-19&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Work on cleanups for author affiliations after Peter sent me his list of corrections/deletions:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i affiliations_pb-322-corrections.csv -f cg.contributor.affiliation -t correct -m 211 -d dspace -u dspace -p fuuu
$ ./delete-metadata-values.py -f cg.contributor.affiliation -i affiliations_pb-2-deletions.csv -m 211 -u dspace-d dspace-p fuuu
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After that we need to take the top ~300 and make a controlled vocabulary for it&lt;/li&gt;
&lt;li&gt;I dumped a list of the top 300 affiliations from the database, sorted it alphabetically in OpenRefine, and created a controlled vocabulary for it (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/267&#34;&gt;#267&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-20&#34;&gt;2016-09-20&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run all system updates on DSpace Test and reboot the server&lt;/li&gt;
&lt;li&gt;Merge changes for sponsorship and affiliation controlled vocabularies (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/267&#34;&gt;#267&lt;/a&gt;, &lt;a href=&#34;https://github.com/ilri/DSpace/pull/268&#34;&gt;#268&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Merge minor changes to &lt;code&gt;messages.xml&lt;/code&gt; to reconcile it with the stock DSpace 5.1 one (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/269&#34;&gt;#269&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Peter asked about adding title search to Discovery&lt;/li&gt;
&lt;li&gt;The index was already defined, so I just added it to the search filters&lt;/li&gt;
&lt;li&gt;It works but CGSpace apparently uses &lt;code&gt;OR&lt;/code&gt; for search terms, which makes the search results basically useless&lt;/li&gt;
&lt;li&gt;I need to read the docs and ask on the mailing list to see if we can tweak that&lt;/li&gt;
&lt;li&gt;Generate a new list of sponsors from the database for Peter Ballantyne so we can clean them up and update the controlled vocabulary&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-21&#34;&gt;2016-09-21&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turns out the Solr search logic switched from OR to AND in DSpace 6.0 and the change is easy to backport: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-2809&#34;&gt;https://jira.duraspace.org/browse/DS-2809&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We just need to set this in &lt;code&gt;dspace/solr/search/conf/schema.xml&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;solrQueryParser defaultOperator=&amp;quot;AND&amp;quot;/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;It actually works really well, and search results return much less hits now (before, after):&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/09/cgspace-search.png&#34; alt=&#34;CGSpace search with &amp;quot;OR&amp;quot; boolean logic&#34; /&gt;
&lt;img src=&#34;2016/09/dspacetest-search.png&#34; alt=&#34;DSpace Test search with &amp;quot;AND&amp;quot; boolean logic&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Found a way to improve the configuration of Atmire&amp;rsquo;s Content and Usage Analysis (CUA) module for date fields&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;-content.analysis.dataset.option.8=metadata:dateAccessioned:discovery
+content.analysis.dataset.option.8=metadata:dc.date.accessioned:date(month)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This allows the module to treat the field as a date rather than a text string, so we can interrogate it more intelligently&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;dc.date.accessioned&lt;/code&gt; to XMLUI Discovery search filters&lt;/li&gt;
&lt;li&gt;Major CGSpace crash because ILRI forgot to pay the Linode bill&lt;/li&gt;
&lt;li&gt;45 minutes of downtime!&lt;/li&gt;
&lt;li&gt;Start processing the fixes to &lt;code&gt;dc.description.sponsorship&lt;/code&gt; from Peter Ballantyne:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i sponsors-fix-21.csv -f dc.description.sponsorship -t correct -m 29 -d dspacetest -u dspacetest -p fuuu
$ ./delete-metadata-values.py -i sponsors-delete-8.csv -f dc.description.sponsorship -m 29 -d dspacetest -u dspacetest -p fuuu
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I need to run these and the others from a few days ago on CGSpace the next time we run updates&lt;/li&gt;
&lt;li&gt;Also, I need to update the controlled vocab for sponsors based on these&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>August, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-08/</link>
<pubDate>Mon, 01 Aug 2016 15:53:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-08/</guid>
<description>
&lt;h2 id=&#34;2016-08-01&#34;&gt;2016-08-01&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Add updated distribution license from Sisay (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/259&#34;&gt;#259&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Play with upgrading Mirage 2 dependencies in &lt;code&gt;bower.json&lt;/code&gt; because most are several versions of out date&lt;/li&gt;
&lt;li&gt;Bootstrap is at 3.3.0 but upstream is at 3.3.7, and upgrading to anything beyond 3.3.1 breaks glyphicons and probably more&lt;/li&gt;
&lt;li&gt;bower stuff is a dead end, waste of time, too many issues&lt;/li&gt;
&lt;li&gt;Anything after Bootstrap 3.3.1 makes glyphicons disappear (HTTP 404 trying to access from incorrect path of &lt;code&gt;fonts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Start working on DSpace 5.15.5 port:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ git checkout -b 55new 5_x-prod
$ git reset --hard ilri/5_x-prod
$ git rebase -i dspace-5.5
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Lots of conflicts that don&amp;rsquo;t make sense (ie, shouldn&amp;rsquo;t conflict!)&lt;/li&gt;
&lt;li&gt;This file in particular conflicts almost 10 times: &lt;code&gt;dspace/modules/xmlui-mirage2/src/main/webapp/themes/CGIAR/styles/_style.scss&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Checking out a clean branch at 5.5 and cherry-picking our commits works where that file would normally have a conflict&lt;/li&gt;
&lt;li&gt;Seems to be related to merge commits&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git rebase --preserve-merges&lt;/code&gt; doesn&amp;rsquo;t seem to help&lt;/li&gt;
&lt;li&gt;Eventually I just turned on git rerere and solved the conflicts and completed the 403 commit rebase&lt;/li&gt;
&lt;li&gt;The 5.5 code now builds but doesn&amp;rsquo;t run (white page in Tomcat)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-02&#34;&gt;2016-08-02&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Ask Atmire for help with DSpace 5.5 issue&lt;/li&gt;
&lt;li&gt;Vanilla DSpace 5.5 deploys and runs fine&lt;/li&gt;
&lt;li&gt;Playing with DSpace in Ubuntu 16.04 and Tomcat 7&lt;/li&gt;
&lt;li&gt;Everything is still fucked up, even vanilla DSpace 5.5&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-04&#34;&gt;2016-08-04&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Ask on DSpace mailing list about duplicate authors, Discovery and author text values&lt;/li&gt;
&lt;li&gt;Atmire responded with some new DSpace 5.5 ready versions to try for their modules&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-05&#34;&gt;2016-08-05&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fix item display incorrectly displaying Species when Breeds were present (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/260&#34;&gt;#260&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Experiment with fixing more authors, like Delia Grace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set authority=&#39;0b4fcbc1-d930-4319-9b4d-ea1553cca70b&#39;, confidence=600 where metadata_field_id=3 and text_value=&#39;Grace, D.&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-08-06&#34;&gt;2016-08-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Finally figured out how to remove &amp;ldquo;View/Open&amp;rdquo; and &amp;ldquo;Bitstreams&amp;rdquo; from the item view&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-07&#34;&gt;2016-08-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Start working on Ubuntu 16.04 Ansible playbook for Tomcat 8, PostgreSQL 9.5, Oracle 8, etc&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-08&#34;&gt;2016-08-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Still troubleshooting Atmire modules on DSpace 5.5&lt;/li&gt;
&lt;li&gt;Vanilla DSpace 5.5 works on Tomcat 7&amp;hellip;&lt;/li&gt;
&lt;li&gt;Ooh, and vanilla DSpace 5.5 works on Tomcat 8 with Java 8!&lt;/li&gt;
&lt;li&gt;Some notes about setting up Tomcat 8, since it&amp;rsquo;s new on this machine&amp;hellip;&lt;/li&gt;
&lt;li&gt;Install latest Oracle Java 8 JDK&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;setenv.sh&lt;/code&gt; in Tomcat 8 &lt;code&gt;libexec/bin&lt;/code&gt; directory:
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;CATALINA_OPTS=&amp;quot;-Djava.awt.headless=true -Xms3072m -Xmx3072m -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -Dfile.encoding=UTF-8&amp;quot;
CATALINA_OPTS=&amp;quot;$CATALINA_OPTS -Djava.library.path=/opt/brew/Cellar/tomcat-native/1.2.8/lib&amp;quot;
JRE_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Edit Tomcat 8 &lt;code&gt;server.xml&lt;/code&gt; to add regular HTTP listener for solr&lt;/li&gt;
&lt;li&gt;Symlink webapps:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ rm -rf /opt/brew/Cellar/tomcat/8.5.4/libexec/webapps/ROOT
$ ln -sv ~/dspace/webapps/xmlui /opt/brew/Cellar/tomcat/8.5.4/libexec/webapps/ROOT
$ ln -sv ~/dspace/webapps/oai /opt/brew/Cellar/tomcat/8.5.4/libexec/webapps/oai
$ ln -sv ~/dspace/webapps/jspui /opt/brew/Cellar/tomcat/8.5.4/libexec/webapps/jspui
$ ln -sv ~/dspace/webapps/rest /opt/brew/Cellar/tomcat/8.5.4/libexec/webapps/rest
$ ln -sv ~/dspace/webapps/solr /opt/brew/Cellar/tomcat/8.5.4/libexec/webapps/solr
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-08-09&#34;&gt;2016-08-09&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;More tests of Atmire&amp;rsquo;s 5.5 modules on a clean, working instance of &lt;code&gt;5_x-prod&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Still fails, though perhaps differently than before (Flyway): &lt;a href=&#34;https://gist.github.com/alanorth/5d49c45a16efd7c6bc1e6642e66118b2&#34;&gt;https://gist.github.com/alanorth/5d49c45a16efd7c6bc1e6642e66118b2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;More work on Tomcat 8 and Java 8 stuff for Ansible playbooks&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-10&#34;&gt;2016-08-10&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turns out DSpace 5.x isn&amp;rsquo;t ready for Tomcat 8: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-3092&#34;&gt;https://jira.duraspace.org/browse/DS-3092&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;So we&amp;rsquo;ll need to use Tomcat 7 + Java 8 on Ubuntu 16.04&lt;/li&gt;
&lt;li&gt;More work on the Ansible stuff for this, allowing Tomcat 7 to use Java 8&lt;/li&gt;
&lt;li&gt;Merge pull request for fixing the type Discovery index to use &lt;code&gt;dc.type&lt;/code&gt; (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/262&#34;&gt;#262&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Merge pull request for removing &amp;ldquo;Bitstream&amp;rdquo; text from item display, as it confuses users and isn&amp;rsquo;t necessary (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/263&#34;&gt;#263&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-11&#34;&gt;2016-08-11&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Finally got DSpace (5.5) running on Ubuntu 16.04, Tomcat 7, Java 8, PostgreSQL 9.5 via the updated Ansible stuff&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/08/dspace55-ubuntu16.04.png&#34; alt=&#34;DSpace 5.5 on Ubuntu 16.04, Tomcat 7, Java 8, PostgreSQL 9.5&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;2016-08-14&#34;&gt;2016-08-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Update Mirage 2 build notes for Ubuntu 16.04: &lt;a href=&#34;https://gist.github.com/alanorth/2cf9c15834dc68a514262fcb04004cb0&#34;&gt;https://gist.github.com/alanorth/2cf9c15834dc68a514262fcb04004cb0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-15&#34;&gt;2016-08-15&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Notes on NodeJS + nginx + systemd: &lt;a href=&#34;https://gist.github.com/alanorth/51acd476891c67dfe27725848cf5ace1&#34;&gt;https://gist.github.com/alanorth/51acd476891c67dfe27725848cf5ace1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/08/nodejs-nginx.png&#34; alt=&#34;ExpressJS running behind nginx&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;2016-08-16&#34;&gt;2016-08-16&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Troubleshoot Paramiko connection issues with Ansible on ILRI servers: &lt;a href=&#34;https://github.com/ilri/rmg-ansible-public/issues/37&#34;&gt;#37&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Turns out we need to add some MACs to our &lt;code&gt;sshd_config&lt;/code&gt;: hmac-sha2-512,hmac-sha2-256&lt;/li&gt;
&lt;li&gt;Update DSpace Test&amp;rsquo;s Java to version 8 to start testing this configuration (&lt;a href=&#34;https://wiki.apache.org/solr/ShawnHeisey&#34;&gt;seeing as Solr recommends it&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-17&#34;&gt;2016-08-17&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;More work on Let&amp;rsquo;s Encrypt stuff for Ansible roles&lt;/li&gt;
&lt;li&gt;Yesterday Atmire responded about DSpace 5.5 issues and asked me to try the &lt;code&gt;dspace database repair&lt;/code&gt; command to fix Flyway issues&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;dspace database&lt;/code&gt; command doesn&amp;rsquo;t even run: &lt;a href=&#34;https://gist.github.com/alanorth/c43c8d89e8df346d32c0ee938be90cd5&#34;&gt;https://gist.github.com/alanorth/c43c8d89e8df346d32c0ee938be90cd5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Oops, it looks like the missing classes causing &lt;code&gt;dspace database&lt;/code&gt; to fail were coming from the old &lt;code&gt;~/dspace/config/spring&lt;/code&gt; folder&lt;/li&gt;
&lt;li&gt;After removing the spring folder and running ant install again, &lt;code&gt;dspace database&lt;/code&gt; works&lt;/li&gt;
&lt;li&gt;I see there are missing and pending Flyway migrations, but running &lt;code&gt;dspace database repair&lt;/code&gt; and &lt;code&gt;dspace database migrate&lt;/code&gt; does nothing: &lt;a href=&#34;https://gist.github.com/alanorth/41ed5abf2ff32d8ac9eedd1c3d015d70&#34;&gt;https://gist.github.com/alanorth/41ed5abf2ff32d8ac9eedd1c3d015d70&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-18&#34;&gt;2016-08-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fix &amp;ldquo;CONGO,DR&amp;rdquo; country name in &lt;code&gt;input-forms.xml&lt;/code&gt; (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/264&#34;&gt;#264&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Also need to fix existing records using the incorrect form in the database:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set text_value=&#39;CONGO, DR&#39; where resource_type_id=2 and metadata_field_id=228 and text_value=&#39;CONGO,DR&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I asked a question on the DSpace mailing list about updating &amp;ldquo;preferred&amp;rdquo; forms of author names from ORCID&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-21&#34;&gt;2016-08-21&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A few days ago someone on the DSpace mailing list suggested I try &lt;code&gt;dspace dsrun org.dspace.authority.UpdateAuthorities&lt;/code&gt; to update preferred author names from ORCID&lt;/li&gt;
&lt;li&gt;If you set &lt;code&gt;auto-update-items=true&lt;/code&gt; in &lt;code&gt;dspace/config/modules/solrauthority.cfg&lt;/code&gt; it is supposed to update records it finds automatically&lt;/li&gt;
&lt;li&gt;I updated my name format on ORCID and I&amp;rsquo;ve been running that script a few times per day since then but nothing has changed&lt;/li&gt;
&lt;li&gt;Still troubleshooting Atmire modules on DSpace 5.5&lt;/li&gt;
&lt;li&gt;I sent them some new verbose logs: &lt;a href=&#34;https://gist.github.com/alanorth/700748995649688148ceba89d760253e&#34;&gt;https://gist.github.com/alanorth/700748995649688148ceba89d760253e&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-22&#34;&gt;2016-08-22&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Database migrations are fine on DSpace 5.1:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ~/dspace/bin/dspace database info
Database URL: jdbc:postgresql://localhost:5432/dspacetest
Database Schema: public
Database Software: PostgreSQL version 9.3.14
Database Driver: PostgreSQL Native Driver version PostgreSQL 9.1 JDBC4 (build 901)
+----------------+----------------------------+---------------------+---------+
| Version | Description | Installed on | State |
+----------------+----------------------------+---------------------+---------+
| 1.1 | Initial DSpace 1.1 databas | | PreInit |
| 1.2 | Upgrade to DSpace 1.2 sche | | PreInit |
| 1.3 | Upgrade to DSpace 1.3 sche | | PreInit |
| 1.3.9 | Drop constraint for DSpace | | PreInit |
| 1.4 | Upgrade to DSpace 1.4 sche | | PreInit |
| 1.5 | Upgrade to DSpace 1.5 sche | | PreInit |
| 1.5.9 | Drop constraint for DSpace | | PreInit |
| 1.6 | Upgrade to DSpace 1.6 sche | | PreInit |
| 1.7 | Upgrade to DSpace 1.7 sche | | PreInit |
| 1.8 | Upgrade to DSpace 1.8 sche | | PreInit |
| 3.0 | Upgrade to DSpace 3.x sche | | PreInit |
| 4.0 | Initializing from DSpace 4 | 2015-11-20 12:42:52 | Success |
| 5.0.2014.08.08 | DS-1945 Helpdesk Request a | 2015-11-20 12:42:53 | Success |
| 5.0.2014.09.25 | DS 1582 Metadata For All O | 2015-11-20 12:42:55 | Success |
| 5.0.2014.09.26 | DS-1582 Metadata For All O | 2015-11-20 12:42:55 | Success |
| 5.0.2015.01.27 | MigrateAtmireExtraMetadata | 2015-11-20 12:43:29 | Success |
| 5.1.2015.12.03 | Atmire CUA 4 migration | 2016-03-21 17:10:41 | Success |
| 5.1.2015.12.03 | Atmire MQM migration | 2016-03-21 17:10:42 | Success |
+----------------+----------------------------+---------------------+---------+
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So I&amp;rsquo;m not sure why they have problems when we move to DSpace 5.5 (even the 5.1 migrations themselves show as &amp;ldquo;Missing&amp;rdquo;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-23&#34;&gt;2016-08-23&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Help Paola from CCAFS with her thumbnails again&lt;/li&gt;
&lt;li&gt;Talk to Atmire about the DSpace 5.5 issue, and it seems to be caused by a bug in FlywayDB&lt;/li&gt;
&lt;li&gt;They said I should delete the Atmire migrations
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# delete from schema_version where description = &#39;Atmire CUA 4 migration&#39; and version=&#39;5.1.2015.12.03.2&#39;;
dspacetest=# delete from schema_version where description = &#39;Atmire MQM migration&#39; and version=&#39;5.1.2015.12.03.3&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After that DSpace starts up by XMLUI now has unrelated issues that I need to solve!&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;org.apache.avalon.framework.configuration.ConfigurationException: Type &#39;ThemeResourceReader&#39; does not exist for &#39;map:read&#39; at jndi:/localhost/themes/0_CGIAR/sitemap.xmap:136:77
context:/jndi:/localhost/themes/0_CGIAR/sitemap.xmap - 136:77
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Looks like we&amp;rsquo;re missing some stuff in the XMLUI module&amp;rsquo;s &lt;code&gt;sitemap.xmap&lt;/code&gt;, as well as in each of our XMLUI themes&lt;/li&gt;
&lt;li&gt;Diff them with these to get the &lt;code&gt;ThemeResourceReader&lt;/code&gt; changes:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;dspace-xmlui/src/main/webapp/sitemap.xmap&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dspace-xmlui-mirage2/src/main/webapp/sitemap.xmap&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Then we had some NullPointerException from the SolrLogger class, which is apparently part of Atmire&amp;rsquo;s CUA module&lt;/li&gt;
&lt;li&gt;I tried with a small version bump to CUA but it didn&amp;rsquo;t work (version &lt;code&gt;5.5-4.1.1-0&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Also, I started looking into huge pages to prepare for PostgreSQL 9.5, but it seems Linode&amp;rsquo;s kernels don&amp;rsquo;t enable them&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-24&#34;&gt;2016-08-24&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Clean up and import 48 CCAFS records into DSpace Test&lt;/li&gt;
&lt;li&gt;SQL to get all journal titles from dc.source (55), since it&amp;rsquo;s apparently used for internal DSpace filename shit, but we moved all our journal titles there a few months ago:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select distinct text_value from metadatavalue where metadata_field_id=55 and text_value !~ &#39;.*(\.pdf|\.png|\.PDF|\.Pdf|\.JPEG|\.jpg|\.JPG|\.jpeg|\.xls|\.rtf|\.docx?|\.potx|\.dotx|\.eqa|\.tiff|\.mp4|\.mp3|\.gif|\.zip|\.txt|\.pptx|\.indd|\.PNG|\.bmp|\.exe|org\.dspace\.app\.mediafilter).*&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-08-25&#34;&gt;2016-08-25&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Atmire suggested adding a missing bean to &lt;code&gt;dspace/config/spring/api/atmire-cua.xml&lt;/code&gt; but it doesn&amp;rsquo;t help:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;...
Error creating bean with name &#39;MetadataStorageInfoService&#39;
...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Atmire sent an updated version of &lt;code&gt;dspace/config/spring/api/atmire-cua.xml&lt;/code&gt; and now XMLUI starts but gives a null pointer exception:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Java stacktrace: java.lang.NullPointerException
at org.dspace.app.xmlui.aspect.statistics.Navigation.addOptions(Navigation.java:129)
at org.dspace.app.xmlui.wing.AbstractWingTransformer.startElement(AbstractWingTransformer.java:228)
at sun.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
at com.sun.proxy.$Proxy103.startElement(Unknown Source)
at org.apache.cocoon.environment.internal.EnvironmentChanger.startElement(EnvironmentStack.java:140)
at org.apache.cocoon.environment.internal.EnvironmentChanger.startElement(EnvironmentStack.java:140)
at org.apache.cocoon.xml.AbstractXMLPipe.startElement(AbstractXMLPipe.java:94)
...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Import the 47 CCAFS records to CGSpace, creating the SimpleArchiveFormat bundles and importing like:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./safbuilder.sh -c /tmp/Thumbnails\ to\ Upload\ to\ CGSpace/3546.csv
$ JAVA_OPTS=&amp;quot;-Dfile.encoding=UTF-8 -Xmx512m&amp;quot; /home/cgspace.cgiar.org/bin/dspace import -a -e aorth@mjanja.ch -c 10568/3546 -s /tmp/Thumbnails\ to\ Upload\ to\ CGSpace/SimpleArchiveFormat -m 3546.map
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Finally got DSpace 5.5 working with the Atmire modules after a few rounds of back and forth with Atmire devs&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-26&#34;&gt;2016-08-26&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace had issues tonight, not entirely crashing, but becoming unresponsive&lt;/li&gt;
&lt;li&gt;The dspace log had this:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-08-26 20:48:05,040 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL connection Error - org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Related to /rest no doubt&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-08-27&#34;&gt;2016-08-27&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run corrections for Delia Grace and &lt;code&gt;CONGO, DR&lt;/code&gt;, and deploy August changes to CGSpace&lt;/li&gt;
&lt;li&gt;Run all system updates and reboot the server&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>July, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-07/</link>
<pubDate>Fri, 01 Jul 2016 10:53:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-07/</guid>
<description>
&lt;h2 id=&#34;2016-07-01&#34;&gt;2016-07-01&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Add &lt;code&gt;dc.description.sponsorship&lt;/code&gt; to Discovery sidebar facets and make investors clickable in item view (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/232&#34;&gt;#232&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;I think this query should find and replace all authors that have &amp;ldquo;,&amp;rdquo; at the end of their names:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, &#39;(^.+?),$&#39;, &#39;\1&#39;) where metadata_field_id=3 and resource_type_id=2 and text_value ~ &#39;^.+?,$&#39;;
UPDATE 95
dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value ~ &#39;^.+?,$&#39;;
text_value
------------
(0 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;In this case the select query was showing 95 results before the update&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-02&#34;&gt;2016-07-02&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Comment on DSpace Jira ticket about author lookup search text (&lt;a href=&#34;https://jira.duraspace.org/browse/DS-2329&#34;&gt;DS-2329&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-04&#34;&gt;2016-07-04&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Seems the database&amp;rsquo;s author authority values mean nothing without the &lt;code&gt;authority&lt;/code&gt; Solr core from the host where they were created!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-05&#34;&gt;2016-07-05&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Amend &lt;code&gt;backup-solr.sh&lt;/code&gt; script so it backs up the entire Solr folder&lt;/li&gt;
&lt;li&gt;We &lt;em&gt;really&lt;/em&gt; only need &lt;code&gt;statistics&lt;/code&gt; and &lt;code&gt;authority&lt;/code&gt; but meh&lt;/li&gt;
&lt;li&gt;Fix metadata for species on DSpace Test:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i /tmp/Species-Peter-Fix.csv -f dc.Species -t CORRECT -m 94 -d dspacetest -u dspacetest -p &#39;fuuu&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Will run later on CGSpace&lt;/li&gt;
&lt;li&gt;A user is still having problems with Sherpa/Romeo causing crashes during the submission process when the journal is &amp;ldquo;ungraded&amp;rdquo;&lt;/li&gt;
&lt;li&gt;I tested the &lt;a href=&#34;https://jira.duraspace.org/browse/DS-2740&#34;&gt;patch for DS-2740&lt;/a&gt; that I had found last month and it seems to work&lt;/li&gt;
&lt;li&gt;I will merge it to &lt;code&gt;5_x-prod&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-06&#34;&gt;2016-07-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Delete 23 blank metadata values from CGSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;cgspace=# delete from metadatavalue where resource_type_id=2 and text_value=&#39;&#39;;
DELETE 23
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Complete phase three of metadata migration, for the following fields:
&lt;ul&gt;
&lt;li&gt;dc.title.jtitle → dc.source&lt;/li&gt;
&lt;li&gt;dc.crsubject.crpsubject → cg.contributor.crp&lt;/li&gt;
&lt;li&gt;dc.contributor.affiliation → cg.contributor.affiliation&lt;/li&gt;
&lt;li&gt;dc.Species → cg.species&lt;/li&gt;
&lt;li&gt;dc.srplace.subregion → cg.coverage.subregion&lt;/li&gt;
&lt;li&gt;dc.contributor.corporate → dc.contributor.author&lt;/li&gt;
&lt;li&gt;dc.identifier.url → cg.identifier.url&lt;/li&gt;
&lt;li&gt;dc.identifier.doi → cg.identifier.doi&lt;/li&gt;
&lt;li&gt;dc.identifier.googleurl → cg.identifier.googleurl&lt;/li&gt;
&lt;li&gt;dc.identifier.dataurl → cg.identifier.dataurl&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Also, run fixes and deletes for species and author affiliations (over 1000 corrections!)&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i Species-Peter-Fix.csv -f dc.Species -t CORRECT -m 212 -d dspace -u dspace -p &#39;fuuu&#39;
$ ./fix-metadata-values.py -i Affiliations-Fix-1045-Peter-Abenet.csv -f dc.contributor.affiliation -t Correct -m 211 -d dspace -u dspace -p &#39;fuuu&#39;
$ ./delete-metadata-values.py -f dc.contributor.affiliation -i Affiliations-Delete-Peter-Abenet.csv -m 211 -u dspace -d dspace -p &#39;fuuu&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I then ran all server updates and rebooted the server&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-11&#34;&gt;2016-07-11&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Doing some author cleanups from Peter and Abenet:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i /tmp/Authors-Fix-205-UTF8.csv -f dc.contributor.author -t correct -m 3 -d dspacetest -u dspacetest -p fuuu
$ ./delete-metadata-values.py -f dc.contributor.author -i /tmp/Authors-Delete-UTF8.csv -m 3 -u dspacetest -d dspacetest -p fuuu
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-07-13&#34;&gt;2016-07-13&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run the author cleanups on CGSpace and start a full Discovery re-index&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-14&#34;&gt;2016-07-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Test LDAP settings for new root LDAP&lt;/li&gt;
&lt;li&gt;Seems to work when binding as a top-level user&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-18&#34;&gt;2016-07-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Adjust identifiers in XMLUI item display to be more prominent&lt;/li&gt;
&lt;li&gt;Add species and breed to the XMLUI item display&lt;/li&gt;
&lt;li&gt;CGSpace crashed late at night and the DSpace logs were showing:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-07-18 20:26:30,941 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL connection Error -
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I suspect it&amp;rsquo;s someone hitting REST too much:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# awk &#39;{print $1}&#39; /var/log/nginx/rest.log | sort -n | uniq -c | sort -h | tail -n 3
710 66.249.78.38
1781 181.118.144.29
24904 70.32.99.142
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I just blocked access to &lt;code&gt;/rest&lt;/code&gt; for that last IP for now:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt; # log rest requests
location /rest {
access_log /var/log/nginx/rest.log;
proxy_pass http://127.0.0.1:8443;
deny 70.32.99.142;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-07-21&#34;&gt;2016-07-21&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Mitigate the &lt;a href=&#34;https://httpoxy.org&#34;&gt;HTTPoxy&lt;/a&gt; vulnerability for Tomcat etc in nginx: &lt;a href=&#34;https://github.com/ilri/rmg-ansible-public/pull/38&#34;&gt;https://github.com/ilri/rmg-ansible-public/pull/38&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Unblock 70.32.99.142 from &lt;code&gt;/rest&lt;/code&gt; as it has been blocked for a few days&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-22&#34;&gt;2016-07-22&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Help Paola from CCAFS with thumbnails for batch uploads&lt;/li&gt;
&lt;li&gt;She has been struggling to get the dimensions right, and manually enlarging smaller thumbnails, renaming PNGs to JPG, etc&lt;/li&gt;
&lt;li&gt;Altmetric reports having an issue with some of our authors being doubled&amp;hellip;&lt;/li&gt;
&lt;li&gt;This is related to authority and confidence!&lt;/li&gt;
&lt;li&gt;We might need to use &lt;code&gt;index.authority.ignore-prefered=true&lt;/code&gt; to tell the Discovery index to prefer the variation that exists in the metadatavalue rather than what it finds in the authority cache.&lt;/li&gt;
&lt;li&gt;Trying these on DSpace Test after a discussion by Daniel Scharon on the dspace-tech mailing list:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;index.authority.ignore-prefered.dc.contributor.author=true
index.authority.ignore-variants.dc.contributor.author=false
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After reindexing I don&amp;rsquo;t see any change in Discovery&amp;rsquo;s display of authors, and still have entries like:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Grace, D. (464)
Grace, D. (62)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I asked for clarification of the following options on the DSpace mailing list:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;index.authority.ignore
index.authority.ignore-prefered
index.authority.ignore-variants
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;In the mean time, I will try these on DSpace Test (plus a reindex):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;index.authority.ignore=true
index.authority.ignore-prefered=true
index.authority.ignore-variants=true
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Enabled usage of &lt;code&gt;X-Forwarded-For&lt;/code&gt; in DSpace admin control panel (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/255&#34;&gt;#255&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;It was misconfigured and disabled, but already working for some reason &lt;em&gt;sigh&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&amp;hellip; no luck. Trying with just:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;index.authority.ignore=true
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After re-indexing and clearing the XMLUI cache nothing has changed&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-25&#34;&gt;2016-07-25&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Trying a few more settings (plus reindex) for Discovery on DSpace Test:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;index.authority.ignore-prefered.dc.contributor.author=true
index.authority.ignore-variants=true
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Run all OS updates and reboot DSpace Test server&lt;/li&gt;
&lt;li&gt;No changes to Discovery after reindexing&amp;hellip; hmm.&lt;/li&gt;
&lt;li&gt;Integrate and massively clean up About page (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/256&#34;&gt;#256&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/07/cgspace-about-page.png&#34; alt=&#34;About page&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The DSpace source code mentions the configuration key &lt;code&gt;discovery.index.authority.ignore-prefered.*&lt;/code&gt; (with prefix of discovery, despite the docs saying otherwise), so I&amp;rsquo;m trying the following on DSpace Test:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;discovery.index.authority.ignore-prefered.dc.contributor.author=true
discovery.index.authority.ignore-variants=true
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Still no change!&lt;/li&gt;
&lt;li&gt;Deploy species, breed, and identifier changes to CGSpace, as well as About page&lt;/li&gt;
&lt;li&gt;Run Linode RAM upgrade (8→12GB)&lt;/li&gt;
&lt;li&gt;Re-sync DSpace Test with CGSpace&lt;/li&gt;
&lt;li&gt;I noticed that our backup scripts don&amp;rsquo;t send Solr cores to S3 so I amended the script&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-07-31&#34;&gt;2016-07-31&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Work on removing Dryland Systems and Humidtropics subjects from Discovery sidebar and Browse by&lt;/li&gt;
&lt;li&gt;Also change &amp;ldquo;Subjects&amp;rdquo; to &amp;ldquo;AGROVOC keywords&amp;rdquo; in Discovery sidebar/search and Browse by (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/257&#34;&gt;#257&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>June, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-06/</link>
<pubDate>Wed, 01 Jun 2016 10:53:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-06/</guid>
<description>
&lt;h2 id=&#34;2016-06-01&#34;&gt;2016-06-01&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Experimenting with IFPRI OAI (we want to harvest their publications)&lt;/li&gt;
&lt;li&gt;After reading the &lt;a href=&#34;https://www.oclc.org/support/services/contentdm/help/server-admin-help/oai-support.en.html&#34;&gt;ContentDM documentation&lt;/a&gt; I found IFPRI&amp;rsquo;s OAI endpoint: &lt;a href=&#34;http://ebrary.ifpri.org/oai/oai.php&#34;&gt;http://ebrary.ifpri.org/oai/oai.php&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;After reading the &lt;a href=&#34;https://www.openarchives.org/OAI/openarchivesprotocol.html&#34;&gt;OAI documentation&lt;/a&gt; and testing with an &lt;a href=&#34;http://validator.oaipmh.com/&#34;&gt;OAI validator&lt;/a&gt; I found out how to get their publications&lt;/li&gt;
&lt;li&gt;This is their publications set: &lt;a href=&#34;http://ebrary.ifpri.org/oai/oai.php?verb=ListRecords&amp;amp;from=2016-01-01&amp;amp;set=p15738coll2&amp;amp;metadataPrefix=oai_dc&#34;&gt;http://ebrary.ifpri.org/oai/oai.php?verb=ListRecords&amp;amp;from=2016-01-01&amp;amp;set=p15738coll2&amp;amp;metadataPrefix=oai_dc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;You can see the others by using the OAI &lt;code&gt;ListSets&lt;/code&gt; verb: &lt;a href=&#34;http://ebrary.ifpri.org/oai/oai.php?verb=ListSets&#34;&gt;http://ebrary.ifpri.org/oai/oai.php?verb=ListSets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Working on second phase of metadata migration, looks like this will work for moving CPWF-specific data in &lt;code&gt;dc.identifier.fund&lt;/code&gt; to &lt;code&gt;cg.identifier.cpwfproject&lt;/code&gt; and then the rest to &lt;code&gt;dc.description.sponsorship&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set metadata_field_id=130 where metadata_field_id=75 and (text_value like &#39;PN%&#39; or text_value like &#39;PHASE%&#39; or text_value = &#39;CBA&#39; or text_value = &#39;IA&#39;);
UPDATE 497
dspacetest=# update metadatavalue set metadata_field_id=29 where metadata_field_id=75;
UPDATE 14
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Fix a few minor miscellaneous issues in &lt;code&gt;dspace.cfg&lt;/code&gt; (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/227&#34;&gt;#227&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-02&#34;&gt;2016-06-02&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Testing the configuration and theme changes for the upcoming metadata migration and I found some issues with &lt;code&gt;cg.coverage.admin-unit&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Seems that the Browse configuration in &lt;code&gt;dspace.cfg&lt;/code&gt; can&amp;rsquo;t handle the &amp;lsquo;-&amp;rsquo; in the field name:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;webui.browse.index.12 = subregion:metadata:cg.coverage.admin-unit:text
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;But actually, I think since DSpace 4 or 5 (we are 5.1) the Browse indexes come from Discovery (defined in discovery.xml) so this is really just a parsing error&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve sent a message to the DSpace mailing list to ask about the Browse index definition&lt;/li&gt;
&lt;li&gt;A user was having problems with submission and from the stacktrace it looks like a Sherpa/Romeo issue&lt;/li&gt;
&lt;li&gt;I found a thread on the mailing list talking about it and there is bug report and a patch: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-2740&#34;&gt;https://jira.duraspace.org/browse/DS-2740&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The patch applies successfully on DSpace 5.1 so I will try it later&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-03&#34;&gt;2016-06-03&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Investigating the CCAFS authority issue, I exported the metadata for the Videos collection&lt;/li&gt;
&lt;li&gt;The top two authors are:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;CGIAR Research Program on Climate Change, Agriculture and Food Security::acd00765-02f1-4b5b-92fa-bfa3877229ce::500
CGIAR Research Program on Climate Change, Agriculture and Food Security::acd00765-02f1-4b5b-92fa-bfa3877229ce::600
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So the only difference is the &amp;ldquo;confidence&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Ok, well THAT is interesting:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select text_value, authority, confidence from metadatavalue where metadata_field_id=3 and text_value like &#39;%Orth, %&#39;;
text_value | authority | confidence
------------+--------------------------------------+------------
Orth, A. | ab606e3a-2b04-4c7d-9423-14beccf54257 | -1
Orth, A. | ab606e3a-2b04-4c7d-9423-14beccf54257 | -1
Orth, A. | ab606e3a-2b04-4c7d-9423-14beccf54257 | -1
Orth, Alan | | -1
Orth, Alan | | -1
Orth, Alan | | -1
Orth, Alan | | -1
Orth, A. | 05c2c622-d252-4efb-b9ed-95a07d3adf11 | -1
Orth, A. | 05c2c622-d252-4efb-b9ed-95a07d3adf11 | -1
Orth, A. | ab606e3a-2b04-4c7d-9423-14beccf54257 | -1
Orth, A. | ab606e3a-2b04-4c7d-9423-14beccf54257 | -1
Orth, Alan | ad281dbf-ef81-4007-96c3-a7f5d2eaa6d9 | 600
Orth, Alan | ad281dbf-ef81-4007-96c3-a7f5d2eaa6d9 | 600
(13 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And now an actually relevent example:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select count(*) from metadatavalue where metadata_field_id=3 and text_value like &#39;CGIAR Research Program on Climate Change, Agriculture and Food Security&#39; and confidence = 500;
count
-------
707
(1 row)
dspacetest=# select count(*) from metadatavalue where metadata_field_id=3 and text_value like &#39;CGIAR Research Program on Climate Change, Agriculture and Food Security&#39; and confidence != 500;
count
-------
253
(1 row)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Trying something experimental:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set confidence=500 where metadata_field_id=3 and text_value like &#39;CGIAR Research Program on Climate Change, Agriculture and Food Security&#39;;
UPDATE 960
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And then re-indexing authority and Discovery&amp;hellip;?&lt;/li&gt;
&lt;li&gt;After Discovery reindex the CCAFS authors are all together in the Authors sidebar facet&lt;/li&gt;
&lt;li&gt;The docs for the ORCiD and Authority stuff for DSpace 5 mention changing the browse indexes to use the Authority as well:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;webui.browse.index.2 = author:metadataAuthority:dc.contributor.author:authority
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;That would only be for the &amp;ldquo;Browse by&amp;rdquo; function&amp;hellip; so we&amp;rsquo;ll have to see what effect that has later&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-04&#34;&gt;2016-06-04&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Re-sync DSpace Test with CGSpace and perform test of metadata migration again&lt;/li&gt;
&lt;li&gt;Run phase two of metadata migrations on CGSpace (see the &lt;a href=&#34;https://gist.github.com/alanorth/1a730bec5ac9457a8fb0e3e72c98d09c&#34;&gt;migration notes&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Run all system updates and reboot CGSpace server&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-07&#34;&gt;2016-06-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Figured out how to export a list of the unique values from a metadata field ordered by count:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# \copy (select text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=29 group by text_value order by count desc) to /tmp/sponsorship.csv with csv;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Identified the next round of fields to migrate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;dc.title.jtitle → dc.source&lt;/li&gt;
&lt;li&gt;dc.crsubject.crpsubject → cg.contributor.crp&lt;/li&gt;
&lt;li&gt;dc.contributor.affiliation → cg.contributor.affiliation&lt;/li&gt;
&lt;li&gt;dc.Species → cg.species&lt;/li&gt;
&lt;li&gt;dc.contributor.corporate → dc.contributor&lt;/li&gt;
&lt;li&gt;dc.identifier.url → cg.identifier.url&lt;/li&gt;
&lt;li&gt;dc.identifier.doi → cg.identifier.doi&lt;/li&gt;
&lt;li&gt;dc.identifier.googleurl → cg.identifier.googleurl&lt;/li&gt;
&lt;li&gt;dc.identifier.dataurl → cg.identifier.dataurl&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Discuss pulling data from IFPRI&amp;rsquo;s ContentDM with Ryan Miller&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Looks like OAI is kinda obtuse for this, and if we use ContentDM&amp;rsquo;s API we&amp;rsquo;ll be able to access their internal field names (rather than trying to figure out how they stuffed them into various, repeated Dublin Core fields)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-08&#34;&gt;2016-06-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Discuss controlled vocabularies for ~28 fields&lt;/li&gt;
&lt;li&gt;Looks like this is all we need: &lt;a href=&#34;https://wiki.duraspace.org/display/DSDOC5x/Submission+User+Interface#SubmissionUserInterface-ConfiguringControlledVocabularies&#34;&gt;https://wiki.duraspace.org/display/DSDOC5x/Submission+User+Interface#SubmissionUserInterface-ConfiguringControlledVocabularies&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I wrote an XPath expression to extract the ILRI subjects from &lt;code&gt;input-forms.xml&lt;/code&gt; (uses xmlstartlet):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ xml sel -t -m &#39;//value-pairs[@value-pairs-name=&amp;quot;ilrisubject&amp;quot;]/pair/displayed-value/text()&#39; -c &#39;.&#39; -n dspace/config/input-forms.xml
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Write to Atmire about the use of &lt;code&gt;atmire.orcid.id&lt;/code&gt; to see if we can change it&lt;/li&gt;
&lt;li&gt;Seems to be a virtual field that is queried from the authority cache&amp;hellip; hmm&lt;/li&gt;
&lt;li&gt;In other news, I found out that the About page that we haven&amp;rsquo;t been using lives in &lt;code&gt;dspace/config/about.xml&lt;/code&gt;, so now we can update the text&lt;/li&gt;
&lt;li&gt;File bug about &lt;code&gt;closed=&amp;quot;true&amp;quot;&lt;/code&gt; attribute of controlled vocabularies not working: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-3238&#34;&gt;https://jira.duraspace.org/browse/DS-3238&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-09&#34;&gt;2016-06-09&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Atmire explained that the &lt;code&gt;atmire.orcid.id&lt;/code&gt; field doesn&amp;rsquo;t exist in the schema, as it actually comes from the authority cache during XMLUI run time&lt;/li&gt;
&lt;li&gt;This means we don&amp;rsquo;t see it when harvesting via OAI or REST, for example&lt;/li&gt;
&lt;li&gt;They opened a feature ticket on the DSpace tracker to ask for support of this: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-3239&#34;&gt;https://jira.duraspace.org/browse/DS-3239&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-10&#34;&gt;2016-06-10&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Investigating authority confidences&lt;/li&gt;
&lt;li&gt;It looks like the values are documented in &lt;code&gt;Choices.java&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Experiment with setting all 960 CCAFS author values to be 500:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# SELECT authority, confidence FROM metadatavalue WHERE resource_type_id=2 AND metadata_field_id=3 AND text_value = &#39;CGIAR Research Program on Climate Change, Agriculture and Food Security&#39;;
dspacetest=# UPDATE metadatavalue set confidence = 500 where resource_type_id=2 AND metadata_field_id=3 AND text_value = &#39;CGIAR Research Program on Climate Change, Agriculture and Food Security&#39;;
UPDATE 960
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After the database edit, I did a full Discovery re-index&lt;/li&gt;
&lt;li&gt;And now there are exactly 960 items in the authors facet for &amp;lsquo;CGIAR Research Program on Climate Change, Agriculture and Food Security&amp;rsquo;&lt;/li&gt;
&lt;li&gt;Now I ran the same on CGSpace&lt;/li&gt;
&lt;li&gt;Merge controlled vocabulary functionality for animal breeds to &lt;code&gt;5_x-prod&lt;/code&gt; (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/236&#34;&gt;#236&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Write python script to update metadata values in batch via PostgreSQL: &lt;a href=&#34;https://gist.github.com/alanorth/df92cbfb54d762ba21b28f7cd83b6897&#34;&gt;fix-metadata-values.py&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We need to use this to correct some pretty ugly values in fields like &lt;code&gt;dc.description.sponsorship&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Merge item display tweaks from earlier this week (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/231&#34;&gt;#231&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Merge controlled vocabulary functionality for subregions (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/238&#34;&gt;#238&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-11&#34;&gt;2016-06-11&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Merge controlled vocabulary for sponsorship field (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/239&#34;&gt;#239&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Fix character encoding issues for animal breed lookup that I merged yesterday&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-17&#34;&gt;2016-06-17&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Linode has free RAM upgrades for their 13th birthday so I migrated DSpace Test (4→8GB of RAM)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-18&#34;&gt;2016-06-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Clean up titles and hints in &lt;code&gt;input-forms.xml&lt;/code&gt; to use title/sentence case and a few more consistency things (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/241&#34;&gt;#241&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The final list of fields to migrate in the third phase of metadata migrations is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;dc.title.jtitle → dc.source&lt;/li&gt;
&lt;li&gt;dc.crsubject.crpsubject → cg.contributor.crp&lt;/li&gt;
&lt;li&gt;dc.contributor.affiliation → cg.contributor.affiliation&lt;/li&gt;
&lt;li&gt;dc.srplace.subregion → cg.coverage.subregion&lt;/li&gt;
&lt;li&gt;dc.Species → cg.species&lt;/li&gt;
&lt;li&gt;dc.contributor.corporate → dc.contributor&lt;/li&gt;
&lt;li&gt;dc.identifier.url → cg.identifier.url&lt;/li&gt;
&lt;li&gt;dc.identifier.doi → cg.identifier.doi&lt;/li&gt;
&lt;li&gt;dc.identifier.googleurl → cg.identifier.googleurl&lt;/li&gt;
&lt;li&gt;dc.identifier.dataurl → cg.identifier.dataurl&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Interesting &amp;ldquo;Sunburst&amp;rdquo; visualization on a Digital Commons page: &lt;a href=&#34;http://www.repository.law.indiana.edu/sunburst.html&#34;&gt;http://www.repository.law.indiana.edu/sunburst.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Final testing on metadata fix/delete for &lt;code&gt;dc.description.sponsorship&lt;/code&gt; cleanup&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Need to run &lt;code&gt;fix-metadata-values.py&lt;/code&gt; and then &lt;code&gt;fix-metadata-values.py&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-20&#34;&gt;2016-06-20&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace&amp;rsquo;s HTTPS certificate expired last night and I didn&amp;rsquo;t notice, had to renew:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# /opt/letsencrypt/letsencrypt-auto renew --standalone --pre-hook &amp;quot;/usr/bin/service nginx stop&amp;quot; --post-hook &amp;quot;/usr/bin/service nginx start&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I really need to fix that cron job&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-24&#34;&gt;2016-06-24&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run the replacements/deletes for &lt;code&gt;dc.description.sponsorship&lt;/code&gt; (investors) on CGSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i investors-not-blank-not-delete-85.csv -f dc.description.sponsorship -t &#39;correct investor&#39; -m 29 -d cgspace -p &#39;fuuu&#39; -u cgspace
$ ./delete-metadata-values.py -i investors-delete-82.csv -f dc.description.sponsorship -m 29 -d cgspace -p &#39;fuuu&#39; -u cgspace
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The scripts for this are here:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gist.github.com/alanorth/df92cbfb54d762ba21b28f7cd83b6897&#34;&gt;fix-metadata-values.py&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://gist.github.com/alanorth/bd7d58c947f686401a2b1fadc78736be&#34;&gt;delete-metadata-values.py&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Add new sponsors to controlled vocabulary (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/244&#34;&gt;#244&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Refine submission form labels and hints&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-28&#34;&gt;2016-06-28&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Testing the cleanup of &lt;code&gt;dc.contributor.corporate&lt;/code&gt; with 13 deletions and 121 replacements&lt;/li&gt;
&lt;li&gt;There are still ~97 fields that weren&amp;rsquo;t indicated to do anything&lt;/li&gt;
&lt;li&gt;After the above deletions and replacements I regenerated a CSV and sent it to Peter &lt;em&gt;et al&lt;/em&gt; to have a look&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# \copy (select text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=126 group by text_value order by count desc) to /tmp/contributors-june28.csv with csv;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Re-evaluate &lt;code&gt;dc.contributor.corporate&lt;/code&gt; and it seems we will move it to &lt;code&gt;dc.contributor.author&lt;/code&gt; as this is more in line with how editors are actually using it&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-29&#34;&gt;2016-06-29&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Test run of &lt;code&gt;migrate-fields.sh&lt;/code&gt; with the following re-mappings:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;72 55 #dc.source
86 230 #cg.contributor.crp
91 211 #cg.contributor.affiliation
94 212 #cg.species
107 231 #cg.coverage.subregion
126 3 #dc.contributor.author
73 219 #cg.identifier.url
74 220 #cg.identifier.doi
79 222 #cg.identifier.googleurl
89 223 #cg.identifier.dataurl
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Run all cleanups and deletions of &lt;code&gt;dc.contributor.corporate&lt;/code&gt; on CGSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i Corporate-Authors-Fix-121.csv -f dc.contributor.corporate -t &#39;Correct style&#39; -m 126 -d cgspace -u cgspace -p &#39;fuuu&#39;
$ ./fix-metadata-values.py -i Corporate-Authors-Fix-PB.csv -f dc.contributor.corporate -t &#39;should be&#39; -m 126 -d cgspace -u cgspace -p &#39;fuuu&#39;
$ ./delete-metadata-values.py -f dc.contributor.corporate -i Corporate-Authors-Delete-13.csv -m 126 -u cgspace -d cgspace -p &#39;fuuu&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Re-deploy CGSpace and DSpace Test with latest June changes&lt;/li&gt;
&lt;li&gt;Now the sharing and Altmetric bits are more prominent:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/06/xmlui-altmetric-sharing.png&#34; alt=&#34;DSpace 5.1 XMLUI With Altmetric Badge&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run all system updates on the servers and reboot&lt;/li&gt;
&lt;li&gt;Start working on config changes for phase three of the metadata migrations&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-06-30&#34;&gt;2016-06-30&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Wow, there are 95 authors in the database who have &amp;lsquo;,&amp;rsquo; at the end of their name:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# select text_value from metadatavalue where metadata_field_id=3 and text_value like &#39;%,&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;We need to use something like this to fix them, need to write a proper regex later:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# update metadatavalue set text_value = regexp_replace(text_value, &#39;(Poole, J),&#39;, &#39;\1&#39;) where metadata_field_id=3 and text_value = &#39;Poole, J,&#39;;
&lt;/code&gt;&lt;/pre&gt;
</description>
</item>
<item>
<title>May, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-05/</link>
<pubDate>Sun, 01 May 2016 23:06:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-05/</guid>
<description>
&lt;h2 id=&#34;2016-05-01&#34;&gt;2016-05-01&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Since yesterday there have been 10,000 REST errors and the site has been unstable again&lt;/li&gt;
&lt;li&gt;I have blocked access to the API now&lt;/li&gt;
&lt;li&gt;There are 3,000 IPs accessing the REST API in a 24-hour period!&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# awk &#39;{print $1}&#39; /var/log/nginx/rest.log | uniq | wc -l
3168
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The two most often requesters are in Ethiopia and Colombia: 213.55.99.121 and 181.118.144.29&lt;/li&gt;
&lt;li&gt;100% of the requests coming from Ethiopia are like this and result in an HTTP 500:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;GET /rest/handle/10568/NaN?expand=parentCommunityList,metadata HTTP/1.1
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;For now I&amp;rsquo;ll block just the Ethiopian IP&lt;/li&gt;
&lt;li&gt;The owner of that application has said that the &lt;code&gt;NaN&lt;/code&gt; (not a number) is an error in his code and he&amp;rsquo;ll fix it&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-05-03&#34;&gt;2016-05-03&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Update nginx to 1.10.x branch on CGSpace&lt;/li&gt;
&lt;li&gt;Fix a reference to &lt;code&gt;dc.type.output&lt;/code&gt; in Discovery that I had missed when we migrated to &lt;code&gt;dc.type&lt;/code&gt; last month (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/223&#34;&gt;#223&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/05/discovery-types.png&#34; alt=&#34;Item type in Discovery results&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;2016-05-06&#34;&gt;2016-05-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;DSpace Test is down, &lt;code&gt;catalina.out&lt;/code&gt; has lots of messages about heap space from some time yesterday (!)&lt;/li&gt;
&lt;li&gt;It looks like Sisay was doing some batch imports&lt;/li&gt;
&lt;li&gt;Hmm, also disk space is full&lt;/li&gt;
&lt;li&gt;I decided to blow away the solr indexes, since they are 50GB and we don&amp;rsquo;t really need all the Atmire stuff there right now&lt;/li&gt;
&lt;li&gt;I will re-generate the Discovery indexes after re-deploying&lt;/li&gt;
&lt;li&gt;Testing &lt;code&gt;renew-letsencrypt.sh&lt;/code&gt; script for nginx&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;#!/usr/bin/env bash
readonly SERVICE_BIN=/usr/sbin/service
readonly LETSENCRYPT_BIN=/opt/letsencrypt/letsencrypt-auto
# stop nginx so LE can listen on port 443
$SERVICE_BIN nginx stop
$LETSENCRYPT_BIN renew -nvv --standalone --standalone-supported-challenges tls-sni-01 &amp;gt; /var/log/letsencrypt/renew.log 2&amp;gt;&amp;amp;1
LE_RESULT=$?
$SERVICE_BIN nginx start
if [[ &amp;quot;$LE_RESULT&amp;quot; != 0 ]]; then
echo &#39;Automated renewal failed:&#39;
cat /var/log/letsencrypt/renew.log
exit 1
fi
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Seems to work well&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-05-10&#34;&gt;2016-05-10&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Start looking at more metadata migrations&lt;/li&gt;
&lt;li&gt;There are lots of fields in &lt;code&gt;dcterms&lt;/code&gt; namespace that look interesting, like:
&lt;ul&gt;
&lt;li&gt;dcterms.type&lt;/li&gt;
&lt;li&gt;dcterms.spatial&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Not sure what &lt;code&gt;dcterms&lt;/code&gt; is&amp;hellip;&lt;/li&gt;
&lt;li&gt;Looks like these were &lt;a href=&#34;https://wiki.duraspace.org/display/DSDOC5x/Metadata+and+Bitstream+Format+Registries#MetadataandBitstreamFormatRegistries-DublinCoreTermsRegistry(DCTERMS)&#34;&gt;added in DSpace 4&lt;/a&gt; to allow for future work to make DSpace more flexible&lt;/li&gt;
&lt;li&gt;CGSpace&amp;rsquo;s &lt;code&gt;dc&lt;/code&gt; registry has 96 items, and the default DSpace one has 73.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-05-11&#34;&gt;2016-05-11&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Identify and propose the next phase of CGSpace fields to migrate:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;dc.title.jtitle → cg.title.journal&lt;/li&gt;
&lt;li&gt;dc.identifier.status → cg.identifier.status&lt;/li&gt;
&lt;li&gt;dc.river.basin → cg.river.basin&lt;/li&gt;
&lt;li&gt;dc.Species → cg.species&lt;/li&gt;
&lt;li&gt;dc.targetaudience → cg.targetaudience&lt;/li&gt;
&lt;li&gt;dc.fulltextstatus → cg.fulltextstatus&lt;/li&gt;
&lt;li&gt;dc.editon → cg.edition&lt;/li&gt;
&lt;li&gt;dc.isijournal → cg.isijournal&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Start a test rebase of the &lt;code&gt;5_x-prod&lt;/code&gt; branch on top of the &lt;code&gt;dspace-5.5&lt;/code&gt; tag&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;There were a handful of conflicts that I didn&amp;rsquo;t understand&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After completing the rebase I tried to build with the module versions Atmire had indicated as being 5.5 ready but I got this error:&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;[ERROR] Failed to execute goal on project additions: Could not resolve dependencies for project org.dspace.modules:additions:jar:5.5: Could not find artifact com.atmire:atmire-metadata-quality-api:jar:5.5-2.10.1-0 in sonatype-releases (https://oss.sonatype.org/content/repositories/releases/) -&amp;gt; [Help 1]
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I&amp;rsquo;ve sent them a question about it&lt;/li&gt;
&lt;li&gt;A user mentioned having problems with uploading a 33 MB PDF&lt;/li&gt;
&lt;li&gt;I told her I would increase the limit temporarily tomorrow morning&lt;/li&gt;
&lt;li&gt;Turns out she was able to decrease the size of the PDF so we didn&amp;rsquo;t have to do anything&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-05-12&#34;&gt;2016-05-12&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looks like the issue that Abenet was having a few days ago with &amp;ldquo;Connection Reset&amp;rdquo; in Firefox might be due to a Firefox 46 issue: &lt;a href=&#34;https://bugzilla.mozilla.org/show_bug.cgi?id=1268775&#34;&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=1268775&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I finally found a copy of the latest CG Core metadata guidelines and it looks like we can add a few more fields to our next migration:
&lt;ul&gt;
&lt;li&gt;dc.rplace.region → cg.coverage.region&lt;/li&gt;
&lt;li&gt;dc.cplace.country → cg.coverage.country&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Questions for CG people:
&lt;ul&gt;
&lt;li&gt;Our &lt;code&gt;dc.place&lt;/code&gt; and &lt;code&gt;dc.srplace.subregion&lt;/code&gt; could both map to &lt;code&gt;cg.coverage.admin-unit&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;Should we use &lt;code&gt;dc.contributor.crp&lt;/code&gt; or &lt;code&gt;cg.contributor.crp&lt;/code&gt; for the CRP (ours is &lt;code&gt;dc.crsubject.crpsubject&lt;/code&gt;)?&lt;/li&gt;
&lt;li&gt;Our &lt;code&gt;dc.contributor.affiliation&lt;/code&gt; and &lt;code&gt;dc.contributor.corporate&lt;/code&gt; could both map to &lt;code&gt;dc.contributor&lt;/code&gt; and possibly &lt;code&gt;dc.contributor.center&lt;/code&gt; depending on if it&amp;rsquo;s a CG center or not&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dc.title.jtitle&lt;/code&gt; could either map to &lt;code&gt;dc.publisher&lt;/code&gt; or &lt;code&gt;dc.source&lt;/code&gt; depending on how you read things&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Found ~200 messed up CIAT values in &lt;code&gt;dc.publisher&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# select text_value from metadatavalue where resource_type_id=2 and metadata_field_id=39 and text_value similar to &amp;quot;% %&amp;quot;;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-05-13&#34;&gt;2016-05-13&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;More theorizing about CGcore&lt;/li&gt;
&lt;li&gt;Add two new fields:
&lt;ul&gt;
&lt;li&gt;dc.srplace.subregion → cg.coverage.admin-unit&lt;/li&gt;
&lt;li&gt;dc.place → cg.place&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dc.place&lt;/code&gt; is our own field, so it&amp;rsquo;s easy to move&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve removed &lt;code&gt;dc.title.jtitle&lt;/code&gt; from the list for now because there&amp;rsquo;s no use moving it out of DC until we know where it will go (see discussion yesterday)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-05-18&#34;&gt;2016-05-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Work on 707 CCAFS records&lt;/li&gt;
&lt;li&gt;They have thumbnails on Flickr and elsewhere&lt;/li&gt;
&lt;li&gt;In OpenRefine I created a new &lt;code&gt;filename&lt;/code&gt; column based on the &lt;code&gt;thumbnail&lt;/code&gt; column with the following GREL:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;if(cells[&#39;thumbnails&#39;].value.contains(&#39;hqdefault&#39;), cells[&#39;thumbnails&#39;].value.split(&#39;/&#39;)[-2] + &#39;.jpg&#39;, cells[&#39;thumbnails&#39;].value.split(&#39;/&#39;)[-1])
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Because ~400 records had the same filename on Flickr (hqdefault.jpg) but different UUIDs in the URL&lt;/li&gt;
&lt;li&gt;So for the &lt;code&gt;hqdefault.jpg&lt;/code&gt; ones I just take the UUID (-2) and use it as the filename&lt;/li&gt;
&lt;li&gt;Before importing with SAFBuilder I tested adding &amp;ldquo;__bundle:THUMBNAIL&amp;rdquo; to the &lt;code&gt;filename&lt;/code&gt; column and it works fine&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-05-19&#34;&gt;2016-05-19&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;More quality control on &lt;code&gt;filename&lt;/code&gt; field of CCAFS records to make processing in shell and SAFBuilder more reliable:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value.replace(&#39;_&#39;,&#39;&#39;).replace(&#39;-&#39;,&#39;&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;We need to hold off on moving &lt;code&gt;dc.Species&lt;/code&gt; to &lt;code&gt;cg.species&lt;/code&gt; because it is only used for plants, and might be better to move it to something like &lt;code&gt;cg.species.plant&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;And &lt;code&gt;dc.identifier.fund&lt;/code&gt; is MOSTLY used for CPWF project identifier but has some other sponsorship things
&lt;ul&gt;
&lt;li&gt;We should move PN&lt;em&gt;, SG&lt;/em&gt;, CBA, IA, and PHASE* values to &lt;code&gt;cg.identifier.cpwfproject&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The rest, like BMGF and USAID etc, might have to go to either &lt;code&gt;dc.description.sponsorship&lt;/code&gt; or &lt;code&gt;cg.identifier.fund&lt;/code&gt; (not sure yet)&lt;/li&gt;
&lt;li&gt;There are also some mistakes in CPWF&amp;rsquo;s things, like &amp;ldquo;PN 47&amp;rdquo;&lt;/li&gt;
&lt;li&gt;This ought to catch all the CPWF values (there don&amp;rsquo;t appear to be and SG* values):&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# select text_value from metadatavalue where resource_type_id=2 and metadata_field_id=75 and (text_value like &#39;PN%&#39; or text_value like &#39;PHASE%&#39; or text_value = &#39;CBA&#39; or text_value = &#39;IA&#39;);
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-05-20&#34;&gt;2016-05-20&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;More work on CCAFS Video and Images records&lt;/li&gt;
&lt;li&gt;For SAFBuilder we need to modify filename column to have the thumbnail bundle:
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value + &amp;quot;__bundle:THUMBNAIL&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Also, I fixed some weird characters using OpenRefine&amp;rsquo;s transform with the following GREL:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value.replace(/\u0081/,&#39;&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Write shell script to resize thumbnails with height larger than 400: &lt;a href=&#34;https://gist.github.com/alanorth/131401dcd39d00e0ce12e1be3ed13256&#34;&gt;https://gist.github.com/alanorth/131401dcd39d00e0ce12e1be3ed13256&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Upload 707 CCAFS records to DSpace Test&lt;/li&gt;
&lt;li&gt;A few miscellaneous fixes for XMLUI display niggles (spaces in item lists and link target &lt;code&gt;_black&lt;/code&gt;): &lt;a href=&#34;https://github.com/ilri/DSpace/pull/224&#34;&gt;#224&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Work on configuration changes for Phase 2 metadata migrations&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-05-23&#34;&gt;2016-05-23&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Try to import the CCAFS Images and Videos to CGSpace but had some issues with LibreOffice and OpenRefine&lt;/li&gt;
&lt;li&gt;LibreOffice excludes empty cells when it exports and all the fields shift over to the left and cause URLs to go to Subjects, etc.&lt;/li&gt;
&lt;li&gt;Google Docs does this better, but somehow reorders the rows and when I paste the thumbnail/filename row in they don&amp;rsquo;t match!&lt;/li&gt;
&lt;li&gt;I will have to try later&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-05-30&#34;&gt;2016-05-30&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Export CCAFS video and image records from DSpace Test using the migrate option (&lt;code&gt;-m&lt;/code&gt;):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ mkdir ~/ccafs-images
$ /home/dspacetest.cgiar.org/bin/dspace export -t COLLECTION -i 10568/79355 -d ~/ccafs-images -n 0 -m
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And then import to CGSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ JAVA_OPTS=&amp;quot;-Xmx512m -Dfile.encoding=UTF-8&amp;quot; /home/cgspace.cgiar.org/bin/dspace import --add --eperson=aorth@mjanja.ch --collection=10568/70974 --source /tmp/ccafs-images --mapfile=/tmp/ccafs-images-may30.map &amp;amp;&amp;gt; /tmp/ccafs-images-may30.log
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;But now we have double authors for &amp;ldquo;CGIAR Research Program on Climate Change, Agriculture and Food Security&amp;rdquo; in the authority&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;m trying to do a Discovery index before messing with the authority index&lt;/li&gt;
&lt;li&gt;Looks like we are missing the &lt;code&gt;index-authority&lt;/code&gt; cron job, so who knows what&amp;rsquo;s up with our authority index&lt;/li&gt;
&lt;li&gt;Run system updates on DSpace Test, re-deploy code, and reboot the server&lt;/li&gt;
&lt;li&gt;Clean up and import ~200 CTA records to CGSpace via CSV like:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ export JAVA_OPTS=&amp;quot;-Xmx512m -Dfile.encoding=UTF-8&amp;quot;
$ /home/cgspace.cgiar.org/bin/dspace metadata-import -e aorth@mjanja.ch -f ~/CTA-May30/CTA-42229.csv &amp;amp;&amp;gt; ~/CTA-May30/CTA-42229.log
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Discovery indexing took a few hours for some reason, and after that I started the &lt;code&gt;index-authority&lt;/code&gt; script&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ JAVA_OPTS=&amp;quot;-Xmx1024m -Dfile.encoding=UTF-8&amp;quot; /home/cgspace.cgiar.org/bin/dspace index-authority
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-05-31&#34;&gt;2016-05-31&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;index-authority&lt;/code&gt; script ran over night and was finished in the morning&lt;/li&gt;
&lt;li&gt;Hopefully this was because we haven&amp;rsquo;t been running it regularly and it will speed up next time&lt;/li&gt;
&lt;li&gt;I am running it again with a timer to see:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ time /home/cgspace.cgiar.org/bin/dspace index-authority
Retrieving all data
Initialize org.dspace.authority.indexer.DSpaceAuthorityIndexer
Cleaning the old index
Writing new data
All done !
real 37m26.538s
user 2m24.627s
sys 0m20.540s
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Update &lt;code&gt;tomcat7&lt;/code&gt; crontab on CGSpace and DSpace Test to have the &lt;code&gt;index-authority&lt;/code&gt; script that we were missing&lt;/li&gt;
&lt;li&gt;Add new ILRI subject and CCAFS project tags to &lt;code&gt;input-forms.xml&lt;/code&gt; (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/226&#34;&gt;#226&lt;/a&gt;, &lt;a href=&#34;https://github.com/ilri/DSpace/pull/225&#34;&gt;#225&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Manually mapped the authors of a few old CCAFS records to the new CCAFS authority UUID and re-indexed authority indexes to see if it helps correct those items.&lt;/li&gt;
&lt;li&gt;Re-sync DSpace Test data with CGSpace&lt;/li&gt;
&lt;li&gt;Clean up and import ~65 more CTA items into CGSpace&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>April, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-04/</link>
<pubDate>Mon, 04 Apr 2016 11:06:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-04/</guid>
<description>
&lt;h2 id=&#34;2016-04-04&#34;&gt;2016-04-04&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looking at log file use on CGSpace and notice that we need to work on our cron setup a bit&lt;/li&gt;
&lt;li&gt;We are backing up all logs in the log folder, including useless stuff like solr, cocoon, handle-plugin, etc&lt;/li&gt;
&lt;li&gt;After running DSpace for over five years I&amp;rsquo;ve never needed to look in any other log file than dspace.log, leave alone one from last year!&lt;/li&gt;
&lt;li&gt;This will save us a few gigs of backup space we&amp;rsquo;re paying for on S3&lt;/li&gt;
&lt;li&gt;Also, I noticed the &lt;code&gt;checker&lt;/code&gt; log has some errors we should pay attention to:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Run start time: 03/06/2016 04:00:22
Error retrieving bitstream ID 71274 from asset store.
java.io.FileNotFoundException: /home/cgspace.cgiar.org/assetstore/64/29/06/64290601546459645925328536011917633626 (Too many open files)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.&amp;lt;init&amp;gt;(FileInputStream.java:146)
at edu.sdsc.grid.io.local.LocalFileInputStream.open(LocalFileInputStream.java:171)
at edu.sdsc.grid.io.GeneralFileInputStream.&amp;lt;init&amp;gt;(GeneralFileInputStream.java:145)
at edu.sdsc.grid.io.local.LocalFileInputStream.&amp;lt;init&amp;gt;(LocalFileInputStream.java:139)
at edu.sdsc.grid.io.FileFactory.newFileInputStream(FileFactory.java:630)
at org.dspace.storage.bitstore.BitstreamStorageManager.retrieve(BitstreamStorageManager.java:525)
at org.dspace.checker.BitstreamDAO.getBitstream(BitstreamDAO.java:60)
at org.dspace.checker.CheckerCommand.processBitstream(CheckerCommand.java:303)
at org.dspace.checker.CheckerCommand.checkBitstream(CheckerCommand.java:171)
at org.dspace.checker.CheckerCommand.process(CheckerCommand.java:120)
at org.dspace.app.checker.ChecksumChecker.main(ChecksumChecker.java:236)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77)
******************************************************
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So this would be the &lt;code&gt;tomcat7&lt;/code&gt; Unix user, who seems to have a default limit of 1024 files in its shell&lt;/li&gt;
&lt;li&gt;For what it&amp;rsquo;s worth, we have been setting the actual Tomcat 7 process&amp;rsquo; limit to 16384 for a few years (in &lt;code&gt;/etc/default/tomcat7&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Looks like cron will read limits from &lt;code&gt;/etc/security/limits.*&lt;/code&gt; so we can do something for the tomcat7 user there&lt;/li&gt;
&lt;li&gt;Submit pull request for Tomcat 7 limits in Ansible dspace role (&lt;a href=&#34;https://github.com/ilri/rmg-ansible-public/pull/30&#34;&gt;#30&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-05&#34;&gt;2016-04-05&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Reduce Amazon S3 storage used for logs from 46 GB to 6GB by deleting a bunch of logs we don&amp;rsquo;t need!&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# s3cmd ls s3://cgspace.cgiar.org/log/ &amp;gt; /tmp/s3-logs.txt
# grep checker.log /tmp/s3-logs.txt | awk &#39;{print $4}&#39; | xargs s3cmd del
# grep cocoon.log /tmp/s3-logs.txt | awk &#39;{print $4}&#39; | xargs s3cmd del
# grep handle-plugin.log /tmp/s3-logs.txt | awk &#39;{print $4}&#39; | xargs s3cmd del
# grep solr.log /tmp/s3-logs.txt | awk &#39;{print $4}&#39; | xargs s3cmd del
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Also, adjust the cron jobs for backups so they only backup &lt;code&gt;dspace.log&lt;/code&gt; and some stats files (.dat)&lt;/li&gt;
&lt;li&gt;Try to do some metadata field migrations using the Atmire batch UI (&lt;code&gt;dc.Species&lt;/code&gt; → &lt;code&gt;cg.species&lt;/code&gt;) but it took several hours and even missed a few records&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-06&#34;&gt;2016-04-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A better way to move metadata on this scale is via SQL, for example &lt;code&gt;dc.type.output&lt;/code&gt; → &lt;code&gt;dc.type&lt;/code&gt; (their IDs in the metadatafieldregistry are 66 and 109, respectively):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set metadata_field_id=109 where metadata_field_id=66;
UPDATE 40852
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After that an &lt;code&gt;index-discovery -bf&lt;/code&gt; is required&lt;/li&gt;
&lt;li&gt;Start working on metadata migrations, add 25 or so new metadata fields to CGSpace&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-07&#34;&gt;2016-04-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Write shell script to do the migration of fields: &lt;a href=&#34;https://gist.github.com/alanorth/72a70aca856d76f24c127a6e67b3342b&#34;&gt;https://gist.github.com/alanorth/72a70aca856d76f24c127a6e67b3342b&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Testing with a few fields it seems to work well:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./migrate-fields.sh
UPDATE metadatavalue SET metadata_field_id=109 WHERE metadata_field_id=66
UPDATE 40883
UPDATE metadatavalue SET metadata_field_id=202 WHERE metadata_field_id=72
UPDATE 21420
UPDATE metadatavalue SET metadata_field_id=203 WHERE metadata_field_id=76
UPDATE 51258
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-04-08&#34;&gt;2016-04-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Discuss metadata renaming with Abenet, we decided it&amp;rsquo;s better to start with the center-specific subjects like ILRI, CIFOR, CCAFS, IWMI, and CPWF&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve e-mailed CCAFS and CPWF people to ask them how much time it will take for them to update their systems to cope with this change&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-10&#34;&gt;2016-04-10&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looking at the DOI issue &lt;a href=&#34;https://www.yammer.com/dspacedevelopers/#/Threads/show?threadId=678507860&#34;&gt;reported by Leroy from CIAT a few weeks ago&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;It seems the &lt;code&gt;dx.doi.org&lt;/code&gt; URLs are much more proper in our repository!&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select count(*) from metadatavalue where metadata_field_id=74 and text_value like &#39;http://dx.doi.org%&#39;;
count
-------
5638
(1 row)
dspacetest=# select count(*) from metadatavalue where metadata_field_id=74 and text_value like &#39;http://doi.org%&#39;;
count
-------
3
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I will manually edit the &lt;code&gt;dc.identifier.doi&lt;/code&gt; in &lt;a href=&#34;https://cgspace.cgiar.org/handle/10568/72509?show=full&#34;&gt;&lt;sup&gt;10568&lt;/sup&gt;&amp;frasl;&lt;sub&gt;72509&lt;/sub&gt;&lt;/a&gt; and tweet the link, then check back in a week to see if the donut gets updated&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-11&#34;&gt;2016-04-11&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The donut is already updated and shows the correct number now&lt;/li&gt;
&lt;li&gt;CCAFS people say it will only take them an hour to update their code for the metadata renames, so I proposed we&amp;rsquo;d do it tentatively on Monday the 18th.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-12&#34;&gt;2016-04-12&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looking at quality of WLE data (&lt;code&gt;cg.subject.iwmi&lt;/code&gt;) in SQL:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select text_value, count(*) from metadatavalue where metadata_field_id=217 group by text_value order by count(*) desc;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Listings and Reports is still not returning reliable data for &lt;code&gt;dc.type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I think we need to ask Atmire, as their documentation isn&amp;rsquo;t too clear on the format of the filter configs&lt;/li&gt;
&lt;li&gt;Alternatively, I want to see if I move all the data from &lt;code&gt;dc.type.output&lt;/code&gt; to &lt;code&gt;dc.type&lt;/code&gt; and then re-index, if it behaves better&lt;/li&gt;
&lt;li&gt;Looking at our &lt;code&gt;input-forms.xml&lt;/code&gt; I see we have two sets of ILRI subjects, but one has a few extra subjects&lt;/li&gt;
&lt;li&gt;Remove one set of ILRI subjects and remove duplicate &lt;code&gt;VALUE CHAINS&lt;/code&gt; from existing list (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/216&#34;&gt;#216&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;I decided to keep the set of subjects that had &lt;code&gt;FMD&lt;/code&gt; and &lt;code&gt;RANGELANDS&lt;/code&gt; added, as it appears to have been requested to have been added, and might be the newer list&lt;/li&gt;
&lt;li&gt;I found 226 blank metadatavalues:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest# select * from metadatavalue where resource_type_id=2 and text_value=&#39;&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I think we should delete them and do a full re-index:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# delete from metadatavalue where resource_type_id=2 and text_value=&#39;&#39;;
DELETE 226
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I deleted them on CGSpace but I&amp;rsquo;ll wait to do the re-index as we&amp;rsquo;re going to be doing one in a few days for the metadata changes anyways&lt;/li&gt;
&lt;li&gt;In other news, moving the &lt;code&gt;dc.type.output&lt;/code&gt; to &lt;code&gt;dc.type&lt;/code&gt; and re-indexing seems to have fixed the Listings and Reports issue from above&lt;/li&gt;
&lt;li&gt;Unfortunately this isn&amp;rsquo;t a very good solution, because Listings and Reports config should allow us to filter on &lt;code&gt;dc.type.*&lt;/code&gt; but the documentation isn&amp;rsquo;t very clear and I couldn&amp;rsquo;t reach Atmire today&lt;/li&gt;
&lt;li&gt;We want to do the &lt;code&gt;dc.type.output&lt;/code&gt; move on CGSpace anyways, but we should wait as it might affect other external people!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-14&#34;&gt;2016-04-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Communicate with Macaroni Bros again about &lt;code&gt;dc.type&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Help Sisay with some rsync and Linux stuff&lt;/li&gt;
&lt;li&gt;Notify CIAT people of metadata changes (I had forgotten them last week)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-15&#34;&gt;2016-04-15&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;DSpace Test had crashed, so I ran all system updates, rebooted, and re-deployed DSpace code&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-18&#34;&gt;2016-04-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Talk to CIAT people about their portal again&lt;/li&gt;
&lt;li&gt;Start looking more at the fields we want to delete&lt;/li&gt;
&lt;li&gt;The following metadata fields have 0 items using them, so we can just remove them from the registry and any references in XMLUI, input forms, etc:
&lt;ul&gt;
&lt;li&gt;dc.description.abstractother&lt;/li&gt;
&lt;li&gt;dc.whatwasknown&lt;/li&gt;
&lt;li&gt;dc.whatisnew&lt;/li&gt;
&lt;li&gt;dc.description.nationalpartners&lt;/li&gt;
&lt;li&gt;dc.peerreviewprocess&lt;/li&gt;
&lt;li&gt;cg.species.animal&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Deleted!&lt;/li&gt;
&lt;li&gt;The following fields have some items using them and I have to decide what to do with them (delete or move):
&lt;ul&gt;
&lt;li&gt;dc.icsubject.icrafsubject: 6 items, mostly in CPWF collections&lt;/li&gt;
&lt;li&gt;dc.type.journal: 11 items, mostly in ILRI collections&lt;/li&gt;
&lt;li&gt;dc.publicationcategory: 1 item, in CPWF&lt;/li&gt;
&lt;li&gt;dc.GRP: 2 items, CPWF&lt;/li&gt;
&lt;li&gt;dc.Species.animal: 6 items, in ILRI and AnGR&lt;/li&gt;
&lt;li&gt;cg.livestock.agegroup: 9 items, in ILRI collections&lt;/li&gt;
&lt;li&gt;cg.livestock.function: 20 items, mostly in EADD&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Test metadata migration on local instance again:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./migrate-fields.sh
UPDATE metadatavalue SET metadata_field_id=109 WHERE metadata_field_id=66
UPDATE 40885
UPDATE metadatavalue SET metadata_field_id=203 WHERE metadata_field_id=76
UPDATE 51330
UPDATE metadatavalue SET metadata_field_id=208 WHERE metadata_field_id=82
UPDATE 5986
UPDATE metadatavalue SET metadata_field_id=210 WHERE metadata_field_id=88
UPDATE 2456
UPDATE metadatavalue SET metadata_field_id=215 WHERE metadata_field_id=106
UPDATE 3872
UPDATE metadatavalue SET metadata_field_id=217 WHERE metadata_field_id=108
UPDATE 46075
$ JAVA_OPTS=&amp;quot;-Xms512m -Xmx512m -Dfile.encoding=UTF-8&amp;quot; ~/dspace/bin/dspace index-discovery -bf
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace was down but I&amp;rsquo;m not sure why, this was in &lt;code&gt;catalina.out&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Apr 18, 2016 7:32:26 PM com.sun.jersey.spi.container.ContainerResponse logException
SEVERE: Mapped exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException
at org.dspace.rest.Resource.processFinally(Resource.java:163)
at org.dspace.rest.HandleResource.getObject(HandleResource.java:81)
at sun.reflect.GeneratedMethodAccessor198.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Everything else in the system looked normal (50GB disk space available, nothing weird in dmesg, etc)&lt;/li&gt;
&lt;li&gt;After restarting Tomcat a few more of these errors were logged but the application was up&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-19&#34;&gt;2016-04-19&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Get handles for items that are using a given metadata field, ie &lt;code&gt;dc.Species.animal&lt;/code&gt; (105):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# select handle from item, handle where handle.resource_id = item.item_id AND item.item_id in (select resource_id from metadatavalue where resource_type_id=2 and metadata_field_id=105);
handle
-------------
10568/10298
10568/16413
10568/16774
10568/34487
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Delete metadata values for &lt;code&gt;dc.GRP&lt;/code&gt; and &lt;code&gt;dc.icsubject.icrafsubject&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# delete from metadatavalue where resource_type_id=2 and metadata_field_id=96;
# delete from metadatavalue where resource_type_id=2 and metadata_field_id=83;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;They are old ICRAF fields and we haven&amp;rsquo;t used them since 2011 or so&lt;/li&gt;
&lt;li&gt;Also delete them from the metadata registry&lt;/li&gt;
&lt;li&gt;CGSpace went down again, &lt;code&gt;dspace.log&lt;/code&gt; had this:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-04-19 15:02:17,025 ERROR org.dspace.storage.rdbms.DatabaseManager @ SQL connection Error -
org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I restarted Tomcat and PostgreSQL and now it&amp;rsquo;s back up&lt;/li&gt;
&lt;li&gt;I bet this is the same crash as yesterday, but I only saw the errors in &lt;code&gt;catalina.out&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Looks to be related to this, from &lt;code&gt;dspace.log&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-04-19 15:16:34,670 ERROR org.dspace.rest.Resource @ Something get wrong. Aborting context in finally statement.
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;We have 18,000 of these errors right now&amp;hellip;&lt;/li&gt;
&lt;li&gt;Delete a few more old metadata values: &lt;code&gt;dc.Species.animal&lt;/code&gt;, &lt;code&gt;dc.type.journal&lt;/code&gt;, and &lt;code&gt;dc.publicationcategory&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# delete from metadatavalue where resource_type_id=2 and metadata_field_id=105;
# delete from metadatavalue where resource_type_id=2 and metadata_field_id=85;
# delete from metadatavalue where resource_type_id=2 and metadata_field_id=95;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And then remove them from the metadata registry&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-20&#34;&gt;2016-04-20&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Re-deploy DSpace Test with the new subject and type fields, run all system updates, and reboot the server&lt;/li&gt;
&lt;li&gt;Migrate fields and re-deploy CGSpace with the new subject and type fields, run all system updates, and reboot the server&lt;/li&gt;
&lt;li&gt;Field migration went well:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./migrate-fields.sh
UPDATE metadatavalue SET metadata_field_id=109 WHERE metadata_field_id=66
UPDATE 40909
UPDATE metadatavalue SET metadata_field_id=203 WHERE metadata_field_id=76
UPDATE 51419
UPDATE metadatavalue SET metadata_field_id=208 WHERE metadata_field_id=82
UPDATE 5986
UPDATE metadatavalue SET metadata_field_id=210 WHERE metadata_field_id=88
UPDATE 2458
UPDATE metadatavalue SET metadata_field_id=215 WHERE metadata_field_id=106
UPDATE 3872
UPDATE metadatavalue SET metadata_field_id=217 WHERE metadata_field_id=108
UPDATE 46075
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Also, I migrated CGSpace to using the PGDG PostgreSQL repo as the infrastructure playbooks had been using it for a while and it seemed to be working well&lt;/li&gt;
&lt;li&gt;Basically, this gives us the ability to use the latest upstream stable 9.3.x release (currently 9.3.12)&lt;/li&gt;
&lt;li&gt;Looking into the REST API errors again, it looks like these started appearing a few days ago in the tens of thousands:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ grep -c &amp;quot;Aborting context in finally statement&amp;quot; dspace.log.2016-04-20
21252
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I found a recent discussion on the DSpace mailing list and I&amp;rsquo;ve asked for advice there&lt;/li&gt;
&lt;li&gt;Looks like this issue was noted and fixed in DSpace 5.5 (we&amp;rsquo;re on 5.1): &lt;a href=&#34;https://jira.duraspace.org/browse/DS-2936&#34;&gt;https://jira.duraspace.org/browse/DS-2936&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve sent a message to Atmire asking about compatibility with DSpace 5.5&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-21&#34;&gt;2016-04-21&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fix a bunch of metadata consistency issues with IITA Journal Articles (Peer review, Formally published, messed up DOIs, etc)&lt;/li&gt;
&lt;li&gt;Atmire responded with DSpace 5.5 compatible versions for their modules, so I&amp;rsquo;ll start testing those in a few weeks&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-22&#34;&gt;2016-04-22&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Import 95 records into &lt;a href=&#34;https://cgspace.cgiar.org/handle/10568/42219&#34;&gt;CTA&amp;rsquo;s Agrodok collection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-26&#34;&gt;2016-04-26&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Test embargo during item upload&lt;/li&gt;
&lt;li&gt;Seems to be working but the help text is misleading as to the date format&lt;/li&gt;
&lt;li&gt;It turns out the &lt;code&gt;robots.txt&lt;/code&gt; issue we thought we solved last month isn&amp;rsquo;t solved because you can&amp;rsquo;t use wildcards in URL patterns: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-2962&#34;&gt;https://jira.duraspace.org/browse/DS-2962&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Write some nginx rules to add &lt;code&gt;X-Robots-Tag&lt;/code&gt; HTTP headers to the dynamic requests from &lt;code&gt;robots.txt&lt;/code&gt; instead&lt;/li&gt;
&lt;li&gt;A few URLs to test with:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://dspacetest.cgiar.org/handle/10568/440/browse?type=bioversity&#34;&gt;https://dspacetest.cgiar.org/handle/10568/440/browse?type=bioversity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://dspacetest.cgiar.org/handle/10568/913/discover&#34;&gt;https://dspacetest.cgiar.org/handle/10568/913/discover&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://dspacetest.cgiar.org/handle/10568/1/search-filter?filtertype_0=country&amp;amp;filter_0=VIETNAM&amp;amp;filter_relational_operator_0=equals&amp;amp;field=country&#34;&gt;https://dspacetest.cgiar.org/handle/10568/1/search-filter?filtertype_0=country&amp;amp;filter_0=VIETNAM&amp;amp;filter_relational_operator_0=equals&amp;amp;field=country&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-27&#34;&gt;2016-04-27&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I woke up to ten or fifteen &amp;ldquo;up&amp;rdquo; and &amp;ldquo;down&amp;rdquo; emails from the monitoring website&lt;/li&gt;
&lt;li&gt;Looks like the last one was &amp;ldquo;down&amp;rdquo; from about four hours ago&lt;/li&gt;
&lt;li&gt;I think there must be something with this REST stuff:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# grep -c &amp;quot;Aborting context in finally statement&amp;quot; dspace.log.2016-04-*
dspace.log.2016-04-01:0
dspace.log.2016-04-02:0
dspace.log.2016-04-03:0
dspace.log.2016-04-04:0
dspace.log.2016-04-05:0
dspace.log.2016-04-06:0
dspace.log.2016-04-07:0
dspace.log.2016-04-08:0
dspace.log.2016-04-09:0
dspace.log.2016-04-10:0
dspace.log.2016-04-11:0
dspace.log.2016-04-12:235
dspace.log.2016-04-13:44
dspace.log.2016-04-14:0
dspace.log.2016-04-15:35
dspace.log.2016-04-16:0
dspace.log.2016-04-17:0
dspace.log.2016-04-18:11942
dspace.log.2016-04-19:28496
dspace.log.2016-04-20:28474
dspace.log.2016-04-21:28654
dspace.log.2016-04-22:28763
dspace.log.2016-04-23:28773
dspace.log.2016-04-24:28775
dspace.log.2016-04-25:28626
dspace.log.2016-04-26:28655
dspace.log.2016-04-27:7271
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I restarted tomcat and it is back up&lt;/li&gt;
&lt;li&gt;Add Spanish XMLUI strings so those users see &amp;ldquo;CGSpace&amp;rdquo; instead of &amp;ldquo;DSpace&amp;rdquo; in the user interface (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/222&#34;&gt;#222&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Submit patch to upstream DSpace for the misleading help text in the embargo step of the item submission: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-3172&#34;&gt;https://jira.duraspace.org/browse/DS-3172&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Update infrastructure playbooks for nginx 1.10.x (stable) release: &lt;a href=&#34;https://github.com/ilri/rmg-ansible-public/issues/32&#34;&gt;https://github.com/ilri/rmg-ansible-public/issues/32&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Currently running on DSpace Test, we&amp;rsquo;ll give it a few days before we adjust CGSpace&lt;/li&gt;
&lt;li&gt;CGSpace down, restarted tomcat and it&amp;rsquo;s back up&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-28&#34;&gt;2016-04-28&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Problems with stability again. I&amp;rsquo;ve blocked access to &lt;code&gt;/rest&lt;/code&gt; for now to see if the number of errors in the log files drop&lt;/li&gt;
&lt;li&gt;Later we could maybe start logging access to &lt;code&gt;/rest&lt;/code&gt; and perhaps whitelist some IPs&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-04-30&#34;&gt;2016-04-30&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Logs for today and yesterday have zero references to this REST error, so I&amp;rsquo;m going to open back up the REST API but log all requests&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;location /rest {
access_log /var/log/nginx/rest.log;
proxy_pass http://127.0.0.1:8443;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I will check the logs again in a few days to look for patterns, see who is accessing it, etc&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>March, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-03/</link>
<pubDate>Wed, 02 Mar 2016 16:50:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-03/</guid>
<description>
&lt;h2 id=&#34;2016-03-02&#34;&gt;2016-03-02&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looking at issues with author authorities on CGSpace&lt;/li&gt;
&lt;li&gt;For some reason we still have the &lt;code&gt;index-lucene-update&lt;/code&gt; cron job active on CGSpace, but I&amp;rsquo;m pretty sure we don&amp;rsquo;t need it as of the latest few versions of Atmire&amp;rsquo;s Listings and Reports module&lt;/li&gt;
&lt;li&gt;Reinstall my local (Mac OS X) DSpace stack with Tomcat 7, PostgreSQL 9.3, and Java JDK 1.7 to match environment on CGSpace server&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-07&#34;&gt;2016-03-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Troubleshooting the issues with the slew of commits for Atmire modules in &lt;a href=&#34;https://github.com/ilri/DSpace/pull/182&#34;&gt;#182&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Their changes on &lt;code&gt;5_x-dev&lt;/code&gt; branch work, but it is messy as hell with merge commits and old branch base&lt;/li&gt;
&lt;li&gt;When I rebase their branch on the latest &lt;code&gt;5_x-prod&lt;/code&gt; I get blank white pages&lt;/li&gt;
&lt;li&gt;I identified one commit that causes the issue and let them know&lt;/li&gt;
&lt;li&gt;Restart DSpace Test, as it seems to have crashed after Sisay tried to import some CSV or zip or something:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Exception in thread &amp;quot;Lucene Merge Thread #19&amp;quot; org.apache.lucene.index.MergePolicy$MergeException: java.io.IOException: No space left on device
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-03-08&#34;&gt;2016-03-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Add a few new filters to Atmire&amp;rsquo;s Listings and Reports module (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/180&#34;&gt;#180&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;We had also wanted to add a few to the Content and Usage module but I have to ask the editors which ones they were&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-10&#34;&gt;2016-03-10&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Disable the lucene cron job on CGSpace as it shouldn&amp;rsquo;t be needed anymore&lt;/li&gt;
&lt;li&gt;Discuss ORCiD and duplicate authors on Yammer&lt;/li&gt;
&lt;li&gt;Request new documentation for Atmire CUA and L&amp;amp;R modules, as ours are from 2013&lt;/li&gt;
&lt;li&gt;Walk Sisay through some data cleaning workflows in OpenRefine&lt;/li&gt;
&lt;li&gt;Start cleaning up the configuration for Atmire&amp;rsquo;s CUA module (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/185&#34;&gt;#184&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;It is very messed up because some labels are incorrect, fields are missing, etc&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/03/cua-label-mixup.png&#34; alt=&#34;Mixed up label in Atmire CUA&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Update documentation for Atmire modules&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-11&#34;&gt;2016-03-11&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;As I was looking at the CUA config I realized our Discovery config is all messed up and confusing&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve opened an issue to track some of that work (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/186&#34;&gt;#186&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;I did some major cleanup work on Discovery and XMLUI stuff related to the &lt;code&gt;dc.type&lt;/code&gt; indexes (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/187&#34;&gt;#187&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;We had been confusing &lt;code&gt;dc.type&lt;/code&gt; (a Dublin Core value) with &lt;code&gt;dc.type.output&lt;/code&gt; (a value we invented) for a few years and it had permeated all aspects of our data, indexes, item displays, etc.&lt;/li&gt;
&lt;li&gt;There is still some more work to be done to remove references to old &lt;code&gt;outputtype&lt;/code&gt; and &lt;code&gt;output&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-14&#34;&gt;2016-03-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fix some items that had invalid dates (I noticed them in the log during a re-indexing)&lt;/li&gt;
&lt;li&gt;Reset &lt;code&gt;search.index.*&lt;/code&gt; to the default, as it is only used by Lucene (deprecated by Discovery in DSpace 5.x): &lt;a href=&#34;https://github.com/ilri/DSpace/pull/188&#34;&gt;#188&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Make titles in Discovery and Browse by more consistent (singular, sentence case, etc) (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/186&#34;&gt;#186&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Also four or so center-specific subject strings were missing for Discovery&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/03/missing-xmlui-string.png&#34; alt=&#34;Missing XMLUI string&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;2016-03-15&#34;&gt;2016-03-15&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Create simple theme for new AVCD community just for a unique Google Tracking ID (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/191&#34;&gt;#191&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-16&#34;&gt;2016-03-16&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Still having problems deploying Atmire&amp;rsquo;s CUA updates and fixes from January!&lt;/li&gt;
&lt;li&gt;More discussion on the GitHub issue here: &lt;a href=&#34;https://github.com/ilri/DSpace/pull/182&#34;&gt;https://github.com/ilri/DSpace/pull/182&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Clean up Atmire CUA config (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/193&#34;&gt;#193&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Help Sisay with some PostgreSQL queries to clean up the incorrect &lt;code&gt;dc.contributor.corporateauthor&lt;/code&gt; field&lt;/li&gt;
&lt;li&gt;I noticed that we have some weird values in &lt;code&gt;dc.language&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# select * from metadatavalue where metadata_field_id=37;
metadata_value_id | resource_id | metadata_field_id | text_value | text_lang | place | authority | confidence | resource_type_id
-------------------+-------------+-------------------+------------+-----------+-------+-----------+------------+------------------
1942571 | 35342 | 37 | hi | | 1 | | -1 | 2
1942468 | 35345 | 37 | hi | | 1 | | -1 | 2
1942479 | 35337 | 37 | hi | | 1 | | -1 | 2
1942505 | 35336 | 37 | hi | | 1 | | -1 | 2
1942519 | 35338 | 37 | hi | | 1 | | -1 | 2
1942535 | 35340 | 37 | hi | | 1 | | -1 | 2
1942555 | 35341 | 37 | hi | | 1 | | -1 | 2
1942588 | 35343 | 37 | hi | | 1 | | -1 | 2
1942610 | 35346 | 37 | hi | | 1 | | -1 | 2
1942624 | 35347 | 37 | hi | | 1 | | -1 | 2
1942639 | 35339 | 37 | hi | | 1 | | -1 | 2
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;It seems this &lt;code&gt;dc.language&lt;/code&gt; field isn&amp;rsquo;t really used, but we should delete these values&lt;/li&gt;
&lt;li&gt;Also, &lt;code&gt;dc.language.iso&lt;/code&gt; has some weird values, like &amp;ldquo;En&amp;rdquo; and &amp;ldquo;English&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-17&#34;&gt;2016-03-17&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;It turns out &lt;code&gt;hi&lt;/code&gt; is the ISO 639 language code for Hindi, but these should be in &lt;code&gt;dc.language.iso&lt;/code&gt; instead of &lt;code&gt;dc.language&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I fixed the eleven items with &lt;code&gt;hi&lt;/code&gt; as well as some using the incorrect &lt;code&gt;vn&lt;/code&gt; for Vietnamese&lt;/li&gt;
&lt;li&gt;Start discussing CG core with Abenet and Sisay&lt;/li&gt;
&lt;li&gt;Re-sync CGSpace database to DSpace Test for Atmire to do some tests about the problematic CUA patches&lt;/li&gt;
&lt;li&gt;The patches work fine with a clean database, so the error was caused by some mismatch in CUA versions and the database during my testing&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-18&#34;&gt;2016-03-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Merge Atmire fixes into &lt;code&gt;5_x-prod&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Discuss thumbnails with Francesca from Bioversity&lt;/li&gt;
&lt;li&gt;Some of their items end up with thumbnails that have a big white border around them:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/03/bioversity-thumbnail-bad.jpg&#34; alt=&#34;Excessive whitespace in thumbnail&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Turns out we can add &lt;code&gt;-trim&lt;/code&gt; to the GraphicsMagick options to trim the whitespace&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/03/bioversity-thumbnail-good.jpg&#34; alt=&#34;Trimmed thumbnail&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Command used:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ gm convert -trim -quality 82 -thumbnail x300 -flatten Descriptor\ for\ Butia_EN-2015_2021.pdf\[0\] cover.jpg
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Also, it looks like adding &lt;code&gt;-sharpen 0x1.0&lt;/code&gt; really improves the quality of the image for only a few KB&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-21&#34;&gt;2016-03-21&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fix 66 site errors in Google&amp;rsquo;s webmaster tools&lt;/li&gt;
&lt;li&gt;I looked at a bunch of them and they were old URLs, weird things linked from non-existent items, etc, so I just marked them all as fixed&lt;/li&gt;
&lt;li&gt;We also have 1,300 &amp;ldquo;soft 404&amp;rdquo; errors for URLs like: &lt;a href=&#34;https://cgspace.cgiar.org/handle/10568/440/browse?type=bioversity&#34;&gt;https://cgspace.cgiar.org/handle/10568/440/browse?type=bioversity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve marked them as fixed as well since the ones I tested were working fine&lt;/li&gt;
&lt;li&gt;This raises another question, as many of these pages are linked from Discovery search results and might create a duplicate content problem&amp;hellip;&lt;/li&gt;
&lt;li&gt;Results pages like this give items that Google already knows from the sitemap: &lt;a href=&#34;https://cgspace.cgiar.org/discover?filtertype=author&amp;amp;filter_relational_operator=equals&amp;amp;filter=Orth%2C+A&#34;&gt;https://cgspace.cgiar.org/discover?filtertype=author&amp;amp;filter_relational_operator=equals&amp;amp;filter=Orth%2C+A&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;There are some access denied errors on JSPUI links (of course! we forbid them!), but I&amp;rsquo;m not sure why Google is trying to index them&amp;hellip;&lt;/li&gt;
&lt;li&gt;For example:
&lt;ul&gt;
&lt;li&gt;This: &lt;a href=&#34;https://cgspace.cgiar.org/jspui/bitstream/10568/809/1/main-page.pdf&#34;&gt;https://cgspace.cgiar.org/jspui/bitstream/10568/809/1/main-page.pdf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Linked from: &lt;a href=&#34;https://cgspace.cgiar.org/jspui/handle/10568/809&#34;&gt;https://cgspace.cgiar.org/jspui/handle/10568/809&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;I will mark these errors as resolved because they are returning HTTP 403 on purpose, for a long time!&lt;/li&gt;
&lt;li&gt;Google says the first time it saw this particular error was September 29, 2015&amp;hellip; so maybe it accidentally saw it somehow&amp;hellip;&lt;/li&gt;
&lt;li&gt;On a related note, we have 51,000 items indexed from the sitemap, but 500,000 items in the Google index, so we DEFINITELY have a problem with duplicate content&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/03/google-index.png&#34; alt=&#34;CGSpace pages in Google index&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Turns out this is a problem with DSpace&amp;rsquo;s &lt;code&gt;robots.txt&lt;/code&gt;, and there&amp;rsquo;s a Jira ticket since December, 2015: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-2962&#34;&gt;https://jira.duraspace.org/browse/DS-2962&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I am not sure if I want to apply it yet&lt;/li&gt;
&lt;li&gt;For now I&amp;rsquo;ve just set a bunch of these dynamic pages to not appear in search results by using the URL Parameters tool in Webmaster Tools&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/03/url-parameters.png&#34; alt=&#34;URL parameters cause millions of dynamic pages&#34; /&gt;
&lt;img src=&#34;2016/03/url-parameters2.png&#34; alt=&#34;Setting pages with the filter_0 param not to show in search results&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Move AVCD collection to new community and update &lt;code&gt;move_collection.sh&lt;/code&gt; script: &lt;a href=&#34;https://gist.github.com/alanorth/392c4660e8b022d99dfa&#34;&gt;https://gist.github.com/alanorth/392c4660e8b022d99dfa&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;It seems Feedburner can do HTTPS now, so we might be able to update our feeds and simplify the nginx configs&lt;/li&gt;
&lt;li&gt;De-deploy CGSpace with latest &lt;code&gt;5_x-prod&lt;/code&gt; branch&lt;/li&gt;
&lt;li&gt;Run updates on CGSpace and reboot server (new kernel, &lt;code&gt;4.5.0&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Deploy Let&amp;rsquo;s Encrypt certificate for cgspace.cgiar.org, but still need to work it into the ansible playbooks&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-22&#34;&gt;2016-03-22&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Merge robots.txt patch and disallow indexing of browse pages as our sitemap is consumed correctly (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/198&#34;&gt;#198&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-23&#34;&gt;2016-03-23&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Abenet is having problems saving group memberships, and she gets this error: &lt;a href=&#34;https://gist.github.com/alanorth/87281c061c2de57b773e&#34;&gt;https://gist.github.com/alanorth/87281c061c2de57b773e&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Can&#39;t find method org.dspace.app.xmlui.aspect.administrative.FlowGroupUtils.processSaveGroup(org.dspace.core.Context,number,string,[Ljava.lang.String;,[Ljava.lang.String;,org.apache.cocoon.environment.wrapper.RequestWrapper). (resource://aspects/Administrative/administrative.js#967)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I can reproduce the same error on DSpace Test and on my Mac&lt;/li&gt;
&lt;li&gt;Looks to be an issue with the Atmire modules, I&amp;rsquo;ve submitted a ticket to their tracker.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-24&#34;&gt;2016-03-24&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Atmire sent a patch for the group saving issue: &lt;a href=&#34;https://github.com/ilri/DSpace/pull/201&#34;&gt;https://github.com/ilri/DSpace/pull/201&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I tested it locally and it works, so I merged it to &lt;code&gt;5_x-prod&lt;/code&gt; and will deploy on CGSpace this week&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-25&#34;&gt;2016-03-25&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Having problems with Listings and Reports, seems to be caused by a rogue reference to &lt;code&gt;dc.type.output&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;This is the error we get when we proceed to the second page of Listings and Reports: &lt;a href=&#34;https://gist.github.com/alanorth/b2d7fb5b82f94898caaf&#34;&gt;https://gist.github.com/alanorth/b2d7fb5b82f94898caaf&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Commenting out the line works, but I haven&amp;rsquo;t figured out the proper syntax for referring to &lt;code&gt;dc.type.*&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-28&#34;&gt;2016-03-28&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Look into enabling the embargo during item submission, see: &lt;a href=&#34;https://wiki.duraspace.org/display/DSDOC5x/Embargo#Embargo-SubmissionProcess&#34;&gt;https://wiki.duraspace.org/display/DSDOC5x/Embargo#Embargo-SubmissionProcess&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Seems we only want &lt;code&gt;AccessStep&lt;/code&gt; because &lt;code&gt;UploadWithEmbargoStep&lt;/code&gt; disables the ability to edit embargos at the item level&lt;/li&gt;
&lt;li&gt;This pull request enables the ability to set an item-level embargo during submission: &lt;a href=&#34;https://github.com/ilri/DSpace/pull/203&#34;&gt;https://github.com/ilri/DSpace/pull/203&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I figured out that the problem with Listings and Reports was because I disabled the &lt;code&gt;search.index.*&lt;/code&gt; last week, and they are still used by JSPUI apparently&lt;/li&gt;
&lt;li&gt;This pull request re-enables them: &lt;a href=&#34;https://github.com/ilri/DSpace/pull/202&#34;&gt;https://github.com/ilri/DSpace/pull/202&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Re-deploy DSpace Test, run all system updates, and restart the server&lt;/li&gt;
&lt;li&gt;Looks like the Listings and Reports fix was NOT due to the search indexes (which are actually not used), and rather due to the filter configuration in the Listings and Reports config&lt;/li&gt;
&lt;li&gt;This pull request simply updates the config for the dc.type.outputdc.type change that was made last week: &lt;a href=&#34;https://github.com/ilri/DSpace/pull/204&#34;&gt;https://github.com/ilri/DSpace/pull/204&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Deploy robots.txt fix, embargo for item submissions, and listings and reports fix on CGSpace&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-03-29&#34;&gt;2016-03-29&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Skype meeting with Peter and Addis team to discuss metadata changes for Dublin Core, CGcore, and CGSpace-specific fields&lt;/li&gt;
&lt;li&gt;We decided to proceed with some deletes first, then identify CGSpace-specific fields to clean/move to &lt;code&gt;cg.*&lt;/code&gt;, and then worry about broader changes to DC&lt;/li&gt;
&lt;li&gt;Before we move or rename and fields we need to circulate a list of fields we intend to change to CCAFS, CWPF, etc who might be harvesting the fields&lt;/li&gt;
&lt;li&gt;After all of this we need to start implementing controlled vocabularies for fields, either with the Javascript lookup or like existing ILRI subjects&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>February, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-02/</link>
<pubDate>Fri, 05 Feb 2016 13:18:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-02/</guid>
<description>
&lt;h2 id=&#34;2016-02-05&#34;&gt;2016-02-05&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looking at some DAGRIS data for Abenet Yabowork&lt;/li&gt;
&lt;li&gt;Lots of issues with spaces, newlines, etc causing the import to fail&lt;/li&gt;
&lt;li&gt;I noticed we have a very &lt;em&gt;interesting&lt;/em&gt; list of countries on CGSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/02/cgspace-countries.png&#34; alt=&#34;CGSpace country list&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Not only are there 49,000 countries, we have some blanks (25)&amp;hellip;&lt;/li&gt;
&lt;li&gt;Also, lots of things like &amp;ldquo;COTE D`LVOIRE&amp;rdquo; and &amp;ldquo;COTE D IVOIRE&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-06&#34;&gt;2016-02-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Found a way to get items with null/empty metadata values from SQL&lt;/li&gt;
&lt;li&gt;First, find the &lt;code&gt;metadata_field_id&lt;/code&gt; for the field you want from the &lt;code&gt;metadatafieldregistry&lt;/code&gt; table:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select * from metadatafieldregistry;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;In this case our country field is 78&lt;/li&gt;
&lt;li&gt;Now find all resources with type 2 (item) that have null/empty values for that field:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select resource_id from metadatavalue where resource_type_id=2 and metadata_field_id=78 and (text_value=&#39;&#39; OR text_value IS NULL);
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Then you can find the handle that owns it from its &lt;code&gt;resource_id&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select handle from item, handle where handle.resource_id = item.item_id AND item.item_id = &#39;22678&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;It&amp;rsquo;s 25 items so editing in the web UI is annoying, let&amp;rsquo;s try SQL!&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# delete from metadatavalue where metadata_field_id=78 and text_value=&#39;&#39;;
DELETE 25
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After that perhaps a regular &lt;code&gt;dspace index-discovery&lt;/code&gt; (no -b) &lt;em&gt;should&lt;/em&gt; suffice&amp;hellip;&lt;/li&gt;
&lt;li&gt;Hmm, I indexed, cleared the Cocoon cache, and restarted Tomcat but the 25 &amp;ldquo;|||&amp;rdquo; countries are still there&lt;/li&gt;
&lt;li&gt;Maybe I need to do a full re-index&amp;hellip;&lt;/li&gt;
&lt;li&gt;Yep! The full re-index seems to work.&lt;/li&gt;
&lt;li&gt;Process the empty countries on CGSpace&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-07&#34;&gt;2016-02-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Working on cleaning up Abenet&amp;rsquo;s DAGRIS data with OpenRefine&lt;/li&gt;
&lt;li&gt;I discovered two really nice functions in OpenRefine: &lt;code&gt;value.trim()&lt;/code&gt; and &lt;code&gt;value.escape(&amp;quot;javascript&amp;quot;)&lt;/code&gt; which shows whitespace characters like &lt;code&gt;\r\n&lt;/code&gt;!&lt;/li&gt;
&lt;li&gt;For some reason when you import an Excel file into OpenRefine it exports dates like 1949 to 1949.0 in the CSV&lt;/li&gt;
&lt;li&gt;I re-import the resulting CSV and run a GREL on the date issued column: &lt;code&gt;value.replace(&amp;quot;\.0&amp;quot;, &amp;quot;&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I need to start running DSpace in Mac OS X instead of a Linux VM&lt;/li&gt;
&lt;li&gt;Install PostgreSQL from homebrew, then configure and import CGSpace database dump:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ postgres -D /opt/brew/var/postgres
$ createuser --superuser postgres
$ createuser --pwprompt dspacetest
$ createdb -O dspacetest --encoding=UNICODE dspacetest
$ psql postgres
postgres=# alter user dspacetest createuser;
postgres=# \q
$ pg_restore -O -U dspacetest -d dspacetest ~/Downloads/cgspace_2016-02-07.backup
$ psql postgres
postgres=# alter user dspacetest nocreateuser;
postgres=# \q
$ vacuumdb dspacetest
$ psql -U dspacetest -f ~/src/git/DSpace/dspace/etc/postgres/update-sequences.sql dspacetest -h localhost
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After building and running a &lt;code&gt;fresh_install&lt;/code&gt; I symlinked the webapps into Tomcat&amp;rsquo;s webapps folder:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ mv /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT.orig
$ ln -sfv ~/dspace/webapps/xmlui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/ROOT
$ ln -sfv ~/dspace/webapps/rest /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/rest
$ ln -sfv ~/dspace/webapps/jspui /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/jspui
$ ln -sfv ~/dspace/webapps/oai /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/oai
$ ln -sfv ~/dspace/webapps/solr /opt/brew/Cellar/tomcat/8.0.30/libexec/webapps/solr
$ /opt/brew/Cellar/tomcat/8.0.30/bin/catalina start
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Add CATALINA_OPTS in &lt;code&gt;/opt/brew/Cellar/tomcat/8.0.30/libexec/bin/setenv.sh&lt;/code&gt;, as this script is sourced by the &lt;code&gt;catalina&lt;/code&gt; startup script&lt;/li&gt;
&lt;li&gt;For example:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;CATALINA_OPTS=&amp;quot;-Djava.awt.headless=true -Xms2048m -Xmx2048m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -Dfile.encoding=UTF-8&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After verifying that the site is working, start a full index:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ~/dspace/bin/dspace index-discovery -b
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-02-08&#34;&gt;2016-02-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Finish cleaning up and importing ~400 DAGRIS items into CGSpace&lt;/li&gt;
&lt;li&gt;Whip up some quick CSS to make the button in the submission workflow use the XMLUI theme&amp;rsquo;s brand colors (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/154&#34;&gt;#154&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/02/submit-button-ilri.png&#34; alt=&#34;ILRI submission buttons&#34; /&gt;
&lt;img src=&#34;2016/02/submit-button-drylands.png&#34; alt=&#34;Drylands submission buttons&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;2016-02-09&#34;&gt;2016-02-09&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Re-sync DSpace Test with CGSpace&lt;/li&gt;
&lt;li&gt;Help Sisay with OpenRefine&lt;/li&gt;
&lt;li&gt;Enable HTTPS on DSpace Test using Let&amp;rsquo;s Encrypt:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ cd ~/src/git
$ git clone https://github.com/letsencrypt/letsencrypt
$ cd letsencrypt
$ sudo service nginx stop
# add port 443 to firewall rules
$ ./letsencrypt-auto certonly --standalone -d dspacetest.cgiar.org
$ sudo service nginx start
$ ansible-playbook dspace.yml -l linode02 -t nginx,firewall -u aorth --ask-become-pass
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;We should install it in /opt/letsencrypt and then script the renewal script, but first we have to wire up some variables and template stuff based on the script here: &lt;a href=&#34;https://letsencrypt.org/howitworks/&#34;&gt;https://letsencrypt.org/howitworks/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I had to export some CIAT items that were being cleaned up on the test server and I noticed their &lt;code&gt;dc.contributor.author&lt;/code&gt; fields have DSpace 5 authority index UUIDs&amp;hellip;&lt;/li&gt;
&lt;li&gt;To clean those up in OpenRefine I used this GREL expression: &lt;code&gt;value.replace(/::\w{8}-\w{4}-\w{4}-\w{4}-\w{12}::600/,&amp;quot;&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Getting more and more hangs on DSpace Test, seemingly random but also during CSV import&lt;/li&gt;
&lt;li&gt;Logs don&amp;rsquo;t always show anything right when it fails, but eventually one of these appears:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;org.dspace.discovery.SearchServiceException: Error while processing facet fields: java.lang.OutOfMemoryError: Java heap space
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;or&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Caused by: java.util.NoSuchElementException: Timeout waiting for idle object
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Right now DSpace Test&amp;rsquo;s Tomcat heap is set to 1536m and we have quite a bit of free RAM:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# free -m
total used free shared buffers cached
Mem: 3950 3902 48 9 37 1311
-/+ buffers/cache: 2552 1397
Swap: 255 57 198
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So I&amp;rsquo;ll bump up the Tomcat heap to 2048 (CGSpace production server is using 3GB)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-11&#34;&gt;2016-02-11&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Massaging some CIAT data in OpenRefine&lt;/li&gt;
&lt;li&gt;There are 1200 records that have PDFs, and will need to be imported into CGSpace&lt;/li&gt;
&lt;li&gt;I created a &lt;code&gt;filename&lt;/code&gt; column based on the &lt;code&gt;dc.identifier.url&lt;/code&gt; column using the following transform:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value.split(&#39;/&#39;)[-1]
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Then I wrote a tool called &lt;a href=&#34;https://gist.github.com/alanorth/2206f24483fe5f0454fc&#34;&gt;&lt;code&gt;generate-thumbnails.py&lt;/code&gt;&lt;/a&gt; to download the PDFs and generate thumbnails for them, for example:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./generate-thumbnails.py ciat-reports.csv
Processing 64661.pdf
&amp;gt; Downloading 64661.pdf
&amp;gt; Creating thumbnail for 64661.pdf
Processing 64195.pdf
&amp;gt; Downloading 64195.pdf
&amp;gt; Creating thumbnail for 64195.pdf
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-02-12&#34;&gt;2016-02-12&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looking at CIAT&amp;rsquo;s records again, there are some problems with a dozen or so files (out of 1200)&lt;/li&gt;
&lt;li&gt;A few items are using the same exact PDF&lt;/li&gt;
&lt;li&gt;A few items are using HTM or DOC files&lt;/li&gt;
&lt;li&gt;A few items link to PDFs on IFPRI&amp;rsquo;s e-Library or Research Gate&lt;/li&gt;
&lt;li&gt;A few items have no item&lt;/li&gt;
&lt;li&gt;Also, I&amp;rsquo;m not sure if we import these items, will be remove the &lt;code&gt;dc.identifier.url&lt;/code&gt; field from the records?&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-12-1&#34;&gt;2016-02-12&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Looking at CIAT&amp;rsquo;s records again, there are some files linking to PDFs on Slide Share, Embrapa, UEA UK, and Condesan, so I&amp;rsquo;m not sure if we can use those&lt;/li&gt;
&lt;li&gt;265 items have dirty, URL-encoded filenames:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ls | grep -c -E &amp;quot;%&amp;quot;
265
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I suggest that we import ~850 or so of the clean ones first, then do the rest after I can find a clean/reliable way to decode the filenames&lt;/li&gt;
&lt;li&gt;This python2 snippet seems to work in the CLI, but not so well in OpenRefine:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ python -c &amp;quot;import urllib, sys; print urllib.unquote(sys.argv[1])&amp;quot; CIAT_COLOMBIA_000169_T%C3%A9cnicas_para_el_aislamiento_y_cultivo_de_protoplastos_de_yuca.pdf
CIAT_COLOMBIA_000169_Técnicas_para_el_aislamiento_y_cultivo_de_protoplastos_de_yuca.pdf
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Merge pull requests for submission form theming (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/178&#34;&gt;#178&lt;/a&gt;) and missing center subjects in XMLUI item views (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/176&#34;&gt;#176&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;They will be deployed on CGSpace the next time I re-deploy&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-16&#34;&gt;2016-02-16&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turns out OpenRefine has an unescape function!&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value.unescape(&amp;quot;url&amp;quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This turns the URLs into human-readable versions that we can use as proper filenames&lt;/li&gt;
&lt;li&gt;Run web server and system updates on DSpace Test and reboot&lt;/li&gt;
&lt;li&gt;To merge &lt;code&gt;dc.identifier.url&lt;/code&gt; and &lt;code&gt;dc.identifier.url[]&lt;/code&gt;, rename the second column so it doesn&amp;rsquo;t have the brackets, like &lt;code&gt;dc.identifier.url2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Then you create a facet for blank values on each column, show the rows that have values for one and not the other, then transform each independently to have the contents of the other, with &amp;ldquo;||&amp;rdquo; in between&lt;/li&gt;
&lt;li&gt;Work on Python script for parsing and downloading PDF records from &lt;code&gt;dc.identifier.url&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;To get filenames from &lt;code&gt;dc.identifier.url&lt;/code&gt;, create a new column based on this transform: &lt;code&gt;forEach(value.split(&#39;||&#39;), v, v.split(&#39;/&#39;)[-1]).join(&#39;||&#39;)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;This also works for records that have multiple URLs (separated by &amp;ldquo;||&amp;rdquo;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-17&#34;&gt;2016-02-17&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Re-deploy CGSpace, run all system updates, and reboot&lt;/li&gt;
&lt;li&gt;More work on CIAT data, cleaning and doing a last metadata-only import into DSpace Test&lt;/li&gt;
&lt;li&gt;SAFBuilder has a bug preventing it from processing filenames containing more than one underscore&lt;/li&gt;
&lt;li&gt;Need to re-process the filename column to replace multiple underscores with one: &lt;code&gt;value.replace(/_{2,}/, &amp;quot;_&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-20&#34;&gt;2016-02-20&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Turns out the &amp;ldquo;bug&amp;rdquo; in SAFBuilder isn&amp;rsquo;t a bug, it&amp;rsquo;s a feature that allows you to encode extra information like the destintion bundle in the filename&lt;/li&gt;
&lt;li&gt;Also, it seems DSpace&amp;rsquo;s SAF import tool doesn&amp;rsquo;t like importing filenames that have accents in them:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;java.io.FileNotFoundException: /usr/share/tomcat7/SimpleArchiveFormat/item_1021/CIAT_COLOMBIA_000075_Medición_de_palatabilidad_en_forrajes.pdf (No such file or directory)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Need to rename files to have no accents or umlauts, etc&amp;hellip;&lt;/li&gt;
&lt;li&gt;Useful custom text facet for URLs ending with &amp;ldquo;.pdf&amp;rdquo;: &lt;code&gt;value.endsWith(&amp;quot;.pdf&amp;quot;)&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-22&#34;&gt;2016-02-22&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;To change Spanish accents to ASCII in OpenRefine:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value.replace(&#39;ó&#39;,&#39;o&#39;).replace(&#39;í&#39;,&#39;i&#39;).replace(&#39;á&#39;,&#39;a&#39;).replace(&#39;é&#39;,&#39;e&#39;).replace(&#39;ñ&#39;,&#39;n&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;But actually, the accents might not be an issue, as I can successfully import files containing Spanish accents on my Mac&lt;/li&gt;
&lt;li&gt;On closer inspection, I can import files with the following names on Linux (DSpace Test):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;Bitstream: tést.pdf
Bitstream: tést señora.pdf
Bitstream: tést señora alimentación.pdf
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Seems it could be something with the HFS+ filesystem actually, as it&amp;rsquo;s not UTF-8 (&lt;a href=&#34;http://www.cio.com/article/2868393/linus-torvalds-apples-hfs-is-probably-the-worst-file-system-ever.html&#34;&gt;it&amp;rsquo;s something like UCS-2&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;HFS+ stores filenames as a string, and filenames with accents get stored as &lt;a href=&#34;https://blog.vrypan.net/2012/11/13/hfsplus-unicode-and-accented-chars/&#34;&gt;character+accent&lt;/a&gt; whereas Linux&amp;rsquo;s ext4 stores them as an array of bytes&lt;/li&gt;
&lt;li&gt;Running the SAFBuilder on Mac OS X works if you&amp;rsquo;re going to import the resulting bundle on Mac OS X, but if your DSpace is running on Linux you need to run the SAFBuilder there where the filesystem&amp;rsquo;s encoding matches&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-02-29&#34;&gt;2016-02-29&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Got notified by some CIFOR colleagues that the Google Scholar team had contacted them about CGSpace&amp;rsquo;s incorrect ordering of authors in Google Scholar metadata&lt;/li&gt;
&lt;li&gt;Turns out there is a patch, and it was merged in DSpace 5.4: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-2679&#34;&gt;https://jira.duraspace.org/browse/DS-2679&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve merged it into our &lt;code&gt;5_x-prod&lt;/code&gt; branch that is currently based on DSpace 5.1&lt;/li&gt;
&lt;li&gt;We found a bug when a user searches from the homepage, sorts the results, and then tries to click &amp;ldquo;View More&amp;rdquo; in a sidebar facet&lt;/li&gt;
&lt;li&gt;I am not sure what causes it yet, but I opened an issue for it: &lt;a href=&#34;https://github.com/ilri/DSpace/issues/179&#34;&gt;https://github.com/ilri/DSpace/issues/179&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Have more problems with SAFBuilder on Mac OS X&lt;/li&gt;
&lt;li&gt;Now it doesn&amp;rsquo;t recognize description hints in the filename column, like: &lt;code&gt;test.pdf__description:Blah&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;But on Linux it works fine&lt;/li&gt;
&lt;li&gt;Trying to test Atmire&amp;rsquo;s series of stats and CUA fixes from January and February, but their branch history is really messy and it&amp;rsquo;s hard to see what&amp;rsquo;s going on&lt;/li&gt;
&lt;li&gt;Rebasing their branch on top of our production branch results in a broken Tomcat, so I&amp;rsquo;m going to tell them to fix their history and make a proper pull request&lt;/li&gt;
&lt;li&gt;Looking at the filenames for the CIAT Reports, some have some really ugly characters, like: &lt;code&gt;&#39;&lt;/code&gt; or &lt;code&gt;,&lt;/code&gt; or &lt;code&gt;=&lt;/code&gt; or &lt;code&gt;[&lt;/code&gt; or &lt;code&gt;]&lt;/code&gt; or &lt;code&gt;(&lt;/code&gt; or &lt;code&gt;)&lt;/code&gt; or &lt;code&gt;_.pdf&lt;/code&gt; or &lt;code&gt;._&lt;/code&gt; etc&lt;/li&gt;
&lt;li&gt;It&amp;rsquo;s tricky to parse those things in some programming languages so I&amp;rsquo;d rather just get rid of the weird stuff now in OpenRefine:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;value.replace(&amp;quot;&#39;&amp;quot;,&#39;&#39;).replace(&#39;_=_&#39;,&#39;_&#39;).replace(&#39;,&#39;,&#39;&#39;).replace(&#39;[&#39;,&#39;&#39;).replace(&#39;]&#39;,&#39;&#39;).replace(&#39;(&#39;,&#39;&#39;).replace(&#39;)&#39;,&#39;&#39;).replace(&#39;_.pdf&#39;,&#39;.pdf&#39;).replace(&#39;._&#39;,&#39;_&#39;)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Finally import the 1127 CIAT items into CGSpace: &lt;a href=&#34;https://cgspace.cgiar.org/handle/10568/35710&#34;&gt;https://cgspace.cgiar.org/handle/10568/35710&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Re-deploy CGSpace with the Google Scholar fix, but I&amp;rsquo;m waiting on the Atmire fixes for now, as the branch history is ugly&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>January, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-01/</link>
<pubDate>Wed, 13 Jan 2016 13:18:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-01/</guid>
<description>
&lt;h2 id=&#34;2016-01-13&#34;&gt;2016-01-13&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Move ILRI collection &lt;code&gt;10568/12503&lt;/code&gt; from &lt;code&gt;10568/27869&lt;/code&gt; to &lt;code&gt;10568/27629&lt;/code&gt; using the &lt;a href=&#34;https://gist.github.com/alanorth/392c4660e8b022d99dfa&#34;&gt;move_collections.sh&lt;/a&gt; script I wrote last year.&lt;/li&gt;
&lt;li&gt;I realized it is only necessary to clear the Cocoon cache after moving collections—rather than reindexing—as no metadata has changed, and therefore no search or browse indexes need to be updated.&lt;/li&gt;
&lt;li&gt;Update GitHub wiki for documentation of &lt;a href=&#34;https://github.com/ilri/DSpace/wiki/Maintenance-Tasks&#34;&gt;maintenance tasks&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-01-14&#34;&gt;2016-01-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Update CCAFS project identifiers in input-forms.xml&lt;/li&gt;
&lt;li&gt;Run system updates and restart the server&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-01-18&#34;&gt;2016-01-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Change &amp;ldquo;Extension material&amp;rdquo; to &amp;ldquo;Extension Material&amp;rdquo; in input-forms.xml (a mistake that fell through the cracks when we fixed the others in DSpace 4 era)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-01-19&#34;&gt;2016-01-19&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Work on tweaks and updates for the social sharing icons on item pages: add Delicious and Mendeley (from Academicons), make links open in new windows, and set the icon color to the theme&amp;rsquo;s primary color (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/157&#34;&gt;#157&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Tweak date-based facets to show more values in drill-down ranges (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/162&#34;&gt;#162&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Need to remember to clear the Cocoon cache after deployment or else you don&amp;rsquo;t see the new ranges immediately&lt;/li&gt;
&lt;li&gt;Set up recipe on IFTTT to tweet new items from the CGSpace Atom feed to my twitter account&lt;/li&gt;
&lt;li&gt;Altmetrics&amp;rsquo; support for Handles is kinda weak, so they can&amp;rsquo;t associate our items with DOIs until they are tweeted or blogged, etc first.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-01-21&#34;&gt;2016-01-21&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Still waiting for my IFTTT recipe to fire, two days later&lt;/li&gt;
&lt;li&gt;It looks like the Atom feed on CGSpace hasn&amp;rsquo;t changed in two days, but there have definitely been new items&lt;/li&gt;
&lt;li&gt;The RSS feed is nearly as old, but has different old items there&lt;/li&gt;
&lt;li&gt;On a hunch I cleared the Cocoon cache and now the feeds are fresh&lt;/li&gt;
&lt;li&gt;Looks like there is configuration option related to this, &lt;code&gt;webui.feed.cache.age&lt;/code&gt;, which defaults to 48 hours, though I&amp;rsquo;m not sure what relation it has to the Cocoon cache&lt;/li&gt;
&lt;li&gt;In any case, we should change this cache to be something more like 6 hours, as we publish new items several times per day.&lt;/li&gt;
&lt;li&gt;Work around a CSS issue with long URLs in the item view (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/172&#34;&gt;#172&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-01-25&#34;&gt;2016-01-25&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Re-deploy CGSpace and DSpace Test with latest &lt;code&gt;5_x-prod&lt;/code&gt; branch&lt;/li&gt;
&lt;li&gt;This included the social icon fixes/updates, date-based facet tweaks, reducing the feed cache age, and fixing a layout issue in XMLUI item view when an item had long URLs&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-01-26&#34;&gt;2016-01-26&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run nginx updates on CGSpace and DSpace Test (&lt;a href=&#34;http://mailman.nginx.org/pipermail/nginx/2016-January/049700.html&#34;&gt;1.8.1 and 1.9.10, respectively&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Run updates on DSpace Test and reboot for new Linode kernel &lt;code&gt;Linux 4.4.0-x86_64-linode63&lt;/code&gt; (first update in months)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-01-28&#34;&gt;2016-01-28&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Start looking at importing some Bioversity data that had been prepared earlier this week&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While checking the data I noticed something strange, there are 79 items but only 8 unique PDFs:&lt;/p&gt;
&lt;p&gt;$ ls SimpleArchiveForBio/ | wc -l
79
$ find SimpleArchiveForBio/ -iname &amp;ldquo;*.pdf&amp;rdquo; -exec basename {} \; | sort -u | wc -l
8&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-01-29&#34;&gt;2016-01-29&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Add five missing center-specific subjects to XMLUI item view (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/174&#34;&gt;#174&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;This &lt;a href=&#34;https://cgspace.cgiar.org/handle/10568/67062&#34;&gt;CCAFS item&lt;/a&gt; Before:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/01/xmlui-subjects-before.png&#34; alt=&#34;XMLUI subjects before&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/01/xmlui-subjects-after.png&#34; alt=&#34;XMLUI subjects after&#34; /&gt;&lt;/p&gt;
</description>
</item>
<item>
<title>December, 2015</title>
<link>https://alanorth.github.io/cgspace-notes/2015-12/</link>
<pubDate>Wed, 02 Dec 2015 13:18:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2015-12/</guid>
<description>
&lt;h2 id=&#34;2015-12-02&#34;&gt;2015-12-02&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Replace &lt;code&gt;lzop&lt;/code&gt; with &lt;code&gt;xz&lt;/code&gt; in log compression cron jobs on DSpace Test—it uses less space:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# cd /home/dspacetest.cgiar.org/log
# ls -lh dspace.log.2015-11-18*
-rw-rw-r-- 1 tomcat7 tomcat7 2.0M Nov 18 23:59 dspace.log.2015-11-18
-rw-rw-r-- 1 tomcat7 tomcat7 387K Nov 18 23:59 dspace.log.2015-11-18.lzo
-rw-rw-r-- 1 tomcat7 tomcat7 169K Nov 18 23:59 dspace.log.2015-11-18.xz
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I had used lrzip once, but it needs more memory and is harder to use as it requires the lrztar wrapper&lt;/li&gt;
&lt;li&gt;Need to remember to go check if everything is ok in a few days and then change CGSpace&lt;/li&gt;
&lt;li&gt;CGSpace went down again (due to PostgreSQL idle connections of course)&lt;/li&gt;
&lt;li&gt;Current database settings for DSpace are &lt;code&gt;db.maxconnections = 30&lt;/code&gt; and &lt;code&gt;db.maxidle = 8&lt;/code&gt;, yet idle connections are exceeding this:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | grep cgspace | grep -c idle
39
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I restarted PostgreSQL and Tomcat and it&amp;rsquo;s back&lt;/li&gt;
&lt;li&gt;On a related note of why CGSpace is so slow, I decided to finally try the &lt;code&gt;pgtune&lt;/code&gt; script to tune the postgres settings:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# apt-get install pgtune
# pgtune -i /etc/postgresql/9.3/main/postgresql.conf -o postgresql.conf-pgtune
# mv /etc/postgresql/9.3/main/postgresql.conf /etc/postgresql/9.3/main/postgresql.conf.orig
# mv postgresql.conf-pgtune /etc/postgresql/9.3/main/postgresql.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;It introduced the following new settings:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;default_statistics_target = 50
maintenance_work_mem = 480MB
constraint_exclusion = on
checkpoint_completion_target = 0.9
effective_cache_size = 5632MB
work_mem = 48MB
wal_buffers = 8MB
checkpoint_segments = 16
shared_buffers = 1920MB
max_connections = 80
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Now I need to go read PostgreSQL docs about these options, and watch memory settings in munin etc&lt;/li&gt;
&lt;li&gt;For what it&amp;rsquo;s worth, now the REST API should be faster (because of these PostgreSQL tweaks):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
1.474
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
2.141
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
1.685
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
1.995
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
1.786
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Last week it was an average of 8 seconds&amp;hellip; now this is &lt;sup&gt;1&lt;/sup&gt;&amp;frasl;&lt;sub&gt;4&lt;/sub&gt; of that&lt;/li&gt;
&lt;li&gt;CCAFS noticed that one of their items displays only the Atmire statlets: &lt;a href=&#34;https://cgspace.cgiar.org/handle/10568/42445&#34;&gt;https://cgspace.cgiar.org/handle/10568/42445&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2015/12/ccafs-item-no-metadata.png&#34; alt=&#34;CCAFS item&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The authorizations for the item are all public READ, and I don&amp;rsquo;t see any errors in dspace.log when browsing that item&lt;/li&gt;
&lt;li&gt;I filed a ticket on Atmire&amp;rsquo;s issue tracker&lt;/li&gt;
&lt;li&gt;I also filed a ticket on Atmire&amp;rsquo;s issue tracker for the PostgreSQL stuff&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2015-12-03&#34;&gt;2015-12-03&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace very slow, and monitoring emailing me to say its down, even though I can load the page (very slowly)&lt;/li&gt;
&lt;li&gt;Idle postgres connections look like this (with no change in DSpace db settings lately):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | grep cgspace | grep -c idle
29
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I restarted Tomcat and postgres&amp;hellip;&lt;/li&gt;
&lt;li&gt;Atmire commented that we should raise the JVM heap size by ~500M, so it is now &lt;code&gt;-Xms3584m -Xmx3584m&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;We weren&amp;rsquo;t out of heap yet, but it&amp;rsquo;s probably fair enough that the DSpace 5 upgrade (and new Atmire modules) requires more memory so it&amp;rsquo;s ok&lt;/li&gt;
&lt;li&gt;A possible side effect is that I see that the REST API is twice as fast for the request above now:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
1.368
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.968
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
1.006
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.849
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.806
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.854
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2015-12-05&#34;&gt;2015-12-05&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace has been up and down all day and REST API is completely unresponsive&lt;/li&gt;
&lt;li&gt;PostgreSQL idle connections are currently:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;postgres@linode01:~$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | grep cgspace | grep -c idle
28
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I have reverted all the pgtune tweaks from the other day, as they didn&amp;rsquo;t fix the stability issues, so I&amp;rsquo;d rather not have them introducing more variables into the equation&lt;/li&gt;
&lt;li&gt;The PostgreSQL stats from Munin all point to something database-related with the DSpace 5 upgrade around midlate November&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2015/12/postgres_bgwriter-year.png&#34; alt=&#34;PostgreSQL bgwriter (year)&#34; /&gt;
&lt;img src=&#34;2015/12/postgres_cache_cgspace-year.png&#34; alt=&#34;PostgreSQL cache (year)&#34; /&gt;
&lt;img src=&#34;2015/12/postgres_locks_cgspace-year.png&#34; alt=&#34;PostgreSQL locks (year)&#34; /&gt;
&lt;img src=&#34;2015/12/postgres_scans_cgspace-year.png&#34; alt=&#34;PostgreSQL scans (year)&#34; /&gt;&lt;/p&gt;
&lt;h2 id=&#34;2015-12-07&#34;&gt;2015-12-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Atmire sent &lt;a href=&#34;https://github.com/ilri/DSpace/pull/161&#34;&gt;some fixes&lt;/a&gt; to DSpace&amp;rsquo;s REST API code that was leaving contexts open (causing the slow performance and database issues)&lt;/li&gt;
&lt;li&gt;After deploying the fix to CGSpace the REST API is consistently faster:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.675
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.599
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.588
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.566
$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
0.497
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2015-12-08&#34;&gt;2015-12-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Switch CGSpace log compression cron jobs from using lzop to xz—the compression isn&amp;rsquo;t as good, but it&amp;rsquo;s much faster and causes less IO/CPU load&lt;/li&gt;
&lt;li&gt;Since we figured out (and fixed) the cause of the performance issue, I reverted Google Bot&amp;rsquo;s crawl rate to the &amp;ldquo;Let Google optimize&amp;rdquo; setting&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
<item>
<title>November, 2015</title>
<link>https://alanorth.github.io/cgspace-notes/2015-11/</link>
<pubDate>Mon, 23 Nov 2015 17:00:57 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2015-11/</guid>
<description>
&lt;h2 id=&#34;2015-11-22&#34;&gt;2015-11-22&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace went down&lt;/li&gt;
&lt;li&gt;Looks like DSpace exhausted its PostgreSQL connection pool&lt;/li&gt;
&lt;li&gt;Last week I had increased the limit from 30 to 60, which seemed to help, but now there are many more idle connections:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | grep idle | grep -c cgspace
78
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;For now I have increased the limit from 60 to 90, run updates, and rebooted the server&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2015-11-24&#34;&gt;2015-11-24&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace went down again&lt;/li&gt;
&lt;li&gt;Getting emails from uptimeRobot and uptimeButler that it&amp;rsquo;s down, and Google Webmaster Tools is sending emails that there is an increase in crawl errors&lt;/li&gt;
&lt;li&gt;Looks like there are still a bunch of idle PostgreSQL connections:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | grep idle | grep -c cgspace
96
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;For some reason the number of idle connections is very high since we upgraded to DSpace 5&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2015-11-25&#34;&gt;2015-11-25&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Troubleshoot the DSpace 5 OAI breakage caused by nginx routing config&lt;/li&gt;
&lt;li&gt;The OAI application requests stylesheets and javascript files with the path &lt;code&gt;/oai/static/css&lt;/code&gt;, which gets matched here:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# static assets we can load from the file system directly with nginx
location ~ /(themes|static|aspects/ReportingSuite) {
try_files $uri @tomcat;
...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The document root is relative to the xmlui app, so this gets a 404—I&amp;rsquo;m not sure why it doesn&amp;rsquo;t pass to &lt;code&gt;@tomcat&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Anyways, I can&amp;rsquo;t find any URIs with path &lt;code&gt;/static&lt;/code&gt;, and the more important point is to handle all the static theme assets, so we can just remove &lt;code&gt;static&lt;/code&gt; from the regex for now (who cares if we can&amp;rsquo;t use nginx to send Etags for OAI CSS!)&lt;/li&gt;
&lt;li&gt;Also, I noticed we aren&amp;rsquo;t setting CSP headers on the static assets, because in nginx headers are inherited in child blocks, but if you use &lt;code&gt;add_header&lt;/code&gt; in a child block it doesn&amp;rsquo;t inherit the others&lt;/li&gt;
&lt;li&gt;We simply need to add &lt;code&gt;include extra-security.conf;&lt;/code&gt; to the above location block (but research and test first)&lt;/li&gt;
&lt;li&gt;We should add WOFF assets to the list of things to set expires for:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;location ~* \.(?:ico|css|js|gif|jpe?g|png|woff)$ {
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;We should also add &lt;code&gt;aspects/Statistics&lt;/code&gt; to the location block for static assets (minus &lt;code&gt;static&lt;/code&gt; from above):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;location ~ /(themes|aspects/ReportingSuite|aspects/Statistics) {
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Need to check &lt;code&gt;/about&lt;/code&gt; on CGSpace, as it&amp;rsquo;s blank on my local test server and we might need to add something there&lt;/li&gt;
&lt;li&gt;CGSpace has been up and down all day due to PostgreSQL idle connections (current DSpace pool is 90):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | grep idle | grep -c cgspace
93
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I looked closer at the idle connections and saw that many have been idle for hours (current time on server is &lt;code&gt;2015-11-25T20:20:42+0000&lt;/code&gt;):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | less -S
datid | datname | pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | xact_start |
-------+----------+-------+----------+----------+------------------+-------------+-----------------+-------------+-------------------------------+-------------------------------+---
20951 | cgspace | 10966 | 18205 | cgspace | | 127.0.0.1 | | 37731 | 2015-11-25 13:13:02.837624+00 | | 20
20951 | cgspace | 10967 | 18205 | cgspace | | 127.0.0.1 | | 37737 | 2015-11-25 13:13:03.069421+00 | | 20
...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;There is a relevant Jira issue about this: &lt;a href=&#34;https://jira.duraspace.org/browse/DS-1458&#34;&gt;https://jira.duraspace.org/browse/DS-1458&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;It seems there is some sense changing DSpace&amp;rsquo;s default &lt;code&gt;db.maxidle&lt;/code&gt; from unlimited (-1) to something like 8 (Tomcat default) or 10 (Confluence default)&lt;/li&gt;
&lt;li&gt;Change &lt;code&gt;db.maxidle&lt;/code&gt; from -1 to 10, reduce &lt;code&gt;db.maxconnections&lt;/code&gt; from 90 to 50, and restart postgres and tomcat7&lt;/li&gt;
&lt;li&gt;Also redeploy DSpace Test with a clean sync of CGSpace and mirror these database settings there as well&lt;/li&gt;
&lt;li&gt;Also deploy the nginx fixes for the &lt;code&gt;try_files&lt;/code&gt; location block as well as the expires block&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2015-11-26&#34;&gt;2015-11-26&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace behaving much better since changing &lt;code&gt;db.maxidle&lt;/code&gt; yesterday, but still two up/down notices from monitoring this morning (better than 50!)&lt;/li&gt;
&lt;li&gt;CCAFS colleagues mentioned that the REST API is very slow, 24 seconds for one item&lt;/li&gt;
&lt;li&gt;Not as bad for me, but still unsustainable if you have to get many:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl -o /dev/null -s -w %{time_total}\\n https://cgspace.cgiar.org/rest/handle/10568/32802?expand=all
8.415
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Monitoring e-mailed in the evening to say CGSpace was down&lt;/li&gt;
&lt;li&gt;Idle connections in PostgreSQL again:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | grep cgspace | grep -c idle
66
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;At the time, the current DSpace pool size was 50&amp;hellip;&lt;/li&gt;
&lt;li&gt;I reduced the pool back to the default of 30, and reduced the &lt;code&gt;db.maxidle&lt;/code&gt; settings from 10 to 8&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2015-11-29&#34;&gt;2015-11-29&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Still more alerts that CGSpace has been up and down all day&lt;/li&gt;
&lt;li&gt;Current database settings for DSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;db.maxconnections = 30
db.maxwait = 5000
db.maxidle = 8
db.statementpool = true
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And idle connections:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ psql -c &#39;SELECT * from pg_stat_activity;&#39; | grep cgspace | grep -c idle
49
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Perhaps I need to start drastically increasing the connection limits—like to 300—to see if DSpace&amp;rsquo;s thirst can ever be quenched&lt;/li&gt;
&lt;li&gt;On another note, SUNScholar&amp;rsquo;s notes suggest adjusting some other postgres variables: &lt;a href=&#34;http://wiki.lib.sun.ac.za/index.php/SUNScholar/Optimisations/Database&#34;&gt;http://wiki.lib.sun.ac.za/index.php/SUNScholar/Optimisations/Database&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;This might help with REST API speed (which I mentioned above and still need to do real tests)&lt;/li&gt;
&lt;/ul&gt;
</description>
</item>
</channel>
</rss>