mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2024-11-04 22:33:02 +01:00
Update notes for 2019-01-21
This commit is contained in:
parent
e05de559fa
commit
b90f4d3e45
@ -605,4 +605,79 @@ sys 0m2.396s
|
|||||||
- The query currently shows 3023 items, but a [Discovery search for Livestock CRP only returns 858 items](https://cgspace.cgiar.org/discover?filtertype_1=crpsubject&filter_relational_operator_1=equals&filter_1=Livestock&submit_apply_filter=&query=)
|
- The query currently shows 3023 items, but a [Discovery search for Livestock CRP only returns 858 items](https://cgspace.cgiar.org/discover?filtertype_1=crpsubject&filter_relational_operator_1=equals&filter_1=Livestock&submit_apply_filter=&query=)
|
||||||
- That query seems to return items tagged with `Livestock and Fish` CRP as well... hmm.
|
- That query seems to return items tagged with `Livestock and Fish` CRP as well... hmm.
|
||||||
|
|
||||||
|
## 2019-01-21
|
||||||
|
|
||||||
|
- Investigating running Tomcat 7 on Ubuntu 18.04 with the tarball and a custom systemd package instead of waiting for our DSpace to get compatible with Ubuntu 18.04's Tomcat 8.5
|
||||||
|
- I could either run with a simple `tomcat7.service` like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Apache Tomcat 7 Web Application Container
|
||||||
|
After=network.target
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/path/to/apache-tomcat-7.0.92/bin/startup.sh
|
||||||
|
ExecStop=/path/to/apache-tomcat-7.0.92/bin/shutdown.sh
|
||||||
|
User=aorth
|
||||||
|
Group=aorth
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
- Or try to use adapt a real systemd service like Arch Linux's:
|
||||||
|
|
||||||
|
```
|
||||||
|
[Unit]
|
||||||
|
Description=Tomcat 7 servlet container
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/var/run/tomcat7.pid
|
||||||
|
Environment=CATALINA_PID=/var/run/tomcat7.pid
|
||||||
|
Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/default-runtime
|
||||||
|
Environment=CATALINA_HOME=/usr/share/tomcat7
|
||||||
|
Environment=CATALINA_BASE=/usr/share/tomcat7
|
||||||
|
Environment=CATALINA_OPTS=
|
||||||
|
Environment=ERRFILE=SYSLOG
|
||||||
|
Environment=OUTFILE=SYSLOG
|
||||||
|
|
||||||
|
ExecStart=/usr/bin/jsvc \
|
||||||
|
-Dcatalina.home=${CATALINA_HOME} \
|
||||||
|
-Dcatalina.base=${CATALINA_BASE} \
|
||||||
|
-Djava.io.tmpdir=/var/tmp/tomcat7/temp \
|
||||||
|
-cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \
|
||||||
|
-user tomcat7 \
|
||||||
|
-java-home ${TOMCAT_JAVA_HOME} \
|
||||||
|
-pidfile /var/run/tomcat7.pid \
|
||||||
|
-errfile ${ERRFILE} \
|
||||||
|
-outfile ${OUTFILE} \
|
||||||
|
$CATALINA_OPTS \
|
||||||
|
org.apache.catalina.startup.Bootstrap
|
||||||
|
|
||||||
|
ExecStop=/usr/bin/jsvc \
|
||||||
|
-pidfile /var/run/tomcat7.pid \
|
||||||
|
-stop \
|
||||||
|
org.apache.catalina.startup.Bootstrap
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
- I see that `jsvc` and `libcommons-daemon-java` are both available on Ubuntu so that should be easy to port
|
||||||
|
- We probably don't need Eclipse Java Bytecode Compiler (ecj)
|
||||||
|
- I tested Tomcat 7.0.92 on Arch Linux using the `tomcat7.service` with `jsvc` and it works... nice!
|
||||||
|
- I think I might manage this the same way I do the restic releases in the [Ansible infrastructure scripts](https://github.com/ilri/rmg-ansible-public), where I download a specific version and symlink to some generic location without the version number
|
||||||
|
- I verified that there is indeed an issue with sharded Solr statistics cores on DSpace, which will cause inaccurate results in the dspace-statistics-api:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ http 'http://localhost:3000/solr/statistics/select?indent=on&rows=0&q=type:2+id:11576&fq=isBot:false&fq=statistics_type:view' | grep numFound
|
||||||
|
<result name="response" numFound="33" start="0">
|
||||||
|
$ http 'http://localhost:3000/solr/statistics-2018/select?indent=on&rows=0&q=type:2+id:11576&fq=isBot:false&fq=statistics_type:view' | grep numFound
|
||||||
|
<result name="response" numFound="241" start="0">
|
||||||
|
```
|
||||||
|
|
||||||
|
- I opened an issue on the GitHub issue tracker ([#10](https://github.com/ilri/dspace-statistics-api/issues/10))
|
||||||
|
- I don't think the [SolrClient library](https://solrclient.readthedocs.io/en/latest/) we are currently using supports these type of queries so we might have to just do raw queries with requests
|
||||||
|
|
||||||
<!-- vim: set sw=2 ts=2: -->
|
<!-- vim: set sw=2 ts=2: -->
|
||||||
|
@ -27,7 +27,7 @@ I don’t see anything interesting in the web server logs around that time t
|
|||||||
" />
|
" />
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />
|
||||||
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2019-01/" /><meta property="article:published_time" content="2019-01-02T09:48:30+02:00"/>
|
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2019-01/" /><meta property="article:published_time" content="2019-01-02T09:48:30+02:00"/>
|
||||||
<meta property="article:modified_time" content="2019-01-20T15:48:52+02:00"/>
|
<meta property="article:modified_time" content="2019-01-20T17:14:43+02:00"/>
|
||||||
|
|
||||||
<meta name="twitter:card" content="summary"/>
|
<meta name="twitter:card" content="summary"/>
|
||||||
<meta name="twitter:title" content="January, 2019"/>
|
<meta name="twitter:title" content="January, 2019"/>
|
||||||
@ -60,9 +60,9 @@ I don’t see anything interesting in the web server logs around that time t
|
|||||||
"@type": "BlogPosting",
|
"@type": "BlogPosting",
|
||||||
"headline": "January, 2019",
|
"headline": "January, 2019",
|
||||||
"url": "https://alanorth.github.io/cgspace-notes/2019-01/",
|
"url": "https://alanorth.github.io/cgspace-notes/2019-01/",
|
||||||
"wordCount": "2840",
|
"wordCount": "3120",
|
||||||
"datePublished": "2019-01-02T09:48:30+02:00",
|
"datePublished": "2019-01-02T09:48:30+02:00",
|
||||||
"dateModified": "2019-01-20T15:48:52+02:00",
|
"dateModified": "2019-01-20T17:14:43+02:00",
|
||||||
"author": {
|
"author": {
|
||||||
"@type": "Person",
|
"@type": "Person",
|
||||||
"name": "Alan Orth"
|
"name": "Alan Orth"
|
||||||
@ -852,6 +852,86 @@ sys 0m2.396s
|
|||||||
<li>That query seems to return items tagged with <code>Livestock and Fish</code> CRP as well… hmm.</li>
|
<li>That query seems to return items tagged with <code>Livestock and Fish</code> CRP as well… hmm.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h2 id="2019-01-21">2019-01-21</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Investigating running Tomcat 7 on Ubuntu 18.04 with the tarball and a custom systemd package instead of waiting for our DSpace to get compatible with Ubuntu 18.04’s Tomcat 8.5</li>
|
||||||
|
<li>I could either run with a simple <code>tomcat7.service</code> like this:</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<pre><code>[Unit]
|
||||||
|
Description=Apache Tomcat 7 Web Application Container
|
||||||
|
After=network.target
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/path/to/apache-tomcat-7.0.92/bin/startup.sh
|
||||||
|
ExecStop=/path/to/apache-tomcat-7.0.92/bin/shutdown.sh
|
||||||
|
User=aorth
|
||||||
|
Group=aorth
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>Or try to use adapt a real systemd service like Arch Linux’s:</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<pre><code>[Unit]
|
||||||
|
Description=Tomcat 7 servlet container
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
PIDFile=/var/run/tomcat7.pid
|
||||||
|
Environment=CATALINA_PID=/var/run/tomcat7.pid
|
||||||
|
Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/default-runtime
|
||||||
|
Environment=CATALINA_HOME=/usr/share/tomcat7
|
||||||
|
Environment=CATALINA_BASE=/usr/share/tomcat7
|
||||||
|
Environment=CATALINA_OPTS=
|
||||||
|
Environment=ERRFILE=SYSLOG
|
||||||
|
Environment=OUTFILE=SYSLOG
|
||||||
|
|
||||||
|
ExecStart=/usr/bin/jsvc \
|
||||||
|
-Dcatalina.home=${CATALINA_HOME} \
|
||||||
|
-Dcatalina.base=${CATALINA_BASE} \
|
||||||
|
-Djava.io.tmpdir=/var/tmp/tomcat7/temp \
|
||||||
|
-cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \
|
||||||
|
-user tomcat7 \
|
||||||
|
-java-home ${TOMCAT_JAVA_HOME} \
|
||||||
|
-pidfile /var/run/tomcat7.pid \
|
||||||
|
-errfile ${ERRFILE} \
|
||||||
|
-outfile ${OUTFILE} \
|
||||||
|
$CATALINA_OPTS \
|
||||||
|
org.apache.catalina.startup.Bootstrap
|
||||||
|
|
||||||
|
ExecStop=/usr/bin/jsvc \
|
||||||
|
-pidfile /var/run/tomcat7.pid \
|
||||||
|
-stop \
|
||||||
|
org.apache.catalina.startup.Bootstrap
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>I see that <code>jsvc</code> and <code>libcommons-daemon-java</code> are both available on Ubuntu so that should be easy to port</li>
|
||||||
|
<li>We probably don’t need Eclipse Java Bytecode Compiler (ecj)</li>
|
||||||
|
<li>I tested Tomcat 7.0.92 on Arch Linux using the <code>tomcat7.service</code> with <code>jsvc</code> and it works… nice!</li>
|
||||||
|
<li>I think I might manage this the same way I do the restic releases in the <a href="https://github.com/ilri/rmg-ansible-public">Ansible infrastructure scripts</a>, where I download a specific version and symlink to some generic location without the version number</li>
|
||||||
|
<li>I verified that there is indeed an issue with sharded Solr statistics cores on DSpace, which will cause inaccurate results in the dspace-statistics-api:</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<pre><code>$ http 'http://localhost:3000/solr/statistics/select?indent=on&rows=0&q=type:2+id:11576&fq=isBot:false&fq=statistics_type:view' | grep numFound
|
||||||
|
<result name="response" numFound="33" start="0">
|
||||||
|
$ http 'http://localhost:3000/solr/statistics-2018/select?indent=on&rows=0&q=type:2+id:11576&fq=isBot:false&fq=statistics_type:view' | grep numFound
|
||||||
|
<result name="response" numFound="241" start="0">
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>I opened an issue on the GitHub issue tracker (<a href="https://github.com/ilri/dspace-statistics-api/issues/10">#10</a>)</li>
|
||||||
|
<li>I don’t think the <a href="https://solrclient.readthedocs.io/en/latest/">SolrClient library</a> we are currently using supports these type of queries so we might have to just do raw queries with requests</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
<!-- vim: set sw=2 ts=2: -->
|
<!-- vim: set sw=2 ts=2: -->
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/2019-01/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/2019-01/</loc>
|
||||||
<lastmod>2019-01-20T15:48:52+02:00</lastmod>
|
<lastmod>2019-01-20T17:14:43+02:00</lastmod>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
@ -204,7 +204,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/</loc>
|
||||||
<lastmod>2019-01-20T15:48:52+02:00</lastmod>
|
<lastmod>2019-01-20T17:14:43+02:00</lastmod>
|
||||||
<priority>0</priority>
|
<priority>0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -215,7 +215,7 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc>
|
||||||
<lastmod>2019-01-20T15:48:52+02:00</lastmod>
|
<lastmod>2019-01-20T17:14:43+02:00</lastmod>
|
||||||
<priority>0</priority>
|
<priority>0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
@ -227,13 +227,13 @@
|
|||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/posts/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/posts/</loc>
|
||||||
<lastmod>2019-01-20T15:48:52+02:00</lastmod>
|
<lastmod>2019-01-20T17:14:43+02:00</lastmod>
|
||||||
<priority>0</priority>
|
<priority>0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
<url>
|
<url>
|
||||||
<loc>https://alanorth.github.io/cgspace-notes/tags/</loc>
|
<loc>https://alanorth.github.io/cgspace-notes/tags/</loc>
|
||||||
<lastmod>2019-01-20T15:48:52+02:00</lastmod>
|
<lastmod>2019-01-20T17:14:43+02:00</lastmod>
|
||||||
<priority>0</priority>
|
<priority>0</priority>
|
||||||
</url>
|
</url>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user