mirror of
https://github.com/alanorth/cgspace-notes.git
synced 2025-01-27 05:49:12 +01:00
Update notes for 2019-01-21
This commit is contained in:
@ -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=)
|
||||
- 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: -->
|
||||
|
Reference in New Issue
Block a user