cgspace-notes/public/index.xml

5105 lines
323 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>CGSpace Notes</title>
2016-10-03 17:28:33 +02:00
<link>https://alanorth.github.io/cgspace-notes/index.xml</link>
<description>Recent content on CGSpace Notes</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
2017-01-04 15:07:43 +01:00
<lastBuildDate>Mon, 02 Jan 2017 10:43:00 +0300</lastBuildDate>
2016-08-03 09:09:36 +02:00
<atom:link href="https://alanorth.github.io/cgspace-notes/index.xml" rel="self" type="application/rss+xml" />
2017-01-04 15:07:43 +01:00
<item>
<title>January, 2017</title>
<link>https://alanorth.github.io/cgspace-notes/2017-01/</link>
<pubDate>Mon, 02 Jan 2017 10:43:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2017-01/</guid>
<description>
&lt;h2 id=&#34;2017-01-02&#34;&gt;2017-01-02&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I checked to see if the Solr sharding task that is supposed to run on January 1st had run and saw there was an error&lt;/li&gt;
&lt;li&gt;I tested on DSpace Test as well and it doesn&amp;rsquo;t work there either&lt;/li&gt;
&lt;li&gt;I asked on the dspace-tech mailing list because it seems to be broken, and actually now I&amp;rsquo;m not sure if we&amp;rsquo;ve ever had the sharding task run successfully over all these years&lt;/li&gt;
&lt;/ul&gt;
2017-01-05 13:08:30 +01:00
&lt;h2 id=&#34;2017-01-04&#34;&gt;2017-01-04&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I tried to shard my local dev instance and it fails the same way:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ JAVA_OPTS=&amp;quot;-Xms768m -Xmx768m -Dfile.encoding=UTF-8&amp;quot; ~/dspace/bin/dspace stats-util -s
Moving: 9318 into core statistics-2016
Exception: IOException occured when talking to server at: http://localhost:8081/solr//statistics-2016
org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://localhost:8081/solr//statistics-2016
at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:566)
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.dspace.statistics.SolrLogger.shardSolrIndex(SourceFile:2291)
at org.dspace.statistics.util.StatisticsClient.main(StatisticsClient.java:106)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
Caused by: org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:867)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:448)
... 10 more
Caused by: org.apache.http.client.NonRepeatableRequestException: Cannot retry request with a non-repeatable request entity. The cause lists the reason the original request failed.
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:659)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:487)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
... 14 more
Caused by: java.net.SocketException: Broken pipe (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at org.apache.http.impl.io.AbstractSessionOutputBuffer.write(AbstractSessionOutputBuffer.java:181)
at org.apache.http.impl.io.ChunkedOutputStream.flushCacheWithAppend(ChunkedOutputStream.java:124)
at org.apache.http.impl.io.ChunkedOutputStream.write(ChunkedOutputStream.java:181)
at org.apache.http.entity.InputStreamEntity.writeTo(InputStreamEntity.java:132)
at org.apache.http.entity.HttpEntityWrapper.writeTo(HttpEntityWrapper.java:89)
at org.apache.http.impl.client.EntityEnclosingRequestWrapper$EntityWrapper.writeTo(EntityEnclosingRequestWrapper.java:108)
at org.apache.http.impl.entity.EntitySerializer.serialize(EntitySerializer.java:117)
at org.apache.http.impl.AbstractHttpClientConnection.sendRequestEntity(AbstractHttpClientConnection.java:265)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.sendRequestEntity(ManagedClientConnectionImpl.java:203)
at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:236)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:685)
... 16 more
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And the DSpace log shows:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2017-01-04 22:39:05,412 INFO org.dspace.statistics.SolrLogger @ Created core with name: statistics-2016
2017-01-04 22:39:05,412 INFO org.dspace.statistics.SolrLogger @ Moving: 9318 records into core statistics-2016
2017-01-04 22:39:07,310 INFO org.apache.http.impl.client.SystemDefaultHttpClient @ I/O exception (java.net.SocketException) caught when processing request to {}-&amp;gt;http://localhost:8081: Broken pipe (Write failed)
2017-01-04 22:39:07,310 INFO org.apache.http.impl.client.SystemDefaultHttpClient @ Retrying request to {}-&amp;gt;http://localhost:8081
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Despite failing instantly, a &lt;code&gt;statistics-2016&lt;/code&gt; directory was created, but it only has a data dir (no conf)&lt;/li&gt;
&lt;li&gt;The Tomcat access logs show more:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;127.0.0.1 - - [04/Jan/2017:22:39:05 +0200] &amp;quot;GET /solr/statistics/select?q=type%3A2+AND+id%3A1&amp;amp;wt=javabin&amp;amp;version=2 HTTP/1.1&amp;quot; 200 107
127.0.0.1 - - [04/Jan/2017:22:39:05 +0200] &amp;quot;GET /solr/statistics/select?q=*%3A*&amp;amp;rows=0&amp;amp;facet=true&amp;amp;facet.range=time&amp;amp;facet.range.start=NOW%2FYEAR-17YEARS&amp;amp;facet.range.end=NOW%2FYEAR%2B0YEARS&amp;amp;facet.range.gap=%2B1YEAR&amp;amp;facet.mincount=1&amp;amp;wt=javabin&amp;amp;version=2 HTTP/1.1&amp;quot; 200 423
127.0.0.1 - - [04/Jan/2017:22:39:05 +0200] &amp;quot;GET /solr/admin/cores?action=STATUS&amp;amp;core=statistics-2016&amp;amp;indexInfo=true&amp;amp;wt=javabin&amp;amp;version=2 HTTP/1.1&amp;quot; 200 77
127.0.0.1 - - [04/Jan/2017:22:39:05 +0200] &amp;quot;GET /solr/admin/cores?action=CREATE&amp;amp;name=statistics-2016&amp;amp;instanceDir=statistics&amp;amp;dataDir=%2FUsers%2Faorth%2Fdspace%2Fsolr%2Fstatistics-2016%2Fdata&amp;amp;wt=javabin&amp;amp;version=2 HTTP/1.1&amp;quot; 200 63
127.0.0.1 - - [04/Jan/2017:22:39:07 +0200] &amp;quot;GET /solr/statistics/select?csv.mv.separator=%7C&amp;amp;q=*%3A*&amp;amp;fq=time%3A%28%5B2016%5C-01%5C-01T00%5C%3A00%5C%3A00Z+TO+2017%5C-01%5C-01T00%5C%3A00%5C%3A00Z%5D+NOT+2017%5C-01%5C-01T00%5C%3A00%5C%3A00Z%29&amp;amp;rows=10000&amp;amp;wt=csv HTTP/1.1&amp;quot; 200 4359517
127.0.0.1 - - [04/Jan/2017:22:39:07 +0200] &amp;quot;GET /solr/statistics/admin/luke?show=schema&amp;amp;wt=javabin&amp;amp;version=2 HTTP/1.1&amp;quot; 200 16248
127.0.0.1 - - [04/Jan/2017:22:39:07 +0200] &amp;quot;POST /solr//statistics-2016/update/csv?commit=true&amp;amp;softCommit=false&amp;amp;waitSearcher=true&amp;amp;f.previousWorkflowStep.split=true&amp;amp;f.previousWorkflowStep.separator=%7C&amp;amp;f.previousWorkflowStep.encapsulator=%22&amp;amp;f.actingGroupId.split=true&amp;amp;f.actingGroupId.separator=%7C&amp;amp;f.actingGroupId.encapsulator=%22&amp;amp;f.containerCommunity.split=true&amp;amp;f.containerCommunity.separator=%7C&amp;amp;f.containerCommunity.encapsulator=%22&amp;amp;f.range.split=true&amp;amp;f.range.separator=%7C&amp;amp;f.range.encapsulator=%22&amp;amp;f.containerItem.split=true&amp;amp;f.containerItem.separator=%7C&amp;amp;f.containerItem.encapsulator=%22&amp;amp;f.p_communities_map.split=true&amp;amp;f.p_communities_map.separator=%7C&amp;amp;f.p_communities_map.encapsulator=%22&amp;amp;f.ngram_query_search.split=true&amp;amp;f.ngram_query_search.separator=%7C&amp;amp;f.ngram_query_search.encapsulator=%22&amp;amp;f.containerBitstream.split=true&amp;amp;f.containerBitstream.separator=%7C&amp;amp;f.containerBitstream.encapsulator=%22&amp;amp;f.owningItem.split=true&amp;amp;f.owningItem.separator=%7C&amp;amp;f.owningItem.encapsulator=%22&amp;amp;f.actingGroupParentId.split=true&amp;amp;f.actingGroupParentId.separator=%7C&amp;amp;f.actingGroupParentId.encapsulator=%22&amp;amp;f.text.split=true&amp;amp;f.text.separator=%7C&amp;amp;f.text.encapsulator=%22&amp;amp;f.simple_query_search.split=true&amp;amp;f.simple_query_search.separator=%7C&amp;amp;f.simple_query_search.encapsulator=%22&amp;amp;f.owningComm.split=true&amp;amp;f.owningComm.separator=%7C&amp;amp;f.owningComm.encapsulator=%22&amp;amp;f.owner.split=true&amp;amp;f.owner.separator=%7C&amp;amp;f.owner.encapsulator=%22&amp;amp;f.filterquery.split=true&amp;amp;f.filterquery.separator=%7C&amp;amp;f.filterquery.encapsulator=%22&amp;amp;f.p_group_map.split=true&amp;amp;f.p_group_map.separator=%7C&amp;amp;f.p_group_map.encapsulator=%22&amp;amp;f.actorMemberGroupId.split=true&amp;amp;f.actorMemberGroupId.separator=%7C&amp;amp;f.actorMemberGroupId.encapsulator=%22&amp;amp;f.bitstreamId.split=true&amp;amp;f.bitstreamId.separator=%7C&amp;amp;f.bitstreamId.encapsulator=%22&amp;amp;f.group_name.split=true&amp;amp;f.group_name.separator=%7C&amp;amp;f.group_name.encapsulator=%22&amp;amp;f.p_communities_name.split=true&amp;amp;f.p_communities_name.separator=%7C&amp;amp;f.p_communities_name.encapsulator=%22&amp;amp;f.query.split=true&amp;amp;f.query.separator=%7C&amp;amp;f.query.encapsulator=%22&amp;amp;f.workflowStep.split=true&amp;amp;f.workflowStep.separator=%7C&amp;amp;f.workflowStep.encapsulator=%22&amp;amp;f.containerCollection.split=true&amp;amp;f.containerCollection.separator=%7C&amp;amp;f.containerCollection.encapsulator=%22&amp;amp;f.complete_query_search.split=true&amp;amp;f.complete_query_search.separator=%7C&amp;amp;f.complete_query_search.encapsulator=%22&amp;amp;f.p_communities_id.split=true&amp;amp;f.p_communities_id.separator=%7C&amp;amp;f.p_communities_id.encapsulator=%22&amp;amp;f.rangeDescription.split=true&amp;amp;f.rangeDescription.separator=%7C&amp;amp;f.rangeDescription.encapsulator=%22&amp;amp;f.group_id.split=true&amp;amp;f.group_id.separator=%7C&amp;amp;f.group_id.encapsulator=%22&amp;amp;f.bundleName.split=true&amp;amp;f.bundleName.separator=%7C&amp;amp;f.bundleName.encapsulator=%22&amp;amp;f.ngram_simplequery_search.split=true&amp;amp;f.ngram_simplequery_search.separator=%7C&amp;amp;f.ngram_simplequery_search.encapsulator=%22&amp;amp;f.group_map.split=true&amp;amp;f.group_map.separator=%7C&amp;amp;f.group_map.encapsulator=%22&amp;amp;f.owningColl.split=true&amp;amp;f.owningColl.separator=%7C&amp;amp;f.owningColl.encapsulator=%22&amp;amp;f.p_group_id.split=true&amp;amp;f.p_group_id.separator=%7C&amp;amp;f.p_group_id.encapsulator=%22&amp;amp;f.p_group_name.split=true&amp;amp;f.p_group_name.separator=%7C&amp;amp;f.p_group_name.encapsulator=%22&amp;amp;wt=javabin&amp;amp;version=2 HTTP/1.1&amp;quot; 409 156
127.0.0.1 - - [04/Jan/2017:22:44:00 +0200] &amp;quot;POST /solr/datatables/update?wt=javabin&amp;amp;version=2 HTTP/1.1&amp;quot; 200 41
127.0.0.1 - - [04/Jan/2017:22:44:00 +0200] &amp;quot;POST /solr/datatables/update HTTP/1.1&amp;quot; 200 40
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Very interesting&amp;hellip; it creates the core and then fails somehow&lt;/li&gt;
&lt;/ul&gt;
2017-01-08 15:55:49 +01:00
&lt;h2 id=&#34;2017-01-08&#34;&gt;2017-01-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Put Sisay&amp;rsquo;s &lt;code&gt;item-view.xsl&lt;/code&gt; code to show mapped collections on CGSpace (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/295&#34;&gt;#295&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
2017-01-04 15:07:43 +01:00
</description>
</item>
2016-12-02 12:13:58 +01:00
<item>
<title>December, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-12/</link>
<pubDate>Fri, 02 Dec 2016 10:43:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-12/</guid>
<description>
&lt;h2 id=&#34;2016-12-02&#34;&gt;2016-12-02&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace was down for five hours in the morning while I was sleeping&lt;/li&gt;
&lt;li&gt;While looking in the logs for errors, I see tons of warnings about Atmire MQM:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-12-02 03:00:32,352 WARN com.atmire.metadataquality.batchedit.BatchEditConsumer @ BatchEditConsumer should not have been given this kind of Subject in an event, skipping: org.dspace.event.Event(eventType=CREATE, SubjectType=BUNDLE, SubjectID=70316, ObjectType=(Unknown), ObjectID=-1, TimeStamp=1480647632305, dispatcher=1544803905, detail=[null], transactionID=&amp;quot;TX157907838689377964651674089851855413607&amp;quot;)
2016-12-02 03:00:32,353 WARN com.atmire.metadataquality.batchedit.BatchEditConsumer @ BatchEditConsumer should not have been given this kind of Subject in an event, skipping: org.dspace.event.Event(eventType=MODIFY_METADATA, SubjectType=BUNDLE, SubjectID =70316, ObjectType=(Unknown), ObjectID=-1, TimeStamp=1480647632309, dispatcher=1544803905, detail=&amp;quot;dc.title&amp;quot;, transactionID=&amp;quot;TX157907838689377964651674089851855413607&amp;quot;)
2016-12-02 03:00:32,353 WARN com.atmire.metadataquality.batchedit.BatchEditConsumer @ BatchEditConsumer should not have been given this kind of Subject in an event, skipping: org.dspace.event.Event(eventType=ADD, SubjectType=ITEM, SubjectID=80044, Object Type=BUNDLE, ObjectID=70316, TimeStamp=1480647632311, dispatcher=1544803905, detail=&amp;quot;THUMBNAIL&amp;quot;, transactionID=&amp;quot;TX157907838689377964651674089851855413607&amp;quot;)
2016-12-02 03:00:32,353 WARN com.atmire.metadataquality.batchedit.BatchEditConsumer @ BatchEditConsumer should not have been given this kind of Subject in an event, skipping: org.dspace.event.Event(eventType=ADD, SubjectType=BUNDLE, SubjectID=70316, Obje ctType=BITSTREAM, ObjectID=86715, TimeStamp=1480647632318, dispatcher=1544803905, detail=&amp;quot;-1&amp;quot;, transactionID=&amp;quot;TX157907838689377964651674089851855413607&amp;quot;)
2016-12-02 03:00:32,353 WARN com.atmire.metadataquality.batchedit.BatchEditConsumer @ BatchEditConsumer should not have been given this kind of Subject in an event, skipping: org.dspace.event.Event(eventType=MODIFY, SubjectType=ITEM, SubjectID=80044, ObjectType=(Unknown), ObjectID=-1, TimeStamp=1480647632351, dispatcher=1544803905, detail=[null], transactionID=&amp;quot;TX157907838689377964651674089851855413607&amp;quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I see thousands of them in the logs for the last few months, so it&amp;rsquo;s not related to the DSpace 5.5 upgrade&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve raised a ticket with Atmire to ask&lt;/li&gt;
&lt;li&gt;Another worrying error from dspace.log is:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: com.atmire.statistics.generator.DSpaceObjectDatasetGenerator.toDatasetQuery(Lorg/dspace/core/Context;)Lcom/atmire/statistics/content/DatasetQuery;
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:972)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.dspace.app.xmlui.cocoon.DSpaceCocoonServletFilter.doFilter(DSpaceCocoonServletFilter.java:274)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.dspace.app.xmlui.cocoon.servlet.multipart.DSpaceMultipartFilter.doFilter(DSpaceMultipartFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:44)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionManagerValve.java:180)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: com.atmire.statistics.generator.DSpaceObjectDatasetGenerator.toDatasetQuery(Lorg/dspace/core/Context;)Lcom/atmire/statistics/content/DatasetQuery;
at com.atmire.statistics.generator.TopNDSODatasetGenerator.toDatasetQuery(SourceFile:39)
at com.atmire.statistics.display.StatisticsDataVisitsMultidata.createDataset(SourceFile:108)
at org.dspace.statistics.content.StatisticsDisplay.createDataset(SourceFile:384)
at org.dspace.statistics.content.StatisticsDisplay.getDataset(SourceFile:404)
at com.atmire.statistics.mostpopular.JSONStatsMostPopularGenerator.generateJsonData(SourceFile:170)
at com.atmire.statistics.mostpopular.JSONStatsMostPopularGenerator.generate(SourceFile:246)
at com.atmire.app.xmlui.aspect.statistics.JSONStatsMostPopular.generate(JSONStatsMostPopular.java:145)
at sun.reflect.GeneratedMethodAccessor296.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
at com.sun.proxy.$Proxy96.process(Unknown Source)
at org.apache.cocoon.components.treeprocessor.sitemap.ReadNode.invoke(ReadNode.java:94)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:247)
at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:247)
at org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:351)
at org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:169)
at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:468)
at org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:443)
at org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:264)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy89.service(Unknown Source)
at org.dspace.springmvc.CocoonView.render(CocoonView.java:113)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
... 35 more
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The first error I see in dspace.log this morning is:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-12-02 03:00:46,656 ERROR org.dspace.authority.AuthorityValueFinder @ anonymous::Error while retrieving AuthorityValue from solr:query\colon; id\colon;&amp;quot;b0b541c1-ec15-48bf-9209-6dbe8e338cdc&amp;quot;
org.apache.solr.client.solrj.SolrServerException: Server refused connection at: http://localhost:8081/solr/authority
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Looking through DSpace&amp;rsquo;s solr log I see that about 20 seconds before this, there were a few 30+ KiB solr queries&lt;/li&gt;
&lt;li&gt;The last logs here right before Solr became unresponsive (and right after I restarted it five hours later) were:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-12-02 03:00:42,606 INFO org.apache.solr.core.SolrCore @ [statistics] webapp=/solr path=/select params={q=containerItem:72828+AND+type:0&amp;amp;shards=localhost:8081/solr/statistics-2010,localhost:8081/solr/statistics&amp;amp;fq=-isInternal:true&amp;amp;fq=-(author_mtdt:&amp;quot;CGIAR\+Institutional\+Learning\+and\+Change\+Initiative&amp;quot;++AND+subject_mtdt:&amp;quot;PARTNERSHIPS&amp;quot;+AND+subject_mtdt:&amp;quot;RESEARCH&amp;quot;+AND+subject_mtdt:&amp;quot;AGRICULTURE&amp;quot;+AND+subject_mtdt:&amp;quot;DEVELOPMENT&amp;quot;++AND+iso_mtdt:&amp;quot;en&amp;quot;+)&amp;amp;rows=0&amp;amp;wt=javabin&amp;amp;version=2} hits=0 status=0 QTime=19
2016-12-02 08:28:23,908 INFO org.apache.solr.servlet.SolrDispatchFilter @ SolrDispatchFilter.init()
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;DSpace&amp;rsquo;s own Solr logs don&amp;rsquo;t give IP addresses, so I will have to enable Nginx&amp;rsquo;s logging of &lt;code&gt;/solr&lt;/code&gt; so I can see where this request came from&lt;/li&gt;
&lt;li&gt;I enabled logging of &lt;code&gt;/rest/&lt;/code&gt; and I think I&amp;rsquo;ll leave it on for good&lt;/li&gt;
2016-12-02 12:27:32 +01:00
&lt;li&gt;Also, the disk is nearly full because of log file issues, so I&amp;rsquo;m running some compression on DSpace logs&lt;/li&gt;
&lt;li&gt;Normally these stay uncompressed for a month just in case we need to look at them, so now I&amp;rsquo;ve just compressed anything older than 2 weeks so we can get some disk space back&lt;/li&gt;
2016-12-02 12:13:58 +01:00
&lt;/ul&gt;
2016-12-04 11:30:24 +01:00
&lt;h2 id=&#34;2016-12-04&#34;&gt;2016-12-04&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I got a weird report from the CGSpace checksum checker this morning&lt;/li&gt;
&lt;li&gt;It says 732 bitstreams have potential issues, for example:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;------------------------------------------------
Bitstream Id = 6
Process Start Date = Dec 4, 2016
Process End Date = Dec 4, 2016
Checksum Expected = a1d9eef5e2d85f50f67ce04d0329e96a
Checksum Calculated = a1d9eef5e2d85f50f67ce04d0329e96a
Result = Bitstream marked deleted in bitstream table
-----------------------------------------------
...
------------------------------------------------
Bitstream Id = 77581
Process Start Date = Dec 4, 2016
Process End Date = Dec 4, 2016
Checksum Expected = 9959301aa4ca808d00957dff88214e38
Checksum Calculated =
Result = The bitstream could not be found
-----------------------------------------------
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The first one seems ok, but I don&amp;rsquo;t know what to make of the second one&amp;hellip;&lt;/li&gt;
&lt;li&gt;I had a look and there is indeed no file with the second checksum in the assetstore (ie, looking in &lt;code&gt;[dspace-dir]/assetstore/99/59/30/...&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;For what it&amp;rsquo;s worth, there is no item on DSpace Test or S3 backups with that checksum either&amp;hellip;&lt;/li&gt;
2016-12-05 00:09:07 +01:00
&lt;li&gt;In other news, I&amp;rsquo;m looking at JVM settings from the Solr 4.10.2 release, from &lt;code&gt;bin/solr.in.sh&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# These GC settings have shown to work well for a number of common Solr workloads
GC_TUNE=&amp;quot;-XX:-UseSuperWord \
-XX:NewRatio=3 \
-XX:SurvivorRatio=4 \
-XX:TargetSurvivorRatio=90 \
-XX:MaxTenuringThreshold=8 \
-XX:+UseConcMarkSweepGC \
-XX:+UseParNewGC \
-XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 \
-XX:+CMSScavengeBeforeRemark \
-XX:PretenureSizeThreshold=64m \
-XX:CMSFullGCsBeforeCompaction=1 \
-XX:+UseCMSInitiatingOccupancyOnly \
-XX:CMSInitiatingOccupancyFraction=50 \
-XX:CMSTriggerPermRatio=80 \
-XX:CMSMaxAbortablePrecleanTime=6000 \
-XX:+CMSParallelRemarkEnabled \
-XX:+ParallelRefProcEnabled \
-XX:+AggressiveOpts&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I need to try these because they are recommended by the Solr project itself&lt;/li&gt;
&lt;li&gt;Also, as always, I need to read &lt;a href=&#34;https://wiki.apache.org/solr/ShawnHeisey&#34;&gt;Shawn Heisey&amp;rsquo;s wiki page on Solr&lt;/a&gt;&lt;/li&gt;
2016-12-04 11:30:24 +01:00
&lt;/ul&gt;
2016-12-05 14:47:10 +01:00
&lt;h2 id=&#34;2016-12-05&#34;&gt;2016-12-05&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I did some basic benchmarking on a local DSpace before and after the JVM settings above, but there wasn&amp;rsquo;t anything amazingly obvious&lt;/li&gt;
&lt;li&gt;I want to make the changes on DSpace Test and monitor the JVM heap graphs for a few days to see if they change the JVM GC patterns or anything (munin graphs)&lt;/li&gt;
&lt;li&gt;Spin up new CGSpace server on Linode&lt;/li&gt;
&lt;li&gt;I did a few traceroutes from Jordan and Kenya and it seems that Linode&amp;rsquo;s Frankfurt datacenter is a few less hops and perhaps less packet loss than the London one, so I put the new server in Frankfurt&lt;/li&gt;
&lt;li&gt;Do initial provisioning&lt;/li&gt;
2016-12-05 17:48:17 +01:00
&lt;li&gt;Atmire responded about the MQM warnings in the DSpace logs&lt;/li&gt;
&lt;li&gt;Apparently we need to change the batch edit consumers in &lt;code&gt;dspace/config/dspace.cfg&lt;/code&gt;:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;event.consumer.batchedit.filters = Community|Collection+Create
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I haven&amp;rsquo;t tested it yet, but I created a pull request: &lt;a href=&#34;https://github.com/ilri/DSpace/pull/289&#34;&gt;#289&lt;/a&gt;&lt;/li&gt;
2016-12-05 14:47:10 +01:00
&lt;/ul&gt;
2016-12-06 17:18:59 +01:00
&lt;h2 id=&#34;2016-12-06&#34;&gt;2016-12-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Some author authority corrections and name standardizations for Peter:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=&#39;b041f2f4-19e7-4113-b774-0439baabd197&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Mora Benard%&#39;;
UPDATE 11
dspace=# update metadatavalue set text_value = &#39;Hoek, Rein van der&#39;, authority=&#39;4d6cbce2-6fd5-4b43-9363-58d18e7952c9&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Hoek, R%&#39;;
UPDATE 36
dspace=# update metadatavalue set text_value = &#39;Hoek, Rein van der&#39;, authority=&#39;4d6cbce2-6fd5-4b43-9363-58d18e7952c9&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;%an der Hoek%&#39; and text_value !~ &#39;^.*W\.?$&#39;;
UPDATE 14
dspace=# update metadatavalue set authority=&#39;18349f29-61b1-44d7-ac60-89e55546e812&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Thorne, P%&#39;;
UPDATE 42
dspace=# update metadatavalue set authority=&#39;0d8369bb-57f7-4b2f-92aa-af820b183aca&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Thornton, P%&#39;;
UPDATE 360
dspace=# update metadatavalue set text_value=&#39;Grace, Delia&#39;, authority=&#39;0b4fcbc1-d930-4319-9b4d-ea1553cca70b&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
UPDATE 561
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Pay attention to the regex to prevent false positives in tricky cases with Dutch names!&lt;/li&gt;
&lt;li&gt;I will run these updates on DSpace Test and then force a Discovery reindex, and then run them on CGSpace next week&lt;/li&gt;
&lt;li&gt;More work on the KM4Dev Journal article&lt;/li&gt;
&lt;li&gt;In other news, it seems the batch edit patch is working, there are no more WARN errors in the logs and the batch edit seems to work&lt;/li&gt;
&lt;li&gt;I need to check the CGSpace logs to see if there are still errors there, and then deploy/monitor it there&lt;/li&gt;
&lt;li&gt;Paola from CCAFS mentioned she also has the &amp;ldquo;take task&amp;rdquo; bug on CGSpace&lt;/li&gt;
2016-12-07 12:55:16 +01:00
&lt;li&gt;Reading about &lt;a href=&#34;https://www.postgresql.org/docs/9.5/static/runtime-config-resource.html&#34;&gt;&lt;code&gt;shared_buffers&lt;/code&gt; in PostgreSQL configuration&lt;/a&gt; (default is 128MB)&lt;/li&gt;
&lt;li&gt;Looks like we have ~5GB of memory used by caches on the test server (after OS and JVM heap!), so we might as well bump up the buffers for Postgres&lt;/li&gt;
&lt;li&gt;The docs say a good starting point for a dedicated server is 25% of the system RAM, and our server isn&amp;rsquo;t dedicated (also runs Solr, which can benefit from OS cache) so let&amp;rsquo;s try 1024MB&lt;/li&gt;
&lt;li&gt;In other news, the authority reindexing keeps crashing (I was manually running it after the author updates above):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ time JAVA_OPTS=&amp;quot;-Xms768m -Xmx768m -Dfile.encoding=UTF-8&amp;quot; /home/dspacetest.cgiar.org/bin/dspace index-authority
Retrieving all data
Initialize org.dspace.authority.indexer.DSpaceAuthorityIndexer
Exception: null
java.lang.NullPointerException
at org.dspace.authority.AuthorityValueGenerator.generateRaw(AuthorityValueGenerator.java:82)
at org.dspace.authority.AuthorityValueGenerator.generate(AuthorityValueGenerator.java:39)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.prepareNextValue(DSpaceAuthorityIndexer.java:201)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:132)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:159)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.DSpaceAuthorityIndexer.hasMore(DSpaceAuthorityIndexer.java:144)
at org.dspace.authority.indexer.AuthorityIndexClient.main(AuthorityIndexClient.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:226)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:78)
real 8m39.913s
user 1m54.190s
sys 0m22.647s
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-12-07&#34;&gt;2016-12-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;For what it&amp;rsquo;s worth, after running the same SQL updates on my local test server, &lt;code&gt;index-authority&lt;/code&gt; runs and completes just fine&lt;/li&gt;
&lt;li&gt;I will have to test more&lt;/li&gt;
&lt;li&gt;Anyways, I noticed that some of the authority values I set actually have versions of author names we don&amp;rsquo;t want, ie &amp;ldquo;Grace, D.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;For example, do a Solr query for &amp;ldquo;first_name:Grace&amp;rdquo; and look at the results&lt;/li&gt;
&lt;li&gt;Querying that ID shows the fields that need to be changed:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;{
&amp;quot;responseHeader&amp;quot;: {
&amp;quot;status&amp;quot;: 0,
&amp;quot;QTime&amp;quot;: 1,
&amp;quot;params&amp;quot;: {
&amp;quot;q&amp;quot;: &amp;quot;id:0b4fcbc1-d930-4319-9b4d-ea1553cca70b&amp;quot;,
&amp;quot;indent&amp;quot;: &amp;quot;true&amp;quot;,
&amp;quot;wt&amp;quot;: &amp;quot;json&amp;quot;,
&amp;quot;_&amp;quot;: &amp;quot;1481102189244&amp;quot;
}
},
&amp;quot;response&amp;quot;: {
&amp;quot;numFound&amp;quot;: 1,
&amp;quot;start&amp;quot;: 0,
&amp;quot;docs&amp;quot;: [
{
&amp;quot;id&amp;quot;: &amp;quot;0b4fcbc1-d930-4319-9b4d-ea1553cca70b&amp;quot;,
&amp;quot;field&amp;quot;: &amp;quot;dc_contributor_author&amp;quot;,
&amp;quot;value&amp;quot;: &amp;quot;Grace, D.&amp;quot;,
&amp;quot;deleted&amp;quot;: false,
&amp;quot;creation_date&amp;quot;: &amp;quot;2016-11-10T15:13:40.318Z&amp;quot;,
&amp;quot;last_modified_date&amp;quot;: &amp;quot;2016-11-10T15:13:40.318Z&amp;quot;,
&amp;quot;authority_type&amp;quot;: &amp;quot;person&amp;quot;,
&amp;quot;first_name&amp;quot;: &amp;quot;D.&amp;quot;,
&amp;quot;last_name&amp;quot;: &amp;quot;Grace&amp;quot;
}
]
}
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I think I can just update the &lt;code&gt;value&lt;/code&gt;, &lt;code&gt;first_name&lt;/code&gt;, and &lt;code&gt;last_name&lt;/code&gt; fields&amp;hellip;&lt;/li&gt;
&lt;li&gt;The update syntax should be something like this, but I&amp;rsquo;m getting errors from Solr:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl &#39;localhost:8081/solr/authority/update?commit=true&amp;amp;wt=json&amp;amp;indent=true&#39; -H &#39;Content-type:application/json&#39; -d &#39;[{&amp;quot;id&amp;quot;:&amp;quot;1&amp;quot;,&amp;quot;price&amp;quot;:{&amp;quot;set&amp;quot;:100}}]&#39;
{
&amp;quot;responseHeader&amp;quot;:{
&amp;quot;status&amp;quot;:400,
&amp;quot;QTime&amp;quot;:0},
&amp;quot;error&amp;quot;:{
&amp;quot;msg&amp;quot;:&amp;quot;Unexpected character &#39;[&#39; (code 91) in prolog; expected &#39;&amp;lt;&#39;\n at [row,col {unknown-source}]: [1,1]&amp;quot;,
&amp;quot;code&amp;quot;:400}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;When I try using the XML format I get an error that the &lt;code&gt;updateLog&lt;/code&gt; needs to be configured for that core&lt;/li&gt;
&lt;li&gt;Maybe I can just remove the authority UUID from the records, run the indexing again so it creates a new one for each name variant, then match them correctly?&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=null, confidence=-1 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
UPDATE 561
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Then I&amp;rsquo;ll reindex discovery and authority and see how the authority Solr core looks&lt;/li&gt;
&lt;li&gt;After this, now there are authorities for some of the &amp;ldquo;Grace, D.&amp;rdquo; and &amp;ldquo;Grace, Delia&amp;rdquo; text_values in the database (the first version is actually the same authority that already exists in the core, so it was just added back to some text_values, but the second one is new):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl &#39;localhost:8081/solr/authority/select?q=id%3A18ea1525-2513-430a-8817-a834cd733fbc&amp;amp;wt=json&amp;amp;indent=true&#39;
{
&amp;quot;responseHeader&amp;quot;:{
&amp;quot;status&amp;quot;:0,
&amp;quot;QTime&amp;quot;:0,
&amp;quot;params&amp;quot;:{
&amp;quot;q&amp;quot;:&amp;quot;id:18ea1525-2513-430a-8817-a834cd733fbc&amp;quot;,
&amp;quot;indent&amp;quot;:&amp;quot;true&amp;quot;,
&amp;quot;wt&amp;quot;:&amp;quot;json&amp;quot;}},
&amp;quot;response&amp;quot;:{&amp;quot;numFound&amp;quot;:1,&amp;quot;start&amp;quot;:0,&amp;quot;docs&amp;quot;:[
{
&amp;quot;id&amp;quot;:&amp;quot;18ea1525-2513-430a-8817-a834cd733fbc&amp;quot;,
&amp;quot;field&amp;quot;:&amp;quot;dc_contributor_author&amp;quot;,
&amp;quot;value&amp;quot;:&amp;quot;Grace, Delia&amp;quot;,
&amp;quot;deleted&amp;quot;:false,
&amp;quot;creation_date&amp;quot;:&amp;quot;2016-12-07T10:54:34.356Z&amp;quot;,
&amp;quot;last_modified_date&amp;quot;:&amp;quot;2016-12-07T10:54:34.356Z&amp;quot;,
&amp;quot;authority_type&amp;quot;:&amp;quot;person&amp;quot;,
&amp;quot;first_name&amp;quot;:&amp;quot;Delia&amp;quot;,
&amp;quot;last_name&amp;quot;:&amp;quot;Grace&amp;quot;}]
}}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So now I could set them all to this ID and the name would be ok, but there has to be a better way!&lt;/li&gt;
&lt;li&gt;In this case it seems that since there were also two different IDs in the original database, I just picked the wrong one!&lt;/li&gt;
&lt;li&gt;Better to use:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace#= update metadatavalue set text_value=&#39;Grace, Delia&#39;, authority=&#39;bfa61d7c-7583-4175-991c-2e7315000f0c&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This proves that unifying author name varieties in authorities is easy, but fixing the name in the authority is tricky!&lt;/li&gt;
2016-12-07 12:58:00 +01:00
&lt;li&gt;Perhaps another way is to just add our own UUID to the authority field for the text_value we like, then re-index authority so they get synced from PostgreSQL to Solr, then set the other text_values to use that authority ID&lt;/li&gt;
2016-12-07 17:33:27 +01:00
&lt;li&gt;Deploy MQM WARN fix on CGSpace (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/289&#34;&gt;#289&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Deploy &amp;ldquo;take task&amp;rdquo; hack/fix on CGSpace (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/290&#34;&gt;#290&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;I ran the following author corrections and then reindexed discovery:&lt;/li&gt;
2016-12-06 17:18:59 +01:00
&lt;/ul&gt;
2016-12-07 17:33:27 +01:00
&lt;pre&gt;&lt;code&gt;update metadatavalue set authority=&#39;b041f2f4-19e7-4113-b774-0439baabd197&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Mora Benard%&#39;;
update metadatavalue set text_value = &#39;Hoek, Rein van der&#39;, authority=&#39;4d6cbce2-6fd5-4b43-9363-58d18e7952c9&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Hoek, R%&#39;;
update metadatavalue set text_value = &#39;Hoek, Rein van der&#39;, authority=&#39;4d6cbce2-6fd5-4b43-9363-58d18e7952c9&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;%an der Hoek%&#39; and text_value !~ &#39;^.*W\.?$&#39;;
update metadatavalue set authority=&#39;18349f29-61b1-44d7-ac60-89e55546e812&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Thorne, P%&#39;;
update metadatavalue set authority=&#39;0d8369bb-57f7-4b2f-92aa-af820b183aca&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Thornton, P%&#39;;
update metadatavalue set text_value=&#39;Grace, Delia&#39;, authority=&#39;bfa61d7c-7583-4175-991c-2e7315000f0c&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Grace, D%&#39;;
&lt;/code&gt;&lt;/pre&gt;
2016-12-09 18:17:40 +01:00
&lt;h2 id=&#34;2016-12-08&#34;&gt;2016-12-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Something weird happened and Peter Thorne&amp;rsquo;s names all ended up as &amp;ldquo;Thorne&amp;rdquo;, I guess because the original authority had that as its name value:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select distinct text_value, authority, confidence from metadatavalue where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;Thorne%&#39;;
text_value | authority | confidence
------------------+--------------------------------------+------------
Thorne, P.J. | 18349f29-61b1-44d7-ac60-89e55546e812 | 600
Thorne | 18349f29-61b1-44d7-ac60-89e55546e812 | 600
Thorne-Lyman, A. | 0781e13a-1dc8-4e3f-82e8-5c422b44a344 | -1
Thorne, M. D. | 54c52649-cefd-438d-893f-3bcef3702f07 | -1
Thorne, P.J | 18349f29-61b1-44d7-ac60-89e55546e812 | 600
Thorne, P. | 18349f29-61b1-44d7-ac60-89e55546e812 | 600
(6 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I generated a new UUID using &lt;code&gt;uuidgen | tr [A-Z] [a-z]&lt;/code&gt; and set it along with correct name variation for all records:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=&#39;b2f7603d-2fb5-4018-923a-c4ec8d85b3bb&#39;, text_value=&#39;Thorne, P.J.&#39; where resource_type_id=2 and metadata_field_id=3 and authority=&#39;18349f29-61b1-44d7-ac60-89e55546e812&#39;;
UPDATE 43
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Apparently we also need to normalize Phil Thornton&amp;rsquo;s names to &lt;code&gt;Thornton, Philip K.&lt;/code&gt;:
&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select distinct text_value, authority, confidence from metadatavalue where resource_type_id=2 and metadata_field_id=3 and text_value ~ &#39;^Thornton[,\.]? P.*&#39;;
text_value | authority | confidence
---------------------+--------------------------------------+------------
Thornton, P | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
Thornton, P K. | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
Thornton, P K | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
Thornton. P.K. | 3e1e6639-d4fb-449e-9fce-ce06b5b0f702 | -1
Thornton, P K . | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
Thornton, P.K. | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
Thornton, P.K | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
Thornton, Philip K | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
Thornton, Philip K. | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
Thornton, P. K. | 0d8369bb-57f7-4b2f-92aa-af820b183aca | 600
(10 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Seems his original authorities are using an incorrect version of the name so I need to generate another UUID and tie it to the correct name, then reindex:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=&#39;2df8136e-d8f4-4142-b58c-562337cab764&#39;, text_value=&#39;Thornton, Philip K.&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value ~ &#39;^Thornton[,\.]? P.*&#39;;
UPDATE 362
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;It seems that, when you are messing with authority and author text values in the database, it is better to run authority reindex first (postgres→solr authority core) and then Discovery reindex (postgres→solr Discovery core)&lt;/li&gt;
&lt;li&gt;Everything looks ok after authority and discovery reindex&lt;/li&gt;
&lt;li&gt;In other news, I think we should really be using more RAM for PostgreSQL&amp;rsquo;s &lt;code&gt;shared_buffers&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;The &lt;a href=&#34;https://www.postgresql.org/docs/9.5/static/runtime-config-resource.html&#34;&gt;PostgreSQL documentation&lt;/a&gt; recommends using 25% of the system&amp;rsquo;s RAM on dedicated systems, but we should use a bit less since we also have a massive JVM heap and also benefit from some RAM being used by the OS cache&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-12-09&#34;&gt;2016-12-09&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;More work on finishing rough draft of KM4Dev article&lt;/li&gt;
&lt;li&gt;Set PostgreSQL&amp;rsquo;s &lt;code&gt;shared_buffers&lt;/code&gt; on CGSpace to 10% of system RAM (1200MB)&lt;/li&gt;
2016-12-09 18:34:42 +01:00
&lt;li&gt;Run the following author corrections on CGSpace:&lt;/li&gt;
2016-12-09 18:17:40 +01:00
&lt;/ul&gt;
2016-12-09 18:34:42 +01:00
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=&#39;34df639a-42d8-4867-a3f2-1892075fcb3f&#39;, text_value=&#39;Thorne, P.J.&#39; where resource_type_id=2 and metadata_field_id=3 and authority=&#39;18349f29-61b1-44d7-ac60-89e55546e812&#39; or authority=&#39;021cd183-946b-42bb-964e-522ebff02993&#39;;
dspace=# update metadatavalue set authority=&#39;2df8136e-d8f4-4142-b58c-562337cab764&#39;, text_value=&#39;Thornton, Philip K.&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value ~ &#39;^Thornton[,\.]? P.*&#39;;
&lt;/code&gt;&lt;/pre&gt;
2016-12-09 18:38:34 +01:00
&lt;ul&gt;
&lt;li&gt;The authority IDs were different now than when I was looking a few days ago so I had to adjust them here&lt;/li&gt;
&lt;/ul&gt;
2016-12-11 15:07:48 +01:00
&lt;h2 id=&#34;2016-12-11&#34;&gt;2016-12-11&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;After enabling a sizable &lt;code&gt;shared_buffers&lt;/code&gt; for CGSpace&amp;rsquo;s PostgreSQL configuration the number of connections to the database dropped significantly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/12/postgres_bgwriter-week.png&#34; alt=&#34;postgres_bgwriter-week&#34; /&gt;
&lt;img src=&#34;2016/12/postgres_connections_ALL-week.png&#34; alt=&#34;postgres_connections_ALL-week&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Looking at CIAT records from last week again, they have a lot of double authors like:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;International Center for Tropical Agriculture::3026b1de-9302-4f3e-85ab-ef48da024eb2::600
International Center for Tropical Agriculture::3026b1de-9302-4f3e-85ab-ef48da024eb2::500
International Center for Tropical Agriculture::3026b1de-9302-4f3e-85ab-ef48da024eb2::0
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Some in the same &lt;code&gt;dc.contributor.author&lt;/code&gt; field, and some in others like &lt;code&gt;dc.contributor.author[en_US]&lt;/code&gt; etc&lt;/li&gt;
&lt;li&gt;Removing the duplicates in OpenRefine and uploading a CSV to DSpace says &amp;ldquo;no changes detected&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Seems like the only way to sortof clean these up would be to start in SQL:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select distinct text_value, authority, confidence from metadatavalue where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;International Center for Tropical Agriculture&#39;;
text_value | authority | confidence
-----------------------------------------------+--------------------------------------+------------
International Center for Tropical Agriculture | cc726b78-a2f4-4ee9-af98-855c2ea31c36 | -1
International Center for Tropical Agriculture | | 600
International Center for Tropical Agriculture | 3026b1de-9302-4f3e-85ab-ef48da024eb2 | 500
International Center for Tropical Agriculture | cc726b78-a2f4-4ee9-af98-855c2ea31c36 | 600
International Center for Tropical Agriculture | | -1
International Center for Tropical Agriculture | cc726b78-a2f4-4ee9-af98-855c2ea31c36 | 500
International Center for Tropical Agriculture | 3026b1de-9302-4f3e-85ab-ef48da024eb2 | 600
International Center for Tropical Agriculture | 3026b1de-9302-4f3e-85ab-ef48da024eb2 | -1
International Center for Tropical Agriculture | 3026b1de-9302-4f3e-85ab-ef48da024eb2 | 0
dspace=# update metadatavalue set authority=&#39;3026b1de-9302-4f3e-85ab-ef48da024eb2&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value = &#39;International Center for Tropical Agriculture&#39;;
UPDATE 1693
dspace=# update metadatavalue set authority=&#39;3026b1de-9302-4f3e-85ab-ef48da024eb2&#39;, text_value=&#39;International Center for Tropical Agriculture&#39;, confidence=600 where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;%CIAT%&#39;;
UPDATE 35
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Work on article for KM4Dev journal&lt;/li&gt;
&lt;/ul&gt;
2016-12-13 15:49:30 +01:00
&lt;h2 id=&#34;2016-12-13&#34;&gt;2016-12-13&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Checking in on CGSpace postgres stats again, looks like the &lt;code&gt;shared_buffers&lt;/code&gt; change from a few days ago really made a big impact:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/12/postgres_bgwriter-week-2016-12-13.png&#34; alt=&#34;postgres_bgwriter-week&#34; /&gt;
&lt;img src=&#34;2016/12/postgres_connections_ALL-week-2016-12-13.png&#34; alt=&#34;postgres_connections_ALL-week&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Looking at logs, it seems we need to evaluate which logs we keep and for how long&lt;/li&gt;
&lt;li&gt;Basically the only ones we &lt;em&gt;need&lt;/em&gt; are &lt;code&gt;dspace.log&lt;/code&gt; because those are used for legacy statistics (need to keep for 1 month)&lt;/li&gt;
&lt;li&gt;Other logs will be an issue because they don&amp;rsquo;t have date stamps&lt;/li&gt;
&lt;li&gt;I will add date stamps to the logs we&amp;rsquo;re storing from the tomcat7 user&amp;rsquo;s cron jobs at least, using: &lt;code&gt;$(date --iso-8601)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Would probably be better to make custom logrotate files for them in the future&lt;/li&gt;
&lt;li&gt;Clean up some unneeded log files from 2014 (they weren&amp;rsquo;t large, just don&amp;rsquo;t need them)&lt;/li&gt;
&lt;li&gt;So basically, new cron jobs for logs should look something like this:&lt;/li&gt;
&lt;li&gt;Find any file named &lt;code&gt;*.log*&lt;/code&gt; that isn&amp;rsquo;t &lt;code&gt;dspace.log*&lt;/code&gt;, isn&amp;rsquo;t already zipped, and is older than one day, and zip it:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# find /home/dspacetest.cgiar.org/log -regextype posix-extended -iregex &amp;quot;.*\.log.*&amp;quot; ! -iregex &amp;quot;.*dspace\.log.*&amp;quot; ! -iregex &amp;quot;.*\.(gz|lrz|lzo|xz)&amp;quot; ! -newermt &amp;quot;Yesterday&amp;quot; -exec schedtool -B -e ionice -c2 -n7 xz {} \;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Since there is &lt;code&gt;xzgrep&lt;/code&gt; and &lt;code&gt;xzless&lt;/code&gt; we can actually just zip them after one day, why not?!&lt;/li&gt;
&lt;li&gt;We can keep the zipped ones for two weeks just in case we need to look for errors, etc, and delete them after that&lt;/li&gt;
&lt;li&gt;I use &lt;code&gt;schedtool -B&lt;/code&gt; and &lt;code&gt;ionice -c2 -n7&lt;/code&gt; to set the CPU scheduling to &lt;code&gt;SCHED_BATCH&lt;/code&gt; and the IO to best effort which should, in theory, impact important system processes like Tomcat and PostgreSQL less&lt;/li&gt;
&lt;li&gt;When the tasks are running you can see that the policies do apply:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ schedtool $(ps aux | grep &amp;quot;xz /home&amp;quot; | grep -v grep | awk &#39;{print $2}&#39;) &amp;amp;&amp;amp; ionice -p $(ps aux | grep &amp;quot;xz /home&amp;quot; | grep -v grep | awk &#39;{print $2}&#39;)
PID 17049: PRIO 0, POLICY B: SCHED_BATCH , NICE 0, AFFINITY 0xf
best-effort: prio 7
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;All in all this should free up a few gigs (we were at 9.3GB free when I started)&lt;/li&gt;
&lt;li&gt;Next thing to look at is whether we need Tomcat&amp;rsquo;s access logs&lt;/li&gt;
2016-12-13 21:57:01 +01:00
&lt;li&gt;I just looked and it seems that we saved 10GB by zipping these logs&lt;/li&gt;
2016-12-14 13:47:51 +01:00
&lt;li&gt;Some users pointed out issues with the &amp;ldquo;most popular&amp;rdquo; stats on a community or collection&lt;/li&gt;
&lt;li&gt;This error appears in the logs when you try to view them:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-12-13 21:17:37,486 ERROR org.dspace.app.xmlui.cocoon.DSpaceCocoonServletFilter @ Serious Error Occurred Processing Request!
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoSuchMethodError: com.atmire.statistics.generator.DSpaceObjectDatasetGenerator.toDatasetQuery(Lorg/dspace/core/Context;)Lcom/atmire/statistics/content/DatasetQuery;
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:972)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.dspace.app.xmlui.cocoon.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.dspace.app.xmlui.cocoon.DSpaceCocoonServletFilter.doFilter(DSpaceCocoonServletFilter.java:274)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.dspace.app.xmlui.cocoon.servlet.multipart.DSpaceMultipartFilter.doFilter(DSpaceMultipartFilter.java:119)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.dspace.utils.servlet.DSpaceWebappServletFilter.doFilter(DSpaceWebappServletFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:221)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionManagerValve.java:180)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: com.atmire.statistics.generator.DSpaceObjectDatasetGenerator.toDatasetQuery(Lorg/dspace/core/Context;)Lcom/atmire/statistics/content/DatasetQuery;
at com.atmire.statistics.generator.TopNDSODatasetGenerator.toDatasetQuery(SourceFile:39)
at com.atmire.statistics.display.StatisticsDataVisitsMultidata.createDataset(SourceFile:108)
at org.dspace.statistics.content.StatisticsDisplay.createDataset(SourceFile:384)
at org.dspace.statistics.content.StatisticsDisplay.getDataset(SourceFile:404)
at com.atmire.statistics.mostpopular.JSONStatsMostPopularGenerator.generateJsonData(SourceFile:170)
at com.atmire.statistics.mostpopular.JSONStatsMostPopularGenerator.generate(SourceFile:246)
at com.atmire.app.xmlui.aspect.statistics.JSONStatsMostPopular.generate(JSONStatsMostPopular.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;It happens on development and production, so I will have to ask Atmire&lt;/li&gt;
&lt;li&gt;Most likely an issue with installation/configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-12-14&#34;&gt;2016-12-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Atmire sent a quick fix for the &lt;code&gt;last-update.txt&lt;/code&gt; file not found error&lt;/li&gt;
&lt;li&gt;After applying pull request &lt;a href=&#34;https://github.com/ilri/DSpace/pull/291&#34;&gt;#291&lt;/a&gt; on DSpace Test I no longer see the error in the logs after the &lt;code&gt;UpdateSolrStorageReports&lt;/code&gt; task runs&lt;/li&gt;
&lt;li&gt;Also, I&amp;rsquo;m toying with the idea of moving the &lt;code&gt;tomcat7&lt;/code&gt; user&amp;rsquo;s cron jobs to &lt;code&gt;/etc/cron.d&lt;/code&gt; so we can manage them in Ansible&lt;/li&gt;
&lt;li&gt;Made a pull request with a template for the cron jobs (&lt;a href=&#34;https://github.com/ilri/rmg-ansible-public/pull/75&#34;&gt;#75&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Testing SMTP from the new CGSpace server and it&amp;rsquo;s not working, I&amp;rsquo;ll have to tell James&lt;/li&gt;
2016-12-13 15:49:30 +01:00
&lt;/ul&gt;
2016-12-15 16:14:46 +01:00
&lt;h2 id=&#34;2016-12-15&#34;&gt;2016-12-15&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Start planning for server migration this weekend, letting users know&lt;/li&gt;
&lt;li&gt;I am trying to figure out what the process is to &lt;a href=&#34;http://handle.net/hnr_support.html&#34;&gt;update the server&amp;rsquo;s IP in the Handle system&lt;/a&gt;, and emailing the hdladmin account bounces(!)&lt;/li&gt;
&lt;li&gt;I will contact the Jane Euler directly as I know I&amp;rsquo;ve corresponded with her in the past&lt;/li&gt;
&lt;li&gt;She said that I should indeed just re-run the &lt;code&gt;[dspace]/bin/dspace make-handle-server&lt;/code&gt; command and submit the new &lt;code&gt;sitebndl.zip&lt;/code&gt; file to the CNRI website&lt;/li&gt;
&lt;li&gt;Also I was troubleshooting some workflow issues from Bizuwork&lt;/li&gt;
&lt;li&gt;I re-created the same scenario by adding a non-admin account and submitting an item, but I was able to successfully approve and commit it&lt;/li&gt;
&lt;li&gt;So it turns out it&amp;rsquo;s not a bug, it&amp;rsquo;s just that Peter was added as a reviewer/admin AFTER the items were submitted&lt;/li&gt;
&lt;li&gt;This is how DSpace works, and I need to ask if there is a way to override someone&amp;rsquo;s submission, as the other reviewer seems to not be paying attention, or has perhaps taken the item from the task pool?&lt;/li&gt;
2016-12-15 17:43:16 +01:00
&lt;li&gt;Run a batch edit to add &amp;ldquo;RANGELANDS&amp;rdquo; ILRI subject to all items containing the word &amp;ldquo;RANGELANDS&amp;rdquo; in their metadata for Peter Ballantyne&lt;/li&gt;
2016-12-15 16:14:46 +01:00
&lt;/ul&gt;
2016-12-15 17:43:16 +01:00
&lt;p&gt;&lt;img src=&#34;2016/12/batch-edit1.png&#34; alt=&#34;Select all items with &amp;quot;rangelands&amp;quot; in metadata&#34; /&gt;
&lt;img src=&#34;2016/12/batch-edit2.png&#34; alt=&#34;Add RANGELANDS ILRI subject&#34; /&gt;&lt;/p&gt;
2016-12-18 11:00:09 +01:00
&lt;h2 id=&#34;2016-12-18&#34;&gt;2016-12-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Add four new CRP subjects for 2017 and sort the input forms alphabetically (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/294&#34;&gt;#294&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Test the SMTP on the new server and it&amp;rsquo;s working&lt;/li&gt;
&lt;li&gt;Last week, when we asked CGNET to update the DNS records this weekend, they misunderstood and did it immediately&lt;/li&gt;
&lt;li&gt;We quickly told them to undo it, but I just realized they didn&amp;rsquo;t undo the IPv6 AAAA record!&lt;/li&gt;
&lt;li&gt;None of our users in African institutes will have IPv6, but some Europeans might, so I need to check if any submissions have been added since then&lt;/li&gt;
&lt;li&gt;Update some names and authorities in the database:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=&#39;5ff35043-942e-4d0a-b377-4daed6e3c1a3&#39;, confidence=600, text_value=&#39;Duncan, Alan&#39; where resource_type_id=2 and metadata_field_id=3 and text_value ~ &#39;^.*Duncan,? A.*&#39;;
UPDATE 204
dspace=# update metadatavalue set authority=&#39;46804b53-ea30-4a85-9ccf-b79a35816fa9&#39;, confidence=600, text_value=&#39;Mekonnen, Kindu&#39; where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;%Mekonnen, K%&#39;;
UPDATE 89
dspace=# update metadatavalue set authority=&#39;f840da02-26e7-4a74-b7ba-3e2b723f3684&#39;, confidence=600, text_value=&#39;Lukuyu, Ben A.&#39; where resource_type_id=2 and metadata_field_id=3 and text_value like &#39;%Lukuyu, B%&#39;;
UPDATE 140
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Generated a new UUID for Ben using &lt;code&gt;uuidgen | tr [A-Z] [a-z]&lt;/code&gt; as the one in Solr had his ORCID but the name format was incorrect&lt;/li&gt;
&lt;li&gt;In theory DSpace should be able to check names from ORCID and update the records in the database, but I find that this doesn&amp;rsquo;t work (see Jira bug &lt;a href=&#34;https://jira.duraspace.org/browse/DS-3302&#34;&gt;DS-3302&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;I need to run these updates along with the other one for CIAT that I found last week&lt;/li&gt;
&lt;li&gt;Enable OCSP stapling for hosts &amp;gt;= Ubuntu 16.04 in our Ansible playbooks (&lt;a href=&#34;https://github.com/ilri/rmg-ansible-public/pull/76&#34;&gt;#76&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Working for DSpace Test on the second response:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ openssl s_client -connect dspacetest.cgiar.org:443 -servername dspacetest.cgiar.org -tls1_2 -tlsextdebug -status
...
OCSP response: no response sent
$ openssl s_client -connect dspacetest.cgiar.org:443 -servername dspacetest.cgiar.org -tls1_2 -tlsextdebug -status
...
OCSP Response Data:
...
Cert Status: good
&lt;/code&gt;&lt;/pre&gt;
2016-12-19 07:11:51 +01:00
&lt;ul&gt;
&lt;li&gt;Migrate CGSpace to new server, roughly following these steps:&lt;/li&gt;
&lt;li&gt;On old server:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# service tomcat7 stop
# /home/backup/scripts/postgres_backup.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;On new server:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;# systemctl stop tomcat7
# rsync -4 -av --delete 178.79.187.182:/home/cgspace.cgiar.org/assetstore/ /home/cgspace.cgiar.org/assetstore/
# rsync -4 -av --delete 178.79.187.182:/home/backup/ /home/backup/
# rsync -4 -av --delete 178.79.187.182:/home/cgspace.cgiar.org/solr/ /home/cgspace.cgiar.org/solr
# su - postgres
$ dropdb cgspace
$ createdb -O cgspace --encoding=UNICODE cgspace
$ psql cgspace -c &#39;alter user cgspace createuser;&#39;
$ pg_restore -O -U cgspace -d cgspace -W -h localhost /home/backup/postgres/cgspace_2016-12-18.backup
$ psql cgspace -c &#39;alter user cgspace nocreateuser;&#39;
$ psql -U cgspace -f ~tomcat7/src/git/DSpace/dspace/etc/postgres/update-sequences.sql cgspace -h localhost
$ vacuumdb cgspace
$ psql cgspace
postgres=# \i /tmp/author-authority-updates-2016-12-11.sql
postgres=# \q
$ exit
# chown -R tomcat7:tomcat7 /home/cgspace.cgiar.org
# rsync -4 -av 178.79.187.182:/home/cgspace.cgiar.org/log/*.dat /home/cgspace.cgiar.org/log/
# rsync -4 -av 178.79.187.182:/home/cgspace.cgiar.org/log/dspace.log.2016-1[12]* /home/cgspace.cgiar.org/log/
# su - tomcat7
$ cd src/git/DSpace/dspace/target/dspace-installer
$ ant update clean_backups
$ exit
# systemctl start tomcat7
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;It took about twenty minutes and afterwards I had to check a few things, like:
&lt;ul&gt;
&lt;li&gt;check and enable systemd timer for let&amp;rsquo;s encrypt&lt;/li&gt;
&lt;li&gt;enable root cron jobs&lt;/li&gt;
&lt;li&gt;disable root cron jobs on old server after!&lt;/li&gt;
&lt;li&gt;enable tomcat7 cron jobs&lt;/li&gt;
&lt;li&gt;disable tomcat7 cron jobs on old server after!&lt;/li&gt;
&lt;li&gt;regenerate &lt;code&gt;sitebndl.zip&lt;/code&gt; with new IP for handle server and submit it to Handle.net&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
2016-12-24 12:56:23 +01:00
&lt;h2 id=&#34;2016-12-22&#34;&gt;2016-12-22&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Abenet wanted a CSV of the IITA community, but the web export doesn&amp;rsquo;t include the &lt;code&gt;dc.date.accessioned&lt;/code&gt; field&lt;/li&gt;
&lt;li&gt;I had to export it from the command line using the &lt;code&gt;-a&lt;/code&gt; flag:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ [dspace]/bin/dspace metadata-export -a -f /tmp/iita.csv -i 10568/68616
&lt;/code&gt;&lt;/pre&gt;
2016-12-28 11:35:40 +01:00
&lt;h2 id=&#34;2016-12-28&#34;&gt;2016-12-28&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;We&amp;rsquo;ve been getting two alerts per day about CPU usage on the new server from Linode&lt;/li&gt;
&lt;li&gt;These are caused by the batch jobs for Solr etc that run in the early morning hours&lt;/li&gt;
&lt;li&gt;The Linode default is to alert at 90% CPU usage for two hours, but I see the old server was at 150%, so maybe we just need to adjust it&lt;/li&gt;
&lt;li&gt;Speaking of the old server (linode01), I think we can decommission it now&lt;/li&gt;
&lt;li&gt;I checked the S3 logs on the new server (linode18) to make sure the backups have been running and everything looks good&lt;/li&gt;
&lt;li&gt;In other news, I was looking at the Munin graphs for PostgreSQL on the new server and it looks slightly worrying:&lt;/li&gt;
&lt;/ul&gt;
2017-01-08 15:55:49 +01:00
&lt;p&gt;&lt;img src=&#34;https://alanorth.github.io/cgspace-notes/cgspace-notes/2016/12/postgres_size_ALL-week.png&#34; alt=&#34;munin postgres stats&#34; /&gt;&lt;/p&gt;
2016-12-28 11:35:40 +01:00
&lt;ul&gt;
&lt;li&gt;I will have to check later why the size keeps increasing&lt;/li&gt;
&lt;/ul&gt;
2016-12-02 12:13:58 +01:00
</description>
</item>
2016-11-01 08:23:50 +01:00
<item>
<title>November, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-11/</link>
<pubDate>Tue, 01 Nov 2016 09:21:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-11/</guid>
<description>
2016-11-02 11:27:37 +01:00
&lt;h2 id=&#34;2016-11-01&#34;&gt;2016-11-01&lt;/h2&gt;
2016-11-01 08:23:50 +01:00
&lt;ul&gt;
2016-11-01 08:35:09 +01:00
&lt;li&gt;Add &lt;code&gt;dc.type&lt;/code&gt; to the output options for Atmire&amp;rsquo;s Listings and Reports module (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/286&#34;&gt;#286&lt;/a&gt;)&lt;/li&gt;
2016-11-01 08:23:50 +01:00
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/11/listings-and-reports.png&#34; alt=&#34;Listings and Reports with output type&#34; /&gt;&lt;/p&gt;
2016-11-02 11:27:37 +01:00
&lt;h2 id=&#34;2016-11-02&#34;&gt;2016-11-02&lt;/h2&gt;
&lt;ul&gt;
2016-11-06 12:47:08 +01:00
&lt;li&gt;Migrate DSpace Test to DSpace 5.5 (&lt;a href=&#34;https://gist.github.com/alanorth/61013895c6efe7095d7f81000953d1cf&#34;&gt;notes&lt;/a&gt;)&lt;/li&gt;
2016-11-02 11:27:37 +01:00
&lt;li&gt;Run all updates on DSpace Test and reboot the server&lt;/li&gt;
2016-11-02 12:51:42 +01:00
&lt;li&gt;Looks like the OAI bug from DSpace 5.1 that caused validation at Base Search to fail is now fixed and DSpace Test passes validation! (&lt;a href=&#34;https://github.com/ilri/DSpace/issues/63&#34;&gt;#63&lt;/a&gt;)&lt;/li&gt;
2016-11-02 16:19:02 +01:00
&lt;li&gt;Indexing Discovery on DSpace Test took 332 minutes, which is like five times as long as it usually takes&lt;/li&gt;
&lt;li&gt;At the end it appeared to finish correctly but there were lots of errors right after it finished:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-11-02 15:09:48,578 INFO com.atmire.dspace.discovery.AtmireSolrService @ Wrote Collection: 10568/76454 to Index
2016-11-02 15:09:48,584 INFO com.atmire.dspace.discovery.AtmireSolrService @ Wrote Community: 10568/3202 to Index
2016-11-02 15:09:48,589 INFO com.atmire.dspace.discovery.AtmireSolrService @ Wrote Collection: 10568/76455 to Index
2016-11-02 15:09:48,590 INFO com.atmire.dspace.discovery.AtmireSolrService @ Wrote Community: 10568/51693 to Index
2016-11-02 15:09:48,590 INFO org.dspace.discovery.IndexClient @ Done with indexing
2016-11-02 15:09:48,600 INFO com.atmire.dspace.discovery.AtmireSolrService @ Wrote Collection: 10568/76456 to Index
2016-11-02 15:09:48,613 INFO org.dspace.discovery.SolrServiceImpl @ Wrote Item: 10568/55536 to Index
2016-11-02 15:09:48,616 INFO com.atmire.dspace.discovery.AtmireSolrService @ Wrote Collection: 10568/76457 to Index
2016-11-02 15:09:48,634 ERROR com.atmire.dspace.discovery.AtmireSolrService @
java.lang.NullPointerException
at org.dspace.discovery.SearchUtils.getDiscoveryConfiguration(SourceFile:57)
at org.dspace.discovery.SolrServiceImpl.buildDocument(SolrServiceImpl.java:824)
at com.atmire.dspace.discovery.AtmireSolrService.indexContent(AtmireSolrService.java:821)
at com.atmire.dspace.discovery.AtmireSolrService.updateIndex(AtmireSolrService.java:898)
at org.dspace.discovery.SolrServiceImpl.createIndex(SolrServiceImpl.java:370)
at org.dspace.storage.rdbms.DatabaseUtils$ReindexerThread.run(DatabaseUtils.java:945)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;DSpace is still up, and a few minutes later I see the default DSpace indexer is still running&lt;/li&gt;
&lt;li&gt;Sure enough, looking back before the first one finished, I see output from both indexers interleaved in the log:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-11-02 15:09:28,545 INFO org.dspace.discovery.SolrServiceImpl @ Wrote Item: 10568/47242 to Index
2016-11-02 15:09:28,633 INFO org.dspace.discovery.SolrServiceImpl @ Wrote Item: 10568/60785 to Index
2016-11-02 15:09:28,678 INFO com.atmire.dspace.discovery.AtmireSolrService @ Processing (55695 of 55722): 43557
2016-11-02 15:09:28,688 INFO com.atmire.dspace.discovery.AtmireSolrService @ Processing (55703 of 55722): 34476
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I will raise a ticket with Atmire to ask them&lt;/li&gt;
2016-11-02 11:27:37 +01:00
&lt;/ul&gt;
2016-11-06 12:47:08 +01:00
&lt;h2 id=&#34;2016-11-06&#34;&gt;2016-11-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;After re-deploying and re-indexing I didn&amp;rsquo;t see the same issue, and the indexing completed in 85 minutes, which is about how long it is supposed to take&lt;/li&gt;
&lt;/ul&gt;
2016-11-07 15:46:42 +01:00
&lt;h2 id=&#34;2016-11-07&#34;&gt;2016-11-07&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Horrible one liner to get Linode ID from certain Ansible host vars:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ grep -A 3 contact_info * | grep -E &amp;quot;(Orth|Sisay|Peter|Daniel|Tsega)&amp;quot; | awk -F&#39;-&#39; &#39;{print $1}&#39; | grep linode | uniq | xargs grep linode_id
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I noticed some weird CRPs in the database, and they don&amp;rsquo;t show up in Discovery for some reason, perhaps the &lt;code&gt;:&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ll export these and fix them in batch:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# \copy (select distinct text_value, count(*) from metadatavalue where metadata_field_id=230 group by text_value order by count desc) to /tmp/crp.csv with csv;
COPY 22
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Test running the replacements:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i /tmp/CRPs.csv -f cg.contributor.crp -t correct -m 230 -d dspace -u dspace -p &#39;fuuu&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Add &lt;code&gt;AMR&lt;/code&gt; to ILRI subjects and remove one duplicate instance of IITA in author affiliations controlled vocabulary (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/288&#34;&gt;#288&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
2016-11-08 10:27:36 +01:00
&lt;h2 id=&#34;2016-11-08&#34;&gt;2016-11-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Atmire&amp;rsquo;s Listings and Reports module seems to be broken on DSpace 5.5&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/11/listings-and-reports-55.png&#34; alt=&#34;Listings and Reports broken in DSpace 5.5&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I&amp;rsquo;ve filed a ticket with Atmire&lt;/li&gt;
2016-11-08 11:44:29 +01:00
&lt;li&gt;Thinking about batch updates for ORCIDs and authors&lt;/li&gt;
&lt;li&gt;Playing with &lt;a href=&#34;https://github.com/moonlitesolutions/SolrClient&#34;&gt;SolrClient&lt;/a&gt; in Python to query Solr&lt;/li&gt;
&lt;li&gt;All records in the authority core are either &lt;code&gt;authority_type:orcid&lt;/code&gt; or &lt;code&gt;authority_type:person&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;There is a &lt;code&gt;deleted&lt;/code&gt; field and all items seem to be &lt;code&gt;false&lt;/code&gt;, but might be important sanity check to remember&lt;/li&gt;
&lt;li&gt;The way to go is probably to have a CSV of author names and authority IDs, then to batch update them in PostgreSQL&lt;/li&gt;
&lt;li&gt;Dump of the top ~200 authors in CGSpace:&lt;/li&gt;
2016-11-08 10:27:36 +01:00
&lt;/ul&gt;
2016-11-08 11:44:29 +01:00
&lt;pre&gt;&lt;code&gt;dspace=# \copy (select distinct text_value, count(*) from metadatavalue where metadata_field_id=3 group by text_value order by count desc limit 210) to /tmp/210-authors.csv with csv;
&lt;/code&gt;&lt;/pre&gt;
2016-11-09 12:11:16 +01:00
&lt;h2 id=&#34;2016-11-09&#34;&gt;2016-11-09&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;CGSpace crashed so I quickly ran system updates, applied one or two of the waiting changes from the &lt;code&gt;5_x-prod&lt;/code&gt; branch, and rebooted the server&lt;/li&gt;
&lt;li&gt;The error was &lt;code&gt;Timeout waiting for idle object&lt;/code&gt; but I haven&amp;rsquo;t looked into the Tomcat logs to see what happened&lt;/li&gt;
&lt;li&gt;Also, I ran the corrections for CRPs from earlier this week&lt;/li&gt;
&lt;/ul&gt;
2016-11-10 13:49:09 +01:00
&lt;h2 id=&#34;2016-11-10&#34;&gt;2016-11-10&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Helping Megan Zandstra and CIAT with some questions about the REST API&lt;/li&gt;
&lt;li&gt;Playing with &lt;code&gt;find-by-metadata-field&lt;/code&gt;, this works:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl -s -H &amp;quot;accept: application/json&amp;quot; -H &amp;quot;Content-Type: application/json&amp;quot; -X POST &amp;quot;http://localhost:8080/rest/items/find-by-metadata-field&amp;quot; -d &#39;{&amp;quot;key&amp;quot;: &amp;quot;cg.subject.ilri&amp;quot;,&amp;quot;value&amp;quot;: &amp;quot;SEEDS&amp;quot;}&#39;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;But the results are deceiving because metadata fields can have text languages and your query must match exactly!&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select distinct text_value, text_lang from metadatavalue where resource_type_id=2 and metadata_field_id=203 and text_value=&#39;SEEDS&#39;;
text_value | text_lang
------------+-----------
SEEDS |
SEEDS |
SEEDS | en_US
(3 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So basically, the text language here could be null, blank, or en_US&lt;/li&gt;
&lt;li&gt;To query metadata with these properties, you can do:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl -s -H &amp;quot;accept: application/json&amp;quot; -H &amp;quot;Content-Type: application/json&amp;quot; -X POST &amp;quot;http://localhost:8080/rest/items/find-by-metadata-field&amp;quot; -d &#39;{&amp;quot;key&amp;quot;: &amp;quot;cg.subject.ilri&amp;quot;,&amp;quot;value&amp;quot;: &amp;quot;SEEDS&amp;quot;}&#39; | jq length
55
$ curl -s -H &amp;quot;accept: application/json&amp;quot; -H &amp;quot;Content-Type: application/json&amp;quot; -X POST &amp;quot;http://localhost:8080/rest/items/find-by-metadata-field&amp;quot; -d &#39;{&amp;quot;key&amp;quot;: &amp;quot;cg.subject.ilri&amp;quot;,&amp;quot;value&amp;quot;: &amp;quot;SEEDS&amp;quot;, &amp;quot;language&amp;quot;:&amp;quot;&amp;quot;}&#39; | jq length
34
$ curl -s -H &amp;quot;accept: application/json&amp;quot; -H &amp;quot;Content-Type: application/json&amp;quot; -X POST &amp;quot;http://localhost:8080/rest/items/find-by-metadata-field&amp;quot; -d &#39;{&amp;quot;key&amp;quot;: &amp;quot;cg.subject.ilri&amp;quot;,&amp;quot;value&amp;quot;: &amp;quot;SEEDS&amp;quot;, &amp;quot;language&amp;quot;:&amp;quot;en_US&amp;quot;}&#39; | jq length
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;The results (55+34=89) don&amp;rsquo;t seem to match those from the database:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select count(text_value) from metadatavalue where resource_type_id=2 and metadata_field_id=203 and text_value=&#39;SEEDS&#39; and text_lang is null;
count
-------
15
dspace=# select count(text_value) from metadatavalue where resource_type_id=2 and metadata_field_id=203 and text_value=&#39;SEEDS&#39; and text_lang=&#39;&#39;;
count
-------
4
dspace=# select count(text_value) from metadatavalue where resource_type_id=2 and metadata_field_id=203 and text_value=&#39;SEEDS&#39; and text_lang=&#39;en_US&#39;;
count
-------
66
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;So, querying from the API I get 55 + 34 = 89 results, but the database actually only has 85&amp;hellip;&lt;/li&gt;
&lt;li&gt;And the &lt;code&gt;find-by-metadata-field&lt;/code&gt; endpoint doesn&amp;rsquo;t seem to have a way to get all items with the field, or a wildcard value&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ll ask a question on the dspace-tech mailing list&lt;/li&gt;
&lt;li&gt;And speaking of &lt;code&gt;text_lang&lt;/code&gt;, this is interesting:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# select distinct text_lang from metadatavalue where resource_type_id=2;
text_lang
-----------
ethnob
en
spa
EN
es
frn
en_
en_US
EN_US
eng
en_U
fr
(14 rows)
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
2016-11-14 08:27:03 +01:00
&lt;li&gt;Generate a list of all these so I can maybe fix them in batch:&lt;/li&gt;
2016-11-10 13:49:09 +01:00
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# \copy (select distinct text_lang, count(*) from metadatavalue where resource_type_id=2 group by text_lang order by count desc) to /tmp/text-langs.csv with csv;
COPY 14
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Perhaps we need to fix them all in batch, or experiment with fixing only certain metadatavalues:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set text_lang=&#39;en_US&#39; where resource_type_id=2 and metadata_field_id=203 and text_value=&#39;SEEDS&#39;;
UPDATE 85
&lt;/code&gt;&lt;/pre&gt;
2016-11-14 08:27:03 +01:00
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;fix-metadata.py&lt;/code&gt; script I have is meant for specific metadata values, so if I want to update some &lt;code&gt;text_lang&lt;/code&gt; values I should just do it directly in the database&lt;/li&gt;
&lt;li&gt;For example, on a limited set:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set text_lang=NULL where resource_type_id=2 and metadata_field_id=203 and text_value=&#39;LIVESTOCK&#39; and text_lang=&#39;&#39;;
UPDATE 420
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And assuming I want to do it for all fields:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set text_lang=NULL where resource_type_id=2 and text_lang=&#39;&#39;;
UPDATE 183726
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;After that restarted Tomcat and PostgreSQL (because I&amp;rsquo;m superstitious about caches) and now I see the following in REST API query:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ curl -s -H &amp;quot;accept: application/json&amp;quot; -H &amp;quot;Content-Type: application/json&amp;quot; -X POST &amp;quot;http://localhost:8080/rest/items/find-by-metadata-field&amp;quot; -d &#39;{&amp;quot;key&amp;quot;: &amp;quot;cg.subject.ilri&amp;quot;,&amp;quot;value&amp;quot;: &amp;quot;SEEDS&amp;quot;}&#39; | jq length
71
$ curl -s -H &amp;quot;accept: application/json&amp;quot; -H &amp;quot;Content-Type: application/json&amp;quot; -X POST &amp;quot;http://localhost:8080/rest/items/find-by-metadata-field&amp;quot; -d &#39;{&amp;quot;key&amp;quot;: &amp;quot;cg.subject.ilri&amp;quot;,&amp;quot;value&amp;quot;: &amp;quot;SEEDS&amp;quot;, &amp;quot;language&amp;quot;:&amp;quot;&amp;quot;}&#39; | jq length
0
$ curl -s -H &amp;quot;accept: application/json&amp;quot; -H &amp;quot;Content-Type: application/json&amp;quot; -X POST &amp;quot;http://localhost:8080/rest/items/find-by-metadata-field&amp;quot; -d &#39;{&amp;quot;key&amp;quot;: &amp;quot;cg.subject.ilri&amp;quot;,&amp;quot;value&amp;quot;: &amp;quot;SEEDS&amp;quot;, &amp;quot;language&amp;quot;:&amp;quot;en_US&amp;quot;}&#39; | jq length
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Not sure what&amp;rsquo;s going on, but Discovery shows 83 values, and database shows 85, so I&amp;rsquo;m going to reindex Discovery just in case&lt;/li&gt;
&lt;/ul&gt;
2016-11-14 11:57:45 +01:00
&lt;h2 id=&#34;2016-11-14&#34;&gt;2016-11-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I applied Atmire&amp;rsquo;s suggestions to fix Listings and Reports for DSpace 5.5 and now it works&lt;/li&gt;
&lt;li&gt;There were some issues with the &lt;code&gt;dspace/modules/jspui/pom.xml&lt;/code&gt;, which is annoying because all I did was rebase our working 5.1 code on top of 5.5, meaning Atmire&amp;rsquo;s installation procedure must have changed&lt;/li&gt;
2016-11-14 20:48:55 +01:00
&lt;li&gt;So there is apparently this Tomcat native way to limit web crawlers to one session: &lt;a href=&#34;https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Crawler_Session_Manager_Valve&#34;&gt;Crawler Session Manager&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;After adding that to &lt;code&gt;server.xml&lt;/code&gt; bots matching the pattern in the configuration will all use ONE session, just like normal users:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ http --print h https://dspacetest.cgiar.org &#39;User-Agent:Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)&#39;
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Language: en-US
Content-Type: text/html;charset=utf-8
Date: Mon, 14 Nov 2016 19:47:29 GMT
Server: nginx
Set-Cookie: JSESSIONID=323694E079A53D5D024F839290EDD7E8; Path=/; Secure; HttpOnly
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Cocoon-Version: 2.2.0
X-Robots-Tag: none
$ http --print h https://dspacetest.cgiar.org &#39;User-Agent:Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)&#39;
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Language: en-US
Content-Type: text/html;charset=utf-8
Date: Mon, 14 Nov 2016 19:47:35 GMT
Server: nginx
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Cocoon-Version: 2.2.0
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
2016-11-15 10:29:24 +01:00
&lt;li&gt;The first one gets a session, and any after thatwithin 60 secondswill be internally mapped to the same session by Tomcat&lt;/li&gt;
2016-11-14 20:48:55 +01:00
&lt;li&gt;This means that when Google or Baidu slam you with tens of concurrent connections they will all map to ONE internal session, which saves RAM!&lt;/li&gt;
2016-11-14 11:57:45 +01:00
&lt;/ul&gt;
2016-11-15 10:29:24 +01:00
&lt;h2 id=&#34;2016-11-15&#34;&gt;2016-11-15&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The Tomcat JVM heap looks really good after applying the Crawler Session Manager fix on DSpace Test last night:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/11/dspacetest-tomcat-jvm-day.png&#34; alt=&#34;Tomcat JVM heap (day) after setting up the Crawler Session Manager&#34; /&gt;
&lt;img src=&#34;2016/11/dspacetest-tomcat-jvm-week.png&#34; alt=&#34;Tomcat JVM heap (week) after setting up the Crawler Session Manager&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Seems the default regex doesn&amp;rsquo;t catch Baidu, though:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ http --print h https://dspacetest.cgiar.org &#39;User-Agent:Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)&#39;
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Language: en-US
Content-Type: text/html;charset=utf-8
Date: Tue, 15 Nov 2016 08:49:54 GMT
Server: nginx
Set-Cookie: JSESSIONID=131409D143E8C01DE145C50FC748256E; Path=/; Secure; HttpOnly
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Cocoon-Version: 2.2.0
$ http --print h https://dspacetest.cgiar.org &#39;User-Agent:Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)&#39;
HTTP/1.1 200 OK
Connection: keep-alive
Content-Encoding: gzip
Content-Language: en-US
Content-Type: text/html;charset=utf-8
Date: Tue, 15 Nov 2016 08:49:59 GMT
Server: nginx
Set-Cookie: JSESSIONID=F6403C084480F765ED787E41D2521903; Path=/; Secure; HttpOnly
Transfer-Encoding: chunked
Vary: Accept-Encoding
X-Cocoon-Version: 2.2.0
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Adding Baiduspider to the list of user agents seems to work, and the final configuration should be:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;!-- Crawler Session Manager Valve helps mitigate damage done by web crawlers --&amp;gt;
&amp;lt;Valve className=&amp;quot;org.apache.catalina.valves.CrawlerSessionManagerValve&amp;quot;
crawlerUserAgents=&amp;quot;.*[bB]ot.*|.*Yahoo! Slurp.*|.*Feedfetcher-Google.*|.*Baiduspider.*&amp;quot; /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Looking at the bots that were active yesterday it seems the above regex should be sufficient:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ grep -o -E &#39;Mozilla/5\.0 \(compatible;.*\&amp;quot;&#39; /var/log/nginx/access.log | sort | uniq
Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)&amp;quot; &amp;quot;-&amp;quot;
Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)&amp;quot; &amp;quot;-&amp;quot;
Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)&amp;quot; &amp;quot;-&amp;quot;
Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots)&amp;quot; &amp;quot;-&amp;quot;
Mozilla/5.0 (compatible; YandexImages/3.0; +http://yandex.com/bots)&amp;quot; &amp;quot;-&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
2016-11-15 14:11:47 +01:00
&lt;ul&gt;
&lt;li&gt;Neat maven trick to exclude some modules from being built:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ mvn -U -Dmirage2.on=true -Dmirage2.deps.included=false -Denv=localhost -P \!dspace-lni,\!dspace-rdf,\!dspace-sword,\!dspace-swordv2 clean package
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;We absolutely don&amp;rsquo;t use those modules, so we shouldn&amp;rsquo;t build them in the first place&lt;/li&gt;
&lt;/ul&gt;
2016-11-17 14:59:59 +01:00
&lt;h2 id=&#34;2016-11-17&#34;&gt;2016-11-17&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Generate a list of journal titles for Peter and Abenet to look through so we can make a controlled vocabulary out of them:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# \copy (select distinct text_value, count(*) from metadatavalue where resource_type_id=2 and metadata_field_id=55 group by text_value order by count desc) to /tmp/journal-titles.csv with csv;
COPY 2515
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Send a message to users of the CGSpace REST API to notify them of upcoming upgrade so they can test their apps against DSpace Test&lt;/li&gt;
&lt;li&gt;Test an update old, non-HTTPS links to the CCAFS website in CGSpace metadata:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set text_value = regexp_replace(text_value, &#39;http://ccafs.cgiar.org&#39;,&#39;https://ccafs.cgiar.org&#39;) where resource_type_id=2 and text_value like &#39;%http://ccafs.cgiar.org%&#39;;
UPDATE 164
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;http://ccafs.cgiar.org&#39;,&#39;https://ccafs.cgiar.org&#39;) where resource_type_id=2 and text_value like &#39;%http://ccafs.cgiar.org%&#39;;
UPDATE 7
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Had to run it twice to get all (not sure about &amp;ldquo;global&amp;rdquo; regex in PostgreSQL)&lt;/li&gt;
&lt;li&gt;Run the updates on CGSpace as well&lt;/li&gt;
&lt;li&gt;Run through some collections and manually regenerate some PDF thumbnails for items from before 2016 on DSpace Test to compare with CGSpace&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;m debating forcing the re-generation of ALL thumbnails, since some come from DSpace 3 and 4 when the thumbnailing wasn&amp;rsquo;t as good&lt;/li&gt;
&lt;li&gt;The results were very good, I think that after we upgrade to 5.5 I will do it, perhaps one community / collection at a time:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ [dspace]/bin/dspace filter-media -f -i 10568/67156 -p &amp;quot;ImageMagick PDF Thumbnail&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;In related news, I&amp;rsquo;m looking at thumbnails of thumbnails (the ones we uploaded manually before, and now DSpace&amp;rsquo;s media filter has made thumbnails of THEM):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select text_value from metadatavalue where text_value like &#39;%.jpg.jpg&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I&amp;rsquo;m not sure if there&amp;rsquo;s anything we can do, actually, because we would have to remove those from the thumbnail bundles, and replace them with the regular JPGs from the content bundle, and then remove them from the assetstore&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
2016-11-20 10:05:29 +01:00
&lt;h2 id=&#34;2016-11-18&#34;&gt;2016-11-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Enable Tomcat Crawler Session Manager on CGSpace&lt;/li&gt;
&lt;/ul&gt;
2016-11-21 16:17:43 +01:00
2016-11-23 15:27:59 +01:00
&lt;h2 id=&#34;2016-11-21&#34;&gt;2016-11-21&lt;/h2&gt;
2016-11-21 16:17:43 +01:00
&lt;ul&gt;
&lt;li&gt;More work on Ansible playbooks for PostgreSQL 9.3→9.5 and Java 7→8 work&lt;/li&gt;
&lt;li&gt;CGSpace virtual managers meeting&lt;/li&gt;
2016-11-21 16:27:55 +01:00
&lt;li&gt;I need to look into making the item thumbnail clickable&lt;/li&gt;
2016-11-24 14:17:06 +01:00
&lt;li&gt;Macaroni Bros said they tested the DSpace Test (DSpace 5.5) REST API for CCAFS and WLE sites and it works as expected&lt;/li&gt;
2016-11-21 16:17:43 +01:00
&lt;/ul&gt;
2016-11-23 15:27:59 +01:00
&lt;h2 id=&#34;2016-11-23&#34;&gt;2016-11-23&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Upgrade Java from 7 to 8 on CGSpace&lt;/li&gt;
&lt;li&gt;I had started planning the inplace PostgreSQL 9.3→9.5 upgrade but decided that I will have to &lt;code&gt;pg_dump&lt;/code&gt; and &lt;code&gt;pg_restore&lt;/code&gt; when I move to the new server soon anyways, so there&amp;rsquo;s no need to upgrade the database right now&lt;/li&gt;
&lt;li&gt;Chat with Carlos about CGCore and the CGSpace metadata registry&lt;/li&gt;
&lt;li&gt;Dump CGSpace metadata field registry for Carlos: &lt;a href=&#34;https://gist.github.com/alanorth/8cbd0bb2704d4bbec78025b4742f8e70&#34;&gt;https://gist.github.com/alanorth/8cbd0bb2704d4bbec78025b4742f8e70&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Send some feedback to Carlos on CG Core so they can better understand how DSpace/CGSpace uses metadata&lt;/li&gt;
&lt;li&gt;Notes about PostgreSQL tuning from James: &lt;a href=&#34;https://paste.fedoraproject.org/488776/14798952/&#34;&gt;https://paste.fedoraproject.org/488776/14798952/&lt;/a&gt;&lt;/li&gt;
2016-11-24 14:17:06 +01:00
&lt;li&gt;Play with Creative Commons stuff in DSpace submission step&lt;/li&gt;
&lt;li&gt;It seems to work but it doesn&amp;rsquo;t let you choose a version of CC (like 4.0), and we would need to customize the XMLUI item display so it doesn&amp;rsquo;t display the gross CC badges&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-11-24&#34;&gt;2016-11-24&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Bizuwork was testing DSpace Test on DSPace 5.5 and noticed that the Listings and Reports module seems to be case sensitive, whereas CGSpace&amp;rsquo;s Listings and Reports isn&amp;rsquo;t (ie, a search for &amp;ldquo;orth, alan&amp;rdquo; vs &amp;ldquo;Orth, Alan&amp;rdquo; returns the same results on CGSpace, but different on DSpace Test)&lt;/li&gt;
&lt;li&gt;I have raised a ticket with Atmire&lt;/li&gt;
2016-11-27 09:05:11 +01:00
&lt;li&gt;Looks like this issue is actually the new Listings and Reports module honoring the Solr search queries more correctly&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-11-27&#34;&gt;2016-11-27&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run system updates on DSpace Test and reboot the server&lt;/li&gt;
&lt;li&gt;Deploy DSpace 5.5 on CGSpace:
&lt;ul&gt;
&lt;li&gt;maven package&lt;/li&gt;
&lt;li&gt;stop tomcat&lt;/li&gt;
&lt;li&gt;backup postgresql&lt;/li&gt;
&lt;li&gt;run Atmire 5.5 schema deletions&lt;/li&gt;
&lt;li&gt;delete the deployed spring folder&lt;/li&gt;
&lt;li&gt;ant update&lt;/li&gt;
&lt;li&gt;run system updates&lt;/li&gt;
&lt;li&gt;reboot server&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Need to do updates for ansible infrastructure role defaults, and switch the GitHub branch to the new 5.5 one&lt;/li&gt;
2016-11-28 15:26:18 +01:00
&lt;li&gt;Testing DSpace 5.5 on CGSpace, it seems CUA&amp;rsquo;s export as XLS works for Usage statistics, but not Content statistics&lt;/li&gt;
&lt;li&gt;I will raise a bug with Atmire&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-11-28&#34;&gt;2016-11-28&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;One user says they are still getting a blank page when he logs in (just CGSpace header, but no community list)&lt;/li&gt;
&lt;li&gt;Looking at the Catlina logs I see there is some super long-running indexing process going on:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;INFO: FrameworkServlet &#39;oai&#39;: initialization completed in 2600 ms
[&amp;gt; ] 0% time remaining: Calculating... timestamp: 2016-11-28 03:00:18
[&amp;gt; ] 0% time remaining: 11 hour(s) 57 minute(s) 46 seconds. timestamp: 2016-11-28 03:00:19
[&amp;gt; ] 0% time remaining: 23 hour(s) 4 minute(s) 28 seconds. timestamp: 2016-11-28 03:00:19
[&amp;gt; ] 0% time remaining: 15 hour(s) 35 minute(s) 23 seconds. timestamp: 2016-11-28 03:00:19
[&amp;gt; ] 0% time remaining: 14 hour(s) 5 minute(s) 56 seconds. timestamp: 2016-11-28 03:00:19
[&amp;gt; ] 0% time remaining: 11 hour(s) 23 minute(s) 49 seconds. timestamp: 2016-11-28 03:00:19
[&amp;gt; ] 0% time remaining: 11 hour(s) 21 minute(s) 57 seconds. timestamp: 2016-11-28 03:00:20
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;It says OAI, and seems to start at 3:00 AM, but I only see the &lt;code&gt;filter-media&lt;/code&gt; cron job set to start then&lt;/li&gt;
&lt;li&gt;Double checking the &lt;a href=&#34;https://wiki.duraspace.org/display/DSDOC5x/Upgrading+DSpace&#34;&gt;DSpace 5.x upgrade notes&lt;/a&gt; for anything I missed, or troubleshooting tips&lt;/li&gt;
&lt;li&gt;Running some manual processes just in case:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ /home/dspacetest.cgiar.org/bin/dspace registry-loader -metadata /home/dspacetest.cgiar.org/config/registries/dcterms-types.xml
$ /home/dspacetest.cgiar.org/bin/dspace registry-loader -metadata /home/dspacetest.cgiar.org/config/registries/dublin-core-types.xml
$ /home/dspacetest.cgiar.org/bin/dspace registry-loader -metadata /home/dspacetest.cgiar.org/config/registries/eperson-types.xml
$ /home/dspacetest.cgiar.org/bin/dspace registry-loader -metadata /home/dspacetest.cgiar.org/config/registries/workflow-types.xml
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Start working on paper for KM4Dev journal&lt;/li&gt;
2016-11-28 18:50:08 +01:00
&lt;li&gt;Wow, Bram from Atmire pointed out this solution for using multiple handles with one DSpace instance: &lt;a href=&#34;https://wiki.duraspace.org/display/DSDOC5x/Installing+DSpace?focusedCommentId=78163296#comment-78163296&#34;&gt;https://wiki.duraspace.org/display/DSDOC5x/Installing+DSpace?focusedCommentId=78163296#comment-78163296&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We might be able to migrate the &lt;a href=&#34;http://library.cgiar.org/&#34;&gt;CGIAR Library&lt;/a&gt; now, as they had wanted to keep their handles&lt;/li&gt;
2016-11-23 15:27:59 +01:00
&lt;/ul&gt;
2016-11-29 10:10:04 +01:00
2016-11-30 07:20:24 +01:00
&lt;h2 id=&#34;2016-11-29&#34;&gt;2016-11-29&lt;/h2&gt;
2016-11-29 10:10:04 +01:00
&lt;ul&gt;
&lt;li&gt;Sisay tried deleting and re-creating Goshu&amp;rsquo;s account but he still can&amp;rsquo;t see any communities on the homepage after he logs in&lt;/li&gt;
&lt;li&gt;Around the time of his login I see this in the DSpace logs:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-11-29 07:56:36,350 INFO org.dspace.authenticate.LDAPAuthentication @ g.cherinet@cgiar.org:session_id=F628E13AB4EF2BA949198A99EFD8EBE4:ip_addr=213.55.99.121:failed_login:no DN found for user g.cherinet@cgiar.org
2016-11-29 07:56:36,350 INFO org.dspace.authenticate.PasswordAuthentication @ g.cherinet@cgiar.org:session_id=F628E13AB4EF2BA949198A99EFD8EBE4:ip_addr=213.55.99.121:authenticate:attempting password auth of user=g.cherinet@cgiar.org
2016-11-29 07:56:36,352 INFO org.dspace.app.xmlui.utils.AuthenticationUtil @ g.cherinet@cgiar.org:session_id=F628E13AB4EF2BA949198A99EFD8EBE4:ip_addr=213.55.99.121:failed_login:email=g.cherinet@cgiar.org, realm=null, result=2
2016-11-29 07:56:36,545 INFO com.atmire.utils.UpdateSolrStatsMetadata @ Start processing item 10568/50391 id:51744
2016-11-29 07:56:36,545 INFO com.atmire.utils.UpdateSolrStatsMetadata @ Processing item stats
2016-11-29 07:56:36,583 INFO com.atmire.utils.UpdateSolrStatsMetadata @ Solr metadata up-to-date
2016-11-29 07:56:36,583 INFO com.atmire.utils.UpdateSolrStatsMetadata @ Processing item&#39;s bitstream stats
2016-11-29 07:56:36,608 INFO com.atmire.utils.UpdateSolrStatsMetadata @ Solr metadata up-to-date
2016-11-29 07:56:36,701 INFO org.dspace.app.xmlui.aspect.discovery.SidebarFacetsTransformer @ facets for scope, null: 23
2016-11-29 07:56:36,747 ERROR org.dspace.app.xmlui.aspect.discovery.SidebarFacetsTransformer @ Error while searching for sidebar facets
org.dspace.discovery.SearchServiceException: Error executing query
at org.dspace.discovery.SolrServiceImpl.search(SolrServiceImpl.java:1618)
at org.dspace.discovery.SolrServiceImpl.search(SolrServiceImpl.java:1600)
at org.dspace.discovery.SolrServiceImpl.search(SolrServiceImpl.java:1583)
at org.dspace.app.xmlui.aspect.discovery.SidebarFacetsTransformer.performSearch(SidebarFacetsTransformer.java:165)
at org.dspace.app.xmlui.aspect.discovery.SidebarFacetsTransformer.addOptions(SidebarFacetsTransformer.java:174)
at org.dspace.app.xmlui.wing.AbstractWingTransformer.startElement(AbstractWingTransformer.java:228)
at sun.reflect.GeneratedMethodAccessor277.invoke(Unknown Source)
...
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;At about the same time in the solr log I see a super long query:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;2016-11-29 07:56:36,734 INFO org.apache.solr.core.SolrCore @ [search] webapp=/solr path=/select params={q=*:*&amp;amp;fl=dateIssued.year,handle,search.resourcetype,search.resourceid,search.uniqueid&amp;amp;start=0&amp;amp;fq=NOT(withdrawn:true)&amp;amp;fq=NOT(discoverable:false)&amp;amp;fq=dateIssued.year:[*+TO+*]&amp;amp;fq=read:(g0+OR+e574+OR+g0+OR+g3+OR+g9+OR+g10+OR+g14+OR+g16+OR+g18+OR+g20+OR+g23+OR+g24+OR+g2072+OR+g2074+OR+g28+OR+g2076+OR+g29+OR+g2078+OR+g2080+OR+g34+OR+g2082+OR+g2084+OR+g38+OR+g2086+OR+g2088+OR+g2091+OR+g43+OR+g2092+OR+g2093+OR+g2095+OR+g2097+OR+g50+OR+g2099+OR+g51+OR+g2103+OR+g62+OR+g65+OR+g2115+OR+g2117+OR+g2119+OR+g2121+OR+g2123+OR+g2125+OR+g77+OR+g78+OR+g79+OR+g2127+OR+g80+OR+g2129+OR+g2131+OR+g2133+OR+g2134+OR+g2135+OR+g2136+OR+g2137+OR+g2138+OR+g2139+OR+g2140+OR+g2141+OR+g2142+OR+g2148+OR+g2149+OR+g2150+OR+g2151+OR+g2152+OR+g2153+OR+g2154+OR+g2156+OR+g2165+OR+g2167+OR+g2171+OR+g2174+OR+g2175+OR+g129+OR+g2182+OR+g2186+OR+g2189+OR+g153+OR+g158+OR+g166+OR+g167+OR+g168+OR+g169+OR+g2225+OR+g179+OR+g2227+OR+g2229+OR+g183+OR+g2231+OR+g184+OR+g2233+OR+g186+OR+g2235+OR+g2237+OR+g191+OR+g192+OR+g193+OR+g202+OR+g203+OR+g204+OR+g205+OR+g207+OR+g208+OR+g218+OR+g219+OR+g222+OR+g223+OR+g230+OR+g231+OR+g238+OR+g241+OR+g244+OR+g254+OR+g255+OR+g262+OR+g265+OR+g268+OR+g269+OR+g273+OR+g276+OR+g277+OR+g279+OR+g282+OR+g2332+OR+g2335+OR+g2338+OR+g292+OR+g293+OR+g2341+OR+g296+OR+g2344+OR+g297+OR+g2347+OR+g301+OR+g2350+OR+g303+OR+g305+OR+g2356+OR+g310+OR+g311+OR+g2359+OR+g313+OR+g2362+OR+g2365+OR+g2368+OR+g321+OR+g2371+OR+g325+OR+g2374+OR+g328+OR+g2377+OR+g2380+OR+g333+OR+g2383+OR+g2386+OR+g2389+OR+g342+OR+g343+OR+g2392+OR+g345+OR+g2395+OR+g348+OR+g2398+OR+g2401+OR+g2404+OR+g2407+OR+g364+OR+g366+OR+g2425+OR+g2427+OR+g385+OR+g387+OR+g388+OR+g389+OR+g2442+OR+g395+OR+g2443+OR+g2444+OR+g401+OR+g403+OR+g405+OR+g408+OR+g2457+OR+g2458+OR+g411+OR+g2459+OR+g414+OR+g2463+OR+g417+OR+g2465+OR+g2467+OR+g421+OR+g2469+OR+g2471+OR+g424+OR+g2473+OR+g2475+OR+g2476+OR+g429+OR+g433+OR+g2481+OR+g2482+OR+g2483+OR+g443+OR+g444+OR+g445+OR+g446+OR+g448+OR+g453+OR+g455+OR+g456+OR+g457+OR+g458+OR+g459+OR+g461+OR+g462+OR+g463+OR+g464+OR+g465+OR+g467+OR+g468+OR+g469+OR+g474+OR+g476+OR+g477+OR+g480+OR+g483+OR+g484+OR+g493+OR+g496+OR+g497+OR+g498+OR+g500+OR+g502+OR+g504+OR+g505+OR+g2559+OR+g2560+OR+g513+OR+g2561+OR+g515+OR+g516+OR+g518+OR+g519+OR+g2567+OR+g520+OR+g521+OR+g522+OR+g2570+OR+g523+OR+g2571+OR+g524+OR+g525+OR+g2573+OR+g526+OR+g2574+OR+g527+OR+g528+OR+g2576+OR+g529+OR+g531+OR+g2579+OR+g533+OR+g534+OR+g2582+OR+g535+OR+g2584+OR+g538+OR+g2586+OR+g540+OR+g2588+OR+g541+OR+g543+OR+g544+OR+g545+OR+g546+OR+g548+OR+g2596+OR+g549+OR+g551+OR+g555+OR+g556+OR+g558+OR+g561+OR+g569+OR+g570+OR+g571+OR+g2619+OR+g572+OR+g2620+OR+g573+OR+g2621+OR+g2622+OR+g575+OR+g578+OR+g581+OR+g582+OR+g584+OR+g585+OR+g586+OR+g587+OR+g588+OR+g590+OR+g591+OR+g593+OR+g595+OR+g596+OR+g598+OR+g599+OR+g601+OR+g602+OR+g603+OR+g604+OR+g605+OR+g606+OR+g608+OR+g609+OR+g610+OR+g612+OR+g614+OR+g616+OR+g620+OR+g621+OR+g623+OR+g630+OR+g635+OR+g636+OR+g646+OR+g649+OR+g683+OR+g684+OR+g687+OR+g689+OR+g691+OR+g695+OR+g697+OR+g698+OR+g699+OR+g700+OR+g701+OR+g707+OR+g708+OR+g709+OR+g710+OR+g711+OR+g712+OR+g713+OR+g714+OR+g715+OR+g716+OR+g717+OR+g719+OR+g720+OR+g729+OR+g732+OR+g733+OR+g734+OR+g736+OR+g737+OR+g738+OR+g2786+OR+g752+OR+g754+OR+g2804+OR+g757+OR+g2805+OR+g2806+OR+g760+OR+g761+OR+g2810+OR+g2815+OR+g769+OR+g771+OR+g773+OR+g776+OR+g786+OR+g787+OR+g788+OR+g789+OR+g791+OR+g792+OR+g793+OR+g794+OR+g795+OR+g796+OR+g798+OR+g800+OR+g802+OR+g803+OR+g806+OR+g808+OR+g810+OR+g814+OR+g815+OR+g817+OR+g829+OR+g830+OR+g849+OR+g893+OR+g895+OR+g898+OR+g902+OR+g903+OR+g917+OR+g919+OR+g921+OR+g922+OR+g923+OR+g924+OR+g925+OR+g926+OR+g927+OR+g928+OR+g929+OR+g930+OR+g932+OR+g933+OR+g934+OR+g938+OR+g939+OR+g944+OR+g945+OR+g946+OR+g947+OR+g948+OR+g949+OR+g950+OR+g951+OR+g953+OR+g954+OR+g955+OR+g956+OR+g958+OR+g959+OR+g960+OR+g963+OR+g964+OR+g965+OR+g968+OR+g969+OR+g970+OR+g971+OR+g972+OR+g973+OR+g974+OR+g976+OR+g978+OR+g979+OR+g984+OR+g985+OR+g987+OR+g988+OR+g991+OR+g993+OR+g994+OR
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Which, according to some old threads on DSpace Tech, means that the user has a lot of permissions (from groups or on the individual eperson) which increases the Solr query size / query URL&lt;/li&gt;
&lt;li&gt;It might be fixed by increasing the Tomcat &lt;code&gt;maxHttpHeaderSize&lt;/code&gt;, which is &lt;a href=&#34;http://tomcat.apache.org/tomcat-7.0-doc/config/http.html&#34;&gt;8192 (or 8KB) by default&lt;/a&gt;&lt;/li&gt;
2016-11-29 12:52:02 +01:00
&lt;li&gt;I&amp;rsquo;ve increased the &lt;code&gt;maxHttpHeaderSize&lt;/code&gt; to 16384 on DSpace Test and the user said he is now able to see the communities on the homepage&lt;/li&gt;
&lt;li&gt;I will make the changes on CGSpace soon&lt;/li&gt;
2016-11-29 15:24:24 +01:00
&lt;li&gt;A few users are reporting having issues with their workflows, they get the following message: &amp;ldquo;You are not allowed to perform this task&amp;rdquo;&lt;/li&gt;
&lt;li&gt;Might be the same as &lt;a href=&#34;https://jira.duraspace.org/browse/DS-2920&#34;&gt;DS-2920&lt;/a&gt; on the bug tracker&lt;/li&gt;
2016-11-29 10:10:04 +01:00
&lt;/ul&gt;
2016-11-30 07:20:24 +01:00
&lt;h2 id=&#34;2016-11-30&#34;&gt;2016-11-30&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;maxHttpHeaderSize&lt;/code&gt; fix worked on CGSpace (user is able to see the community list on the homepage)&lt;/li&gt;
&lt;li&gt;The &amp;ldquo;take task&amp;rdquo; cache fix worked on DSpace Test but it&amp;rsquo;s not an official patch, so I&amp;rsquo;ll have to report the bug to DSpace people and try to get advice&lt;/li&gt;
2016-12-02 12:13:58 +01:00
&lt;li&gt;More work on the KM4Dev Journal article&lt;/li&gt;
2016-11-30 07:20:24 +01:00
&lt;/ul&gt;
2016-11-01 08:23:50 +01:00
</description>
</item>
2016-10-03 17:28:33 +02:00
<item>
<title>October, 2016</title>
<link>https://alanorth.github.io/cgspace-notes/2016-10/</link>
<pubDate>Mon, 03 Oct 2016 15:53:00 +0300</pubDate>
<guid>https://alanorth.github.io/cgspace-notes/2016-10/</guid>
<description>
&lt;h2 id=&#34;2016-10-03&#34;&gt;2016-10-03&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Testing adding &lt;a href=&#34;https://wiki.duraspace.org/display/DSDOC5x/ORCID+Integration#ORCIDIntegration-EditingexistingitemsusingBatchCSVEditing&#34;&gt;ORCIDs to a CSV&lt;/a&gt; file for a single item to see if the author orders get messed up&lt;/li&gt;
&lt;li&gt;Need to test the following scenarios to see how author order is affected:
&lt;ul&gt;
&lt;li&gt;ORCIDs only&lt;/li&gt;
&lt;li&gt;ORCIDs plus normal authors&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;I exported a random item&amp;rsquo;s metadata as CSV, deleted &lt;em&gt;all columns&lt;/em&gt; except id and collection, and made a new coloum called &lt;code&gt;ORCID:dc.contributor.author&lt;/code&gt; with the following random ORCIDs from the ORCID registry:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;0000-0002-6115-0956||0000-0002-3812-8793||0000-0001-7462-405X
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Hmm, with the &lt;code&gt;dc.contributor.author&lt;/code&gt; column removed, DSpace doesn&amp;rsquo;t detect any changes&lt;/li&gt;
&lt;li&gt;With a blank &lt;code&gt;dc.contributor.author&lt;/code&gt; column, DSpace wants to remove all non-ORCID authors and add the new ORCID authors&lt;/li&gt;
&lt;li&gt;I added the &lt;a href=&#34;https://github.com/ilri/DSpace/issues/234&#34;&gt;disclaimer text&lt;/a&gt; to the About page, then added a footer link to the disclaimer&amp;rsquo;s ID, but there is a Bootstrap issue that causes the page content to disappear when using in-page anchors: &lt;a href=&#34;https://github.com/twbs/bootstrap/issues/1768&#34;&gt;https://github.com/twbs/bootstrap/issues/1768&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/10/bootstrap-issue.png&#34; alt=&#34;Bootstrap issue with in-page anchors&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Looks like we&amp;rsquo;ll just have to add the text to the About page (without a link) or add a separate page&lt;/li&gt;
&lt;/ul&gt;
2016-10-04 10:34:57 +02:00
&lt;h2 id=&#34;2016-10-04&#34;&gt;2016-10-04&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Start testing cleanups of authors that Peter sent last week&lt;/li&gt;
&lt;li&gt;Out of 40,000+ rows, Peter had indicated corrections for ~3,200 of them—too many to look through carefully, so I did some basic quality checking:
&lt;ul&gt;
&lt;li&gt;Trim leading/trailing whitespace&lt;/li&gt;
&lt;li&gt;Find invalid characters&lt;/li&gt;
&lt;li&gt;Cluster values to merge obvious authors&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;That left us with 3,180 valid corrections and 3 deletions:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i authors-fix-3180.csv -f dc.contributor.author -t correct -m 3 -d dspacetest -u dspacetest -p fuuu
$ ./delete-metadata-values.py -i authors-delete-3.csv -f dc.contributor.author -m 3 -d dspacetest -u dspacetest -p fuuu
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Remove old about page (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/284&#34;&gt;#284&lt;/a&gt;)&lt;/li&gt;
2016-10-06 07:06:32 +02:00
&lt;li&gt;CGSpace crashed a few times today&lt;/li&gt;
&lt;li&gt;Generate list of unique authors in CCAFS collections:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# \copy (select distinct text_value, count(*) as count from metadatavalue where metadata_field_id = (select metadata_field_id from metadatafieldregistry where element = &#39;contributor&#39; and qualifier = &#39;author&#39;) AND resource_type_id = 2 AND resource_id IN (select item_id from collection2item where collection_id IN (select resource_id from handle where handle in (&#39;10568/32729&#39;, &#39;10568/5472&#39;, &#39;10568/5473&#39;, &#39;10568/10288&#39;, &#39;10568/70974&#39;, &#39;10568/3547&#39;, &#39;10568/3549&#39;, &#39;10568/3531&#39;,&#39;10568/16890&#39;,&#39;10568/5470&#39;,&#39;10568/3546&#39;, &#39;10568/36024&#39;, &#39;10568/66581&#39;, &#39;10568/21789&#39;, &#39;10568/5469&#39;, &#39;10568/5468&#39;, &#39;10568/3548&#39;, &#39;10568/71053&#39;, &#39;10568/25167&#39;))) group by text_value order by count desc) to /tmp/ccafs-authors.csv with csv;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-10-05&#34;&gt;2016-10-05&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Work on more infrastructure cleanups for Ansible DSpace role&lt;/li&gt;
2016-10-06 08:41:36 +02:00
&lt;li&gt;Clean up Let&amp;rsquo;s Encrypt plumbing and submit pull request for rmg-ansible-public (&lt;a href=&#34;https://github.com/ilri/rmg-ansible-public/pull/60&#34;&gt;#60&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;2016-10-06&#34;&gt;2016-10-06&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Nice! DSpace Test (linode02) is now having &lt;code&gt;java.lang.OutOfMemoryError: Java heap space&lt;/code&gt; errors&amp;hellip;&lt;/li&gt;
&lt;li&gt;Heap space is 2048m, and we have 5GB of RAM being used for OS cache (Solr!) so let&amp;rsquo;s just bump the memory to 3072m&lt;/li&gt;
&lt;li&gt;Magdalena from CCAFS asked why the colors in the thumbnails for these &lt;a href=&#34;https://cgspace.cgiar.org/handle/10568/71249&#34;&gt;two&lt;/a&gt; &lt;a href=&#34;https://cgspace.cgiar.org/handle/10568/71259&#34;&gt;items&lt;/a&gt; look different, even though they are the same in the PDF itself&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/10/cmyk-vs-srgb.jpg&#34; alt=&#34;CMYK vs sRGB colors&#34; /&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Turns out the first PDF was exported from InDesign using CMYK and the second one was using sRGB&lt;/li&gt;
&lt;li&gt;Run all system updates on DSpace Test and reboot it&lt;/li&gt;
2016-10-04 10:34:57 +02:00
&lt;/ul&gt;
2016-10-08 08:35:05 +02:00
&lt;h2 id=&#34;2016-10-08&#34;&gt;2016-10-08&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Re-deploy CGSpace with latest changes from late September and early October&lt;/li&gt;
&lt;li&gt;Run fixes for ILRI subjects and delete blank metadata values:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# delete from metadatavalue where resource_type_id=2 and text_value=&#39;&#39;;
DELETE 11
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Run all system updates and reboot CGSpace&lt;/li&gt;
&lt;li&gt;Delete ten gigs of old 2015 Tomcat logs that never got rotated (WTF?):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;root@linode01:~# ls -lh /var/log/tomcat7/localhost_access_log.2015* | wc -l
47
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Delete 2GB &lt;code&gt;cron-filter-media.log&lt;/code&gt; file, as it is just a log from a cron job and it doesn&amp;rsquo;t get rotated like normal log files (almost a year now maybe)&lt;/li&gt;
&lt;/ul&gt;
2016-10-15 01:18:16 +02:00
&lt;h2 id=&#34;2016-10-14&#34;&gt;2016-10-14&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run all system updates on DSpace Test and reboot server&lt;/li&gt;
&lt;li&gt;Looking into some issues with Discovery filters in Atmire&amp;rsquo;s content and usage analysis module after adjusting the filter class&lt;/li&gt;
&lt;li&gt;Looks like changing the filters from &lt;code&gt;configuration.DiscoverySearchFilterFacet&lt;/code&gt; to &lt;code&gt;configuration.DiscoverySearchFilter&lt;/code&gt; breaks them in Atmire CUA module&lt;/li&gt;
&lt;/ul&gt;
2016-10-17 16:41:40 +02:00
&lt;h2 id=&#34;2016-10-17&#34;&gt;2016-10-17&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A bit more cleanup on the CCAFS authors, and run the corrections on DSpace Test:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i ccafs-authors-oct-16.csv -f dc.contributor.author -t &#39;correct name&#39; -m 3 -d dspace -u dspace -p fuuu
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;One observation is that there are still some old versions of names in the author lookup because authors appear in other communities (as we only corrected authors from CCAFS for this round)&lt;/li&gt;
&lt;/ul&gt;
2016-10-19 02:19:28 +02:00
&lt;h2 id=&#34;2016-10-18&#34;&gt;2016-10-18&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Start working on DSpace 5.5 porting work again:&lt;/p&gt;
&lt;p&gt;$ git checkout -b 5_x-55 5_x-prod
$ git rebase -i dspace-5.5&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Have to fix about ten merge conflicts, mostly in the SCSS for the CGIAR theme&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Skip 1e34751b8cf17021f45d4cf2b9a5800c93fb4cb2 in lieu of upstream&amp;rsquo;s 55e623d1c2b8b7b1fa45db6728e172e06bfa8598 (fixes X-Forwarded-For header) because I had made the same fix myself and it&amp;rsquo;s better to use the upstream one&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I notice this rebase gets rid of GitHub merge commits&amp;hellip; which actually might be fine because merges are fucking annoying to deal with when remote people merge without pulling and rebasing their branch first&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finished up applying the 5.5 sitemap changes to all themes&lt;/p&gt;&lt;/li&gt;
2016-10-19 09:05:11 +02:00
&lt;li&gt;&lt;p&gt;Merge the &lt;code&gt;discovery.xml&lt;/code&gt; cleanups (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/278&#34;&gt;#278&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Merge some minor edits to the distribution license (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/285&#34;&gt;#285&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
2016-10-19 02:19:28 +02:00
&lt;/ul&gt;
2016-10-20 05:32:17 +02:00
&lt;h2 id=&#34;2016-10-19&#34;&gt;2016-10-19&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;When we move to DSpace 5.5 we should also cherry pick some patches from 5.6 branch:
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://jira.duraspace.org/browse/DS-3246&#34;&gt;memory cleanup&lt;/a&gt;: 9f0f5940e7921765c6a22e85337331656b18a403&lt;/li&gt;
&lt;li&gt;sql injection: c6fda557f731dbc200d7d58b8b61563f86fe6d06&lt;/li&gt;
&lt;li&gt;pdfbox security issue: b5330b78153b2052ed3dc2fd65917ccdbfcc0439&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
2016-10-20 23:24:36 +02:00
&lt;h2 id=&#34;2016-10-20&#34;&gt;2016-10-20&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run CCAFS author corrections on CGSpace&lt;/li&gt;
2016-10-25 15:21:06 +02:00
&lt;li&gt;Discovery reindexing took forever and kinda caused CGSpace to crash, so I ran all system updates and rebooted the server&lt;/li&gt;
2016-10-20 23:24:36 +02:00
&lt;/ul&gt;
2016-10-25 15:21:06 +02:00
&lt;h2 id=&#34;2016-10-25&#34;&gt;2016-10-25&lt;/h2&gt;
&lt;ul&gt;
2016-10-25 20:13:40 +02:00
&lt;li&gt;Move the LIVES community from the top level to the ILRI projects community&lt;/li&gt;
2016-10-25 15:21:06 +02:00
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ /home/cgspace.cgiar.org/bin/dspace community-filiator --set --parent=10568/27629 --child=10568/25101
&lt;/code&gt;&lt;/pre&gt;
2016-10-25 20:13:40 +02:00
&lt;ul&gt;
&lt;li&gt;Start testing some things for DSpace 5.5, like command line metadata import, PDF media filter, and Atmire CUA&lt;/li&gt;
&lt;li&gt;Start looking at batch fixing of &amp;ldquo;old&amp;rdquo; ILRI website links without www or https, for example:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select * from metadatavalue where resource_type_id=2 and text_value like &#39;http://ilri.org%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Also CCAFS has HTTPS and their links should use it where possible:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select * from metadatavalue where resource_type_id=2 and text_value like &#39;http://ccafs.cgiar.org%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And this will find community and collection HTML text that is using the old style PNG/JPG icons for RSS and email (we should be using Font Awesome icons instead):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# select text_value from metadatavalue where resource_type_id in (3,4) and text_value like &#39;%Iconrss2.png%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Turns out there are shit tons of varieties of this, like with http, https, www, separate &lt;code&gt;&amp;lt;/img&amp;gt;&lt;/code&gt; tags, alignments, etc&lt;/li&gt;
&lt;li&gt;Had to find all variations and replace them individually:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;&#39;,&#39;&amp;lt;span class=&amp;quot;fa fa-rss fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/email.jpg&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-at fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/email.jpg&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-rss fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/email.jpg&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-at fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/email.jpg&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/Iconrss2.png&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-rss fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/Iconrss2.png&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/email.jpg&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-at fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/email.jpg&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://ilri.org/images/Iconrss2.png&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-rss fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://ilri.org/images/Iconrss2.png&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://ilri.org/images/email.jpg&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-at fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://ilri.org/images/email.jpg&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/Iconrss2.png&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-rss fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/Iconrss2.png&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/email.jpg&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-at fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/email.jpg&amp;quot;&amp;gt;&amp;lt;/img&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-rss fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://ilri.org/images/email.jpg&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-at fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img align=&amp;quot;left&amp;quot; src=&amp;quot;https://ilri.org/images/email.jpg&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img valign=&amp;quot;center&amp;quot; align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-rss fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img valign=&amp;quot;center&amp;quot; align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img valign=&amp;quot;center&amp;quot; align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/email.jpg&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-at fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img valign=&amp;quot;center&amp;quot; align=&amp;quot;left&amp;quot; src=&amp;quot;https://www.ilri.org/images/email.jpg&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img valign=&amp;quot;center&amp;quot; align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-rss fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img valign=&amp;quot;center&amp;quot; align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/Iconrss2.png&amp;quot;/&amp;gt;%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;&amp;lt;img valign=&amp;quot;center&amp;quot; align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/email.jpg&amp;quot;/&amp;gt;&#39;, &#39;&amp;lt;span class=&amp;quot;fa fa-at fa-2x&amp;quot; aria-hidden=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;&#39;) where resource_type_id in (3,4) and text_value like &#39;%&amp;lt;img valign=&amp;quot;center&amp;quot; align=&amp;quot;left&amp;quot; src=&amp;quot;http://www.ilri.org/images/email.jpg&amp;quot;/&amp;gt;%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Getting rid of these reduces the number of network requests each client makes on community/collection pages, and makes use of Font Awesome icons (which they are already loading anyways!)&lt;/li&gt;
2016-10-25 20:32:53 +02:00
&lt;li&gt;And now that I start looking, I want to fix a bunch of links to popular sites that should be using HTTPS, like Twitter, Facebook, Google, Feed Burner, DOI, etc&lt;/li&gt;
&lt;li&gt;I should look to see if any of those domains is sending an HTTP 301 or setting HSTS headers to their HTTPS domains, then just replace them&lt;/li&gt;
2016-10-25 20:13:40 +02:00
&lt;/ul&gt;
2016-10-27 08:35:31 +02:00
&lt;h2 id=&#34;2016-10-27&#34;&gt;2016-10-27&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Run Font Awesome fixes on DSpace Test:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# \i /tmp/font-awesome-text-replace.sql
UPDATE 17
UPDATE 17
UPDATE 3
UPDATE 3
UPDATE 30
UPDATE 30
UPDATE 1
UPDATE 1
UPDATE 7
UPDATE 7
UPDATE 1
UPDATE 1
UPDATE 1
UPDATE 1
UPDATE 1
UPDATE 1
UPDATE 0
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Looks much better now:&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&#34;2016/10/cgspace-icons.png&#34; alt=&#34;CGSpace with old icons&#34; /&gt;
&lt;img src=&#34;2016/10/dspacetest-fontawesome-icons.png&#34; alt=&#34;DSpace Test with Font Awesome icons&#34; /&gt;&lt;/p&gt;
2016-10-27 09:48:00 +02:00
&lt;ul&gt;
&lt;li&gt;Run the same replacements on CGSpace&lt;/li&gt;
&lt;/ul&gt;
2016-10-30 13:38:01 +01:00
&lt;h2 id=&#34;2016-10-30&#34;&gt;2016-10-30&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Fix some messed up authors on CGSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set authority=&#39;799da1d8-22f3-43f5-8233-3d2ef5ebf8a8&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Charleston, B.%&#39;;
UPDATE 10
dspace=# update metadatavalue set authority=&#39;e936f5c5-343d-4c46-aa91-7a1fff6277ed&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Knight-Jones%&#39;;
UPDATE 36
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I updated the authority index but nothing seemed to change, so I&amp;rsquo;ll wait and do it again after I update Discovery below&lt;/li&gt;
&lt;li&gt;Skype chat with Tsega about the &lt;a href=&#34;https://github.com/ilri/ckm-cgspace-contentdm-bridge&#34;&gt;IFPRI contentdm bridge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We tested harvesting OAI in an example collection to see how it works&lt;/li&gt;
&lt;li&gt;Talk to Carlos Quiros about CG Core metadata in CGSpace&lt;/li&gt;
&lt;li&gt;Get a list of countries from CGSpace so I can do some batch corrections:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# \copy (select distinct text_value, count(*) from metadatavalue where metadata_field_id=228 group by text_value order by count desc) to /tmp/countries.csv with csv;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Fix a bunch of countries in Open Refine and run the corrections on CGSpace:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i countries-fix-18.csv -f dc.coverage.country -t &#39;correct&#39; -m 228 -d dspace -u dspace -p fuuu
$ ./delete-metadata-values.py -i countries-delete-2.csv -f dc.coverage.country -m 228 -d dspace -u dspace -p fuuu
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Run a shit ton of author fixes from Peter Ballantyne that we&amp;rsquo;ve been cleaning up for two months:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i /tmp/authors-fix-pb2.csv -f dc.contributor.author -t correct -m 3 -u dspace -d dspace -p fuuu
&lt;/code&gt;&lt;/pre&gt;
2016-10-30 15:41:08 +01:00
&lt;ul&gt;
&lt;li&gt;Run a few URL corrections for ilri.org and doi.org, etc:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;http://www.ilri.org&#39;,&#39;https://www.ilri.org&#39;) where resource_type_id=2 and text_value like &#39;%http://www.ilri.org%&#39;;
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;http://mahider.ilri.org&#39;, &#39;https://cgspace.cgiar.org&#39;) where resource_type_id=2 and text_value like &#39;%http://mahider.%.org%&#39; and metadata_field_id not in (28);
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;http://dx.doi.org&#39;, &#39;https://dx.doi.org&#39;) where resource_type_id=2 and text_value like &#39;%http://dx.doi.org%&#39; and metadata_field_id not in (18,26,28,111);
dspace=# update metadatavalue set text_value = regexp_replace(text_value, &#39;http://doi.org&#39;, &#39;https://dx.doi.org&#39;) where resource_type_id=2 and text_value like &#39;%http://doi.org%&#39; and metadata_field_id not in (18,26,28,111);
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I skipped metadata fields like citation and description&lt;/li&gt;
&lt;/ul&gt;
2016-10-03 17:28:33 +02:00
</description>
</item>
2016-09-02 10:44:44 +02:00
<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>
2016-10-03 17:28:33 +02:00
<description>&lt;h2 id=&#34;2016-09-01&#34;&gt;2016-09-01&lt;/h2&gt;
2016-09-02 10:44:44 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&gt;
2016-09-02 10:44:44 +02:00
&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;
2016-09-02 16:22:11 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-09-02 16:22:11 +02:00
2016-09-02 10:44:44 +02:00
&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;
2016-09-02 16:22:11 +02:00
&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;
2016-09-02 22:36:26 +02:00
&lt;li&gt;Run authority updates on CGSpace&lt;/li&gt;
2016-09-02 16:22:11 +02:00
&lt;/ul&gt;
2016-09-06 14:17:40 +02:00
&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;
2016-09-06 16:15:25 +02:00
&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;
2016-09-06 14:17:40 +02:00
&lt;/ul&gt;
2016-09-06 16:15:25 +02:00
&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;
2016-09-07 13:26:16 +02:00
&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;
2016-09-07 15:31:00 +02:00
&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;
2016-09-07 13:26:16 +02:00
&lt;/ul&gt;
2016-09-13 15:56:34 +02:00
&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;
2016-09-14 21:58:33 +02:00
&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)
2016-09-13 15:56:34 +02:00
&lt;/code&gt;&lt;/pre&gt;
2016-09-14 15:06:50 +02:00
&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;
2016-09-14 19:17:19 +02:00
&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;
2016-09-19 16:52:47 +02:00
&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;
2016-09-14 19:17:19 +02:00
&lt;/ul&gt;
2016-09-19 16:52:47 +02:00
&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;
2016-09-14 19:17:19 +02:00
&lt;/code&gt;&lt;/pre&gt;
2016-09-14 21:07:16 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-09-14 21:07:16 +02:00
&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;
2016-09-15 08:03:18 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-09-16 10:13:26 +02:00
&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;
2016-09-19 16:52:47 +02:00
&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
2016-09-25 13:50:37 +02:00
$ ./delete-metadata-values.py -f cg.contributor.affiliation -i affiliations_pb-2-deletions.csv -m 211 -u dspace -d dspace -p fuuu
2016-09-19 16:52:47 +02:00
&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;
2016-09-20 11:31:01 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-09-21 15:45:59 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-09-21 14:34:53 +02:00
&lt;li&gt;Add &lt;code&gt;dc.date.accessioned&lt;/code&gt; to XMLUI Discovery search filters&lt;/li&gt;
2016-09-21 21:18:52 +02:00
&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;
2016-09-25 13:50:37 +02:00
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i sponsors-fix-23.csv -f dc.description.sponsorship -t correct -m 29 -d dspace -u dspace -p fuuu
$ ./delete-metadata-values.py -i sponsors-delete-8.csv -f dc.description.sponsorship -m 29 -d dspace -u dspace -p fuuu
2016-09-21 21:18:52 +02:00
&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;
2016-09-20 11:31:01 +02:00
&lt;/ul&gt;
2016-09-22 09:17:57 +02:00
&lt;h2 id=&#34;2016-09-22&#34;&gt;2016-09-22&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Update controlled vocabulary for sponsorship based on the latest corrected values from the database&lt;/li&gt;
&lt;/ul&gt;
2016-09-25 13:50:37 +02:00
&lt;h2 id=&#34;2016-09-25&#34;&gt;2016-09-25&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Merge accession date improvements for CUA module (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/275&#34;&gt;#275&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Merge addition of accession date to Discovery search filters (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/276&#34;&gt;#276&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Merge updates to sponsorship controlled vocabulary (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/277&#34;&gt;#277&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;I&amp;rsquo;ve been trying to add a search filter for &lt;code&gt;dc.description&lt;/code&gt; so the IITA people can search for some tags they use there, but for some reason the filter never shows up in Atmire&amp;rsquo;s CUA&lt;/li&gt;
&lt;li&gt;Not sure if it&amp;rsquo;s something like we already have too many filters there (30), or the filter name is reserved, etc&amp;hellip;&lt;/li&gt;
&lt;li&gt;Generate a list of ILRI subjects for Peter and Abenet to look through/fix:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspace=# \copy (select distinct text_value, count(*) as count from metadatavalue where resource_type_id=2 and metadata_field_id=203 group by text_value order by count desc) to /tmp/ilrisubjects.csv with csv;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Regenerate Discovery indexes a few times after playing with &lt;code&gt;discovery.xml&lt;/code&gt; index definitions (syntax, parameters, etc).&lt;/li&gt;
&lt;li&gt;Merge changes to boolean logic in Solr search (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/274&#34;&gt;#274&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Run all sponsorship and affiliation fixes on CGSpace, deploy latest &lt;code&gt;5_x-prod&lt;/code&gt; branch, and re-index Discovery on CGSpace&lt;/li&gt;
2016-09-25 14:08:15 +02:00
&lt;li&gt;Tested OCSP stapling on DSpace Test&amp;rsquo;s nginx and it works:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ openssl s_client -connect dspacetest.cgiar.org:443 -servername dspacetest.cgiar.org -tls1_2 -tlsextdebug -status
...
OCSP response:
======================================
OCSP Response Data:
...
Cert Status: good
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;I&amp;rsquo;ve been monitoring this for almost two years in this GitHub issue: &lt;a href=&#34;https://github.com/ilri/DSpace/issues/38&#34;&gt;https://github.com/ilri/DSpace/issues/38&lt;/a&gt;&lt;/li&gt;
2016-09-25 13:50:37 +02:00
&lt;/ul&gt;
&lt;h2 id=&#34;2016-09-27&#34;&gt;2016-09-27&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Discuss fixing some ORCIDs for CCAFS author Sonja Vermeulen with Magdalena Haman&lt;/li&gt;
&lt;li&gt;This author has a few variations:&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;Vermeu
len, S%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And it looks like &lt;code&gt;fe4b719f-6cc4-4d65-8504-7a83130b9f83&lt;/code&gt; is the authority with the correct ORCID linked&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set authority=&#39;fe4b719f-6cc4-4d65-8504-7a83130b9f83w&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Vermeulen, S%&#39;;
UPDATE 101
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Hmm, now her name is missing from the authors facet and only shows the authority ID&lt;/li&gt;
&lt;li&gt;On the production server there is an item with her ORCID but it is using a different authority: f01f7b7b-be3f-4df7-a61d-b73c067de88d&lt;/li&gt;
&lt;li&gt;Maybe I used the wrong one&amp;hellip; I need to look again at the production database&lt;/li&gt;
&lt;li&gt;On a clean snapshot of the database I see the correct authority should be &lt;code&gt;f01f7b7b-be3f-4df7-a61d-b73c067de88d&lt;/code&gt;, not &lt;code&gt;fe4b719f-6cc4-4d65-8504-7a83130b9f83&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Updating her authorities again and reindexing:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set authority=&#39;f01f7b7b-be3f-4df7-a61d-b73c067de88d&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Vermeulen, S%&#39;;
UPDATE 101
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Use GitHub icon from Font Awesome instead of a PNG to save one extra network request&lt;/li&gt;
2016-09-28 13:55:10 +02:00
&lt;li&gt;We can also replace the RSS and mail icons in community text!&lt;/li&gt;
&lt;li&gt;Fix reference to &lt;code&gt;dc.type.*&lt;/code&gt; in Atmire CUA module, as we now only index &lt;code&gt;dc.type&lt;/code&gt; for &amp;ldquo;Output type&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
2016-09-28 13:55:10 +02:00
&lt;h2 id=&#34;2016-09-28&#34;&gt;2016-09-28&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Make a placeholder pull request for &lt;code&gt;discovery.xml&lt;/code&gt; changes (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/278&#34;&gt;#278&lt;/a&gt;), as I still need to test their effect on Atmire content analysis module&lt;/li&gt;
&lt;li&gt;Make a placeholder pull request for Font Awesome changes (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/279&#34;&gt;#279&lt;/a&gt;), which replaces the GitHub image in the footer with an icon, and add style for RSS and @ icons that I will start replacing in community/collection HTML intros&lt;/li&gt;
&lt;li&gt;Had some issues with local test server after messing with Solr too much, had to blow everything away and re-install from CGSpace&lt;/li&gt;
&lt;li&gt;Going to try to update Sonja Vermeulen&amp;rsquo;s authority to 2b4166b7-6e4d-4f66-9d8b-ddfbec9a6ae0, as that seems to be one of her authorities that has an ORCID&lt;/li&gt;
&lt;li&gt;Merge Font Awesome changes (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/279&#34;&gt;#279&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Minor fix to a string in Atmire&amp;rsquo;s CUA module (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/280&#34;&gt;#280&lt;/a&gt;)&lt;/li&gt;
2016-09-28 16:03:11 +02:00
&lt;li&gt;This seems to be what I&amp;rsquo;ll need to do for Sonja Vermeulen (but with &lt;code&gt;2b4166b7-6e4d-4f66-9d8b-ddfbec9a6ae0&lt;/code&gt; instead on the live site):&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;dspacetest=# update metadatavalue set authority=&#39;09e4da69-33a3-45ca-b110-7d3f82d2d6d2&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Vermeulen, S%&#39;;
dspacetest=# update metadatavalue set authority=&#39;09e4da69-33a3-45ca-b110-7d3f82d2d6d2&#39;, confidence=600 where metadata_field_id=3 and resource_type_id=2 and text_value like &#39;Vermeulen SJ%&#39;;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;And then update Discovery and Authority indexes&lt;/li&gt;
&lt;li&gt;Minor fix for &amp;ldquo;Subject&amp;rdquo; string in Discovery search and Atmire modules (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/281&#34;&gt;#281&lt;/a&gt;)&lt;/li&gt;
2016-09-29 13:14:41 +02:00
&lt;li&gt;Start testing batch fixes for ILRI subject from Peter:&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code&gt;$ ./fix-metadata-values.py -i ilrisubjects-fix-32.csv -f cg.subject.ilri -t correct -m 203 -d dspace -u dspace -p fuuuu
$ ./delete-metadata-values.py -i ilrisubjects-delete-13.csv -f cg.subject.ilri -m 203 -d dspace -u dspace -p fuuu
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;2016-09-29&#34;&gt;2016-09-29&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Add &lt;code&gt;cg.identifier.ciatproject&lt;/code&gt; to metadata registry in preparation for CIAT project tag&lt;/li&gt;
&lt;li&gt;Merge changes for CIAT project tag (&lt;a href=&#34;https://github.com/ilri/DSpace/pull/282&#34;&gt;#282&lt;/a&gt;)&lt;/li&gt;
2016-10-01 07:47:26 +02:00
&lt;li&gt;DSpace Test (linode02) became unresponsive for some reason, I had to hard reboot it from the Linode console&lt;/li&gt;
2016-10-03 17:28:33 +02:00
&lt;li&gt;People on DSpace mailing list gave me a query to get authors from certain collections:&lt;/li&gt;
2016-10-01 07:47:26 +02:00
&lt;/ul&gt;
2016-10-03 17:28:33 +02:00
&lt;pre&gt;&lt;code&gt;dspacetest=# select distinct text_value from metadatavalue where metadata_field_id = (select metadata_field_id from metadatafieldregistry where element = &#39;contributor&#39; and qualifier = &#39;author&#39;) AND resource_type_id = 2 AND resource_id IN (select item_id from collection2item where collection_id IN (select resource_id from handle where handle in (&#39;10568/5472&#39;, &#39;10568/5473&#39;)));
&lt;/code&gt;&lt;/pre&gt;
2016-10-01 07:47:26 +02:00
&lt;h2 id=&#34;2016-09-30&#34;&gt;2016-09-30&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Deny access to REST API&amp;rsquo;s &lt;code&gt;find-by-metadata-field&lt;/code&gt; endpoint to protect against an upstream security issue (DS-3250)&lt;/li&gt;
&lt;li&gt;There is a patch but it is only for 5.5 and doesn&amp;rsquo;t apply cleanly to 5.1&lt;/li&gt;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
2016-09-02 10:44:44 +02:00
</item>
<item>
<title>August, 2016</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2016-08/</link>
<pubDate>Mon, 01 Aug 2016 15:53:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2016-08/</guid>
2016-10-03 17:28:33 +02:00
<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;
2016-08-02 00:06:47 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&gt;
2016-08-02 00:06:47 +02:00
&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;
2016-08-02 14:03:28 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-08-02&#34;&gt;2016-08-02&lt;/h2&gt;
2016-08-02 14:03:28 +02:00
&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;
2016-08-05 13:05:32 +02:00
&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;
2016-08-05 15:38:43 +02:00
&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;
2016-08-06 15:55:17 +02:00
&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;
2016-08-08 22:22:50 +02:00
&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;
2016-08-09 11:31:06 +02:00
&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;
2016-08-10 12:19:46 +02:00
&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;
2016-08-11 07:50:33 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-08-15 10:34:55 +02:00
&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;
2016-09-21 14:24:28 +02:00
&lt;p&gt;&lt;img src=&#34;2016/08/nodejs-nginx.png&#34; alt=&#34;ExpressJS running behind nginx&#34; /&gt;&lt;/p&gt;
2016-08-17 06:19:11 +02:00
&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;
2016-08-17 13:40:16 +02:00
&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;
2016-08-18 14:48:32 +02:00
&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;
2016-08-18 15:35:08 +02:00
&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;
2016-08-21 16:10:08 +02:00
&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;
2016-08-21 17:10:52 +02:00
&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;
2016-08-21 16:10:08 +02:00
&lt;/ul&gt;
2016-08-22 18:29:35 +02:00
&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;
2016-08-23 15:16:10 +02:00
&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;
2016-08-25 10:09:07 +02:00
&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;
2016-08-25 13:59:59 +02:00
&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;
2016-08-25 20:09:55 +02:00
&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;
2016-08-26 22:49:43 +02:00
&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;
2016-08-27 09:20:02 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
</item>
2016-07-01 15:00:04 +02:00
<item>
<title>July, 2016</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2016-07/</link>
2016-07-01 15:00:04 +02:00
<pubDate>Fri, 01 Jul 2016 10:53:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2016-07/</guid>
2016-10-03 17:28:33 +02:00
<description>&lt;h2 id=&#34;2016-07-01&#34;&gt;2016-07-01&lt;/h2&gt;
2016-07-01 15:00:04 +02:00
&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;
2016-07-02 16:04:52 +02:00
&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;
2016-07-01 15:00:04 +02:00
&lt;/ul&gt;
2016-07-01 15:56:54 +02:00
2016-09-02 15:43:39 +02:00
&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;;
2016-07-01 15:56:54 +02:00
UPDATE 95
2016-09-02 15:43:39 +02:00
dspacetest=# select text_value from metadatavalue where metadata_field_id=3 and resource_type_id=2 and text_value ~ &#39;^.+?,$&#39;;
2016-07-01 15:56:54 +02:00
text_value
------------
(0 rows)
&lt;/code&gt;&lt;/pre&gt;
2016-07-02 16:04:52 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&gt;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-02&#34;&gt;2016-07-02&lt;/h2&gt;
2016-07-02 16:04:52 +02:00
&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;
2016-07-05 18:07:25 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-04&#34;&gt;2016-07-04&lt;/h2&gt;
2016-07-05 18:07:25 +02:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-05&#34;&gt;2016-07-05&lt;/h2&gt;
2016-07-05 18:07:25 +02:00
&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;
2016-07-06 17:49:52 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-06&#34;&gt;2016-07-06&lt;/h2&gt;
2016-07-06 17:49:52 +02:00
&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;
2016-07-07 08:21:12 +02:00
$ ./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;
2016-07-06 17:49:52 +02:00
&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;
2016-07-11 22:10:00 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-11&#34;&gt;2016-07-11&lt;/h2&gt;
2016-07-11 22:10:00 +02:00
&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;
2016-07-13 15:05:33 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-13&#34;&gt;2016-07-13&lt;/h2&gt;
2016-07-13 15:05:33 +02:00
&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;
2016-07-18 16:25:30 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-14&#34;&gt;2016-07-14&lt;/h2&gt;
2016-07-25 13:04:28 +02:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-18&#34;&gt;2016-07-18&lt;/h2&gt;
2016-07-18 16:25:30 +02:00
&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;
2016-07-19 13:38:30 +02:00
&lt;li&gt;CGSpace crashed late at night and the DSpace logs were showing:&lt;/li&gt;
2016-07-18 16:25:30 +02:00
&lt;/ul&gt;
2016-07-19 13:38:30 +02:00
&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;
2016-07-21 17:06:56 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-21&#34;&gt;2016-07-21&lt;/h2&gt;
2016-07-21 17:06:56 +02:00
&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;
2016-07-22 13:58:35 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-22&#34;&gt;2016-07-22&lt;/h2&gt;
2016-07-22 13:58:35 +02:00
&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;
2016-07-22 16:59:12 +02:00
&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;
2016-07-22 18:42:57 +02:00
&lt;li&gt;&amp;hellip; no luck. Trying with just:&lt;/li&gt;
2016-07-22 13:58:35 +02:00
&lt;/ul&gt;
2016-07-22 18:42:57 +02:00
&lt;pre&gt;&lt;code&gt;index.authority.ignore=true
&lt;/code&gt;&lt;/pre&gt;
2016-07-25 13:04:28 +02:00
&lt;ul&gt;
&lt;li&gt;After re-indexing and clearing the XMLUI cache nothing has changed&lt;/li&gt;
&lt;/ul&gt;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-07-25&#34;&gt;2016-07-25&lt;/h2&gt;
2016-07-25 13:04:28 +02:00
&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;
2016-07-25 15:15:54 +02:00
2016-09-21 14:24:28 +02:00
&lt;p&gt;&lt;img src=&#34;2016/07/cgspace-about-page.png&#34; alt=&#34;About page&#34; /&gt;&lt;/p&gt;
2016-07-25 15:55:00 +02:00
&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;
2016-07-25 20:03:34 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
2016-07-01 15:00:04 +02:00
</item>
2016-06-07 23:28:43 +02:00
<item>
<title>June, 2016</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2016-06/</link>
2016-06-07 23:28:43 +02:00
<pubDate>Wed, 01 Jun 2016 10:53:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2016-06/</guid>
2016-10-03 17:28:33 +02:00
<description>&lt;h2 id=&#34;2016-06-01&#34;&gt;2016-06-01&lt;/h2&gt;
2016-06-07 23:28:43 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&gt;
2016-06-07 23:28:43 +02:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-02&#34;&gt;2016-06-02&lt;/h2&gt;
2016-06-07 23:28:43 +02:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-03&#34;&gt;2016-06-03&lt;/h2&gt;
2016-06-07 23:28:43 +02:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-04&#34;&gt;2016-06-04&lt;/h2&gt;
2016-06-07 23:28:43 +02:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-07&#34;&gt;2016-06-07&lt;/h2&gt;
2016-06-07 23:28:43 +02:00
&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;
2016-06-07 23:33:01 +02:00
&lt;li&gt;&lt;p&gt;Identified the next round of fields to migrate:&lt;/p&gt;
2016-06-07 23:28:43 +02:00
&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;
2016-06-07 23:33:01 +02:00
&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;
2016-06-07 23:28:43 +02:00
&lt;/ul&gt;
2016-06-09 08:42:38 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-08&#34;&gt;2016-06-08&lt;/h2&gt;
2016-06-09 08:42:38 +02:00
&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;
2016-06-09 16:01:39 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-09&#34;&gt;2016-06-09&lt;/h2&gt;
2016-06-09 16:01:39 +02:00
&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;
2016-06-10 16:02:55 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-10&#34;&gt;2016-06-10&lt;/h2&gt;
2016-06-10 16:02:55 +02:00
&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;
2016-06-11 09:31:19 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-11&#34;&gt;2016-06-11&lt;/h2&gt;
2016-06-11 09:31:19 +02:00
&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;
2016-06-17 18:36:04 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-17&#34;&gt;2016-06-17&lt;/h2&gt;
2016-06-17 18:36:04 +02:00
&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;
2016-06-18 16:07:40 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-18&#34;&gt;2016-06-18&lt;/h2&gt;
2016-06-18 16:07:40 +02:00
&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;
2016-06-20 07:11:24 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-20&#34;&gt;2016-06-20&lt;/h2&gt;
2016-06-20 07:11:24 +02:00
&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;
2016-06-20 07:12:19 +02:00
&lt;ul&gt;
&lt;li&gt;I really need to fix that cron job&amp;hellip;&lt;/li&gt;
&lt;/ul&gt;
2016-06-24 14:17:19 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-24&#34;&gt;2016-06-24&lt;/h2&gt;
2016-06-24 14:17:19 +02:00
&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;
2016-06-24 14:34:52 +02:00
&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;
2016-06-24 19:01:43 +02:00
&lt;li&gt;Refine submission form labels and hints&lt;/li&gt;
2016-06-24 14:17:19 +02:00
&lt;/ul&gt;
2016-06-28 15:46:09 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-28&#34;&gt;2016-06-28&lt;/h2&gt;
2016-06-28 15:46:09 +02:00
&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;
2016-06-29 21:06:28 +02:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-29&#34;&gt;2016-06-29&lt;/h2&gt;
2016-06-29 21:06:28 +02:00
&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;
2016-06-30 18:22:18 +02:00
&lt;li&gt;Now the sharing and Altmetric bits are more prominent:&lt;/li&gt;
&lt;/ul&gt;
2016-09-21 14:24:28 +02:00
&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;
2016-06-30 18:22:18 +02:00
&lt;ul&gt;
2016-06-29 21:06:28 +02:00
&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;
2016-06-30 18:22:18 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-06-30&#34;&gt;2016-06-30&lt;/h2&gt;
2016-06-30 18:22:18 +02:00
&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;
2016-07-01 15:56:54 +02:00
&lt;pre&gt;&lt;code&gt;# select text_value from metadatavalue where metadata_field_id=3 and text_value like &#39;%,&#39;;
2016-06-30 18:22:18 +02:00
&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;
2016-07-02 16:04:52 +02:00
&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;;
2016-10-03 17:28:33 +02:00
&lt;/code&gt;&lt;/pre&gt;</description>
2016-06-07 23:28:43 +02:00
</item>
2016-05-02 00:33:35 +02:00
<item>
<title>May, 2016</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2016-05/</link>
2016-05-02 00:33:35 +02:00
<pubDate>Sun, 01 May 2016 23:06:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2016-05/</guid>
2016-10-03 17:28:33 +02:00
<description>&lt;h2 id=&#34;2016-05-01&#34;&gt;2016-05-01&lt;/h2&gt;
2016-05-02 00:33:35 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&gt;
2016-05-02 00:33:35 +02:00
&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;
2016-05-06 16:23:30 +02:00
&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;
2016-05-02 00:33:35 +02:00
&lt;/ul&gt;
2016-05-03 11:05:03 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-03&#34;&gt;2016-05-03&lt;/h2&gt;
2016-05-03 11:05:03 +02:00
&lt;ul&gt;
&lt;li&gt;Update nginx to 1.10.x branch on CGSpace&lt;/li&gt;
2016-05-03 13:33:21 +02:00
&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;
2016-05-03 11:05:03 +02:00
&lt;/ul&gt;
2016-05-03 13:33:21 +02:00
2016-09-21 14:24:28 +02:00
&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;
2016-05-06 16:23:30 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-06&#34;&gt;2016-05-06&lt;/h2&gt;
2016-05-06 16:23:30 +02:00
&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;
2016-05-06 17:00:59 +02:00
&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;
2016-05-06 16:23:30 +02:00
&lt;/ul&gt;
2016-05-10 13:22:31 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-10&#34;&gt;2016-05-10&lt;/h2&gt;
2016-05-10 13:22:31 +02:00
&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;
2016-05-10 17:05:55 +02:00
&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;
2016-05-10 13:22:31 +02:00
&lt;/ul&gt;
2016-05-11 11:48:28 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-11&#34;&gt;2016-05-11&lt;/h2&gt;
2016-05-11 11:48:28 +02:00
&lt;ul&gt;
2016-05-11 16:51:09 +02:00
&lt;li&gt;&lt;p&gt;Identify and propose the next phase of CGSpace fields to migrate:&lt;/p&gt;
2016-05-11 11:48:28 +02:00
&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;
2016-05-11 16:51:09 +02:00
&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;
2016-05-11 16:58:26 +02:00
&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;
2016-05-12 17:40:59 +02:00
&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;
2016-05-11 11:48:28 +02:00
&lt;/ul&gt;
2016-05-12 17:40:59 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-12&#34;&gt;2016-05-12&lt;/h2&gt;
2016-05-12 17:40:59 +02:00
&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;
2016-05-13 16:41:39 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-13&#34;&gt;2016-05-13&lt;/h2&gt;
2016-05-13 16:41:39 +02:00
&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;
2016-05-18 16:51:15 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-18&#34;&gt;2016-05-18&lt;/h2&gt;
2016-05-18 16:51:15 +02:00
&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;
2016-05-19 10:22:29 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-19&#34;&gt;2016-05-19&lt;/h2&gt;
2016-05-19 10:22:29 +02:00
&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;
2016-05-19 11:04:26 +02:00
&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;
2016-05-19 10:22:29 +02:00
&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
2016-05-19 11:04:26 +02:00
&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;
2016-05-20 13:35:36 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-20&#34;&gt;2016-05-20&lt;/h2&gt;
2016-05-20 13:35:36 +02:00
&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;
2016-05-20 17:49:02 +02:00
&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;
2016-05-20 13:35:36 +02:00
&lt;/ul&gt;
2016-05-23 10:48:51 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-23&#34;&gt;2016-05-23&lt;/h2&gt;
2016-05-23 10:48:51 +02:00
&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;
2016-05-30 08:59:13 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-05-30&#34;&gt;2016-05-30&lt;/h2&gt;
2016-05-30 08:59:13 +02:00
&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;
2016-05-30 18:01:10 +02:00
&lt;li&gt;And then import to CGSpace:&lt;/li&gt;
2016-05-30 08:59:13 +02:00
&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;
2016-05-30 18:40:10 +02:00
&lt;li&gt;Clean up and import ~200 CTA records to CGSpace via CSV like:&lt;/li&gt;
2016-05-30 08:59:13 +02:00
&lt;/ul&gt;
2016-05-30 18:40:10 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-05-31 14:21:42 +02:00
&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;
2016-05-31 17:45:52 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
2016-05-02 00:33:35 +02:00
</item>
<item>
<title>April, 2016</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2016-04/</link>
<pubDate>Mon, 04 Apr 2016 11:06:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2016-04/</guid>
2016-10-03 17:28:33 +02:00
<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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&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;
2016-08-03 09:09:36 +02:00
&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;
2016-04-06 12:50:43 +02:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-06&#34;&gt;2016-04-06&lt;/h2&gt;
2016-04-06 12:50:43 +02:00
&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;
2016-04-07 16:49:46 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-07&#34;&gt;2016-04-07&lt;/h2&gt;
2016-04-07 16:49:46 +02:00
&lt;ul&gt;
2016-04-07 16:50:16 +02:00
&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;
2016-04-07 16:49:46 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-04-12 17:18:36 +02:00
&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;
2016-04-14 11:20:22 +02:00
&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;
2016-04-12 17:18:36 +02:00
&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;
2016-04-14 11:20:22 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-14&#34;&gt;2016-04-14&lt;/h2&gt;
2016-04-14 11:20:22 +02:00
&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;
2016-04-15 16:30:18 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-15&#34;&gt;2016-04-15&lt;/h2&gt;
2016-04-15 16:30:18 +02:00
&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;
2016-04-18 18:01:18 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-18&#34;&gt;2016-04-18&lt;/h2&gt;
2016-04-18 18:01:18 +02:00
&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;
2016-04-18 19:17:29 +02:00
&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;
2016-04-18 22:47:58 +02:00
&lt;li&gt;Test metadata migration on local instance again:&lt;/li&gt;
2016-04-18 18:01:18 +02:00
&lt;/ul&gt;
2016-04-18 22:47:58 +02:00
&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;
2016-04-19 14:49:29 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-19&#34;&gt;2016-04-19&lt;/h2&gt;
2016-04-19 14:49:29 +02:00
&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;
2016-04-19 18:23:10 +02:00
&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;
2016-04-19 14:49:29 +02:00
&lt;/ul&gt;
2016-04-20 18:21:18 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-20&#34;&gt;2016-04-20&lt;/h2&gt;
2016-04-20 18:21:18 +02:00
&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;
2016-04-20 20:09:33 +02:00
&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;
2016-04-20 18:21:18 +02:00
&lt;/ul&gt;
2016-04-21 15:56:44 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-21&#34;&gt;2016-04-21&lt;/h2&gt;
2016-04-21 15:56:44 +02:00
&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;
2016-04-22 09:17:08 +02:00
&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;
2016-04-21 15:56:44 +02:00
&lt;/ul&gt;
2016-04-22 14:22:12 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-22&#34;&gt;2016-04-22&lt;/h2&gt;
2016-04-22 14:22:12 +02:00
&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;
2016-04-26 14:24:07 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-26&#34;&gt;2016-04-26&lt;/h2&gt;
2016-04-26 14:24:07 +02:00
&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;
2016-04-26 16:22:08 +02:00
&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;
2016-04-26 14:24:07 +02:00
&lt;/ul&gt;
2016-04-27 08:14:15 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-27&#34;&gt;2016-04-27&lt;/h2&gt;
2016-04-27 08:14:15 +02:00
&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;
2016-04-28 11:06:09 +02:00
&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;
2016-04-27 10:56:12 +02:00
&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;
2016-04-27 14:36:51 +02:00
&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;
2016-04-27 23:45:58 +02:00
&lt;li&gt;CGSpace down, restarted tomcat and it&amp;rsquo;s back up&lt;/li&gt;
2016-04-27 08:14:15 +02:00
&lt;/ul&gt;
2016-04-28 11:05:06 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-28&#34;&gt;2016-04-28&lt;/h2&gt;
2016-04-28 11:05:06 +02:00
&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;
2016-04-30 17:37:47 +02:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-04-30&#34;&gt;2016-04-30&lt;/h2&gt;
2016-04-30 17:37:47 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
</item>
<item>
<title>March, 2016</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2016-03/</link>
<pubDate>Wed, 02 Mar 2016 16:50:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2016-03/</guid>
2016-10-03 17:28:33 +02:00
<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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&gt;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-09-21 14:24:28 +02:00
&lt;p&gt;&lt;img src=&#34;2016/03/missing-xmlui-string.png&#34; alt=&#34;Missing XMLUI string&#34; /&gt;&lt;/p&gt;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
</item>
<item>
<title>February, 2016</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2016-02/</link>
<pubDate>Fri, 05 Feb 2016 13:18:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2016-02/</guid>
2016-10-03 17:28:33 +02:00
<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;
2016-09-21 14:24:28 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&gt;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-02-17 22:17:11 +01:00
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-02-16&#34;&gt;2016-02-16&lt;/h2&gt;
2016-02-17 22:17:11 +01:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-02-17&#34;&gt;2016-02-17&lt;/h2&gt;
2016-02-17 22:17:11 +01:00
&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;
2016-02-20 17:53:36 +01:00
&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;
2016-08-03 09:09:36 +02:00
&lt;h2 id=&#34;2016-02-20&#34;&gt;2016-02-20&lt;/h2&gt;
2016-02-20 17:53:36 +01:00
&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;
2016-02-17 22:17:11 +01:00
&lt;/ul&gt;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
</item>
<item>
<title>January, 2016</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2016-01/</link>
<pubDate>Wed, 13 Jan 2016 13:18:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2016-01/</guid>
2016-10-03 17:28:33 +02:00
<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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&gt;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-10-03 17:28:33 +02:00
&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>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2015-12/</link>
<pubDate>Wed, 02 Dec 2015 13:18:00 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2015-12/</guid>
2016-10-03 17:28:33 +02:00
<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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&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;
2016-09-21 14:24:28 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-09-21 14:24:28 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
</item>
<item>
<title>November, 2015</title>
2016-08-03 09:09:36 +02:00
<link>https://alanorth.github.io/cgspace-notes/2015-11/</link>
<pubDate>Mon, 23 Nov 2015 17:00:57 +0300</pubDate>
2016-08-03 09:09:36 +02:00
<guid>https://alanorth.github.io/cgspace-notes/2015-11/</guid>
2016-10-03 17:28:33 +02:00
<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;
2016-10-03 17:28:33 +02:00
&lt;p&gt;&lt;/p&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-08-03 09:09:36 +02:00
&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;
2016-10-03 17:28:33 +02:00
&lt;/ul&gt;</description>
</item>
</channel>
</rss>