Notes for Development Block 3.4
===============================

Previous epad notes: http://epad.dataone.org/2014-22-Block-3-3

https://plus.google.com/hangouts/_/nceas.ucsb.edu/d1-standup
G+ URL: https://plus.google.com/hangouts/_/event/cqpnckqbr0s8o40kpk3r20ko8s0

Etherpad for V1, V2 API naming convention: http://epad.dataone.org/20140701-API-V2

Sprint Planning for Block 3.4
-----------------------------
Skye
----
Rob
---
Robert
------
Roger
-----
David D
-------
Peter
-----
Chris
-----
Jing
=====
Topics
======
            5073/5074 
            /(5055+1=5056)
metacat=> select sum(number_replicas) from systemmetadata where number_replicas != -1;
            sum  
            -------
            15048
            (1 row)
         the number of smreplicationstatus should be 
         15048+ 5077(total objects (this is for orginal node))+ 5055(sci metadata in cn) + N (number of ORE on CN) =25180
         
curl --cert /etc/dataone/client/private/urn_node_cnSandboxUCSB1.pem  "https://mn-sandbox-ucsb-1.test.dataone.org/knb/d1/mn/v1/log?start=0&count=0

<?xml version="1.0" encoding="UTF-8"?><d1:log xmlns:d1="http://ns.dataone.org/service/types/v1" count="0" start="0" total="3735493"/>

 curl --cert /etc/dataone/client/private/urn_node_cnSandboxUCSB1.pem  "https://cn-sandbox-ucsb-1.test.dataone.org/cn/v1/log/select?q=nodeId:urn*UCSB1&start=0&rows=1&wt=xml&indent=on" 
 
 
<?xml version="1.0" encoding="UTF-8"?>
<d1:log xmlns:d1="http://ns.dataone.org/service/types/v1" total="5037" start="0" count="1">
<logEntry>
<entryId>588</entryId>
<identifier>doi:10.5072/FK2/LTER/knb-lter-gce.129.19</identifier>
<ipAddress>128.111.54.77</ipAddress>
<userAgent>N/A</userAgent>
<subject>CN=urn:node:cnSandboxUCSB1,DC=dataone,DC=org</subject>
<event>create</event>
<dateLogged>2014-06-15T05:49:01.055Z</dateLogged>
<nodeIdentifier>urn:node:cnSandboxUCSB1</nodeIdentifier>
</logEntry>
</d1:log>

<error detailCode="-1" errorCode="500" name="ServiceFailure">
&lt;p&gt;The server encountered an internal error or
 admin@nkn.uidaho.edu and inform them of the time the error occurred,
caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available
in the server error log.&lt;/p&gt;
</error>

ERROR
curl --trace curl.out --cert /etc/dataone/client/private/urn_node_cnSandboxUCSB1.pem  --cacert /etc/ssl/certs/DataONETestCAChain.crt  "https://cn-sandbox-ucsb-1.test.dataone.org/cn/v1/node"

This works
curl --trace curl.out --cert /etc/dataone/client/private/urn_node_cnStageORC1.pem --cacert /etc/ssl/certs/DataONETestCAChain.crt "https://cn-stage-orc-1.test.dataone.org/cn/v1/node"

Same error in dev env:
sudo curl --trace curl.out --cert /etc/dataone/client/private/urn_node_cnDevUCSB1.pem --cacert /etc/ssl/certs/DataONETestCAChain.crt "https://cn-dev-ucsb-1.test.dataone.org/cn/v1/node"

gives the error:
curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
 
 
openssl x509 -in /etc/dataone/client/private/urn_node_cnStageORC1.pem -noout -text

LogAggregator.active=TRUE
LogAggregator.solrUrl=http://localhost:8080/solr/d1-cn-log
LogAggregator.solrUrlPath=/solr/d1-cn-log
LogAggregator.logRecords_batch_size=1000
# cn_base_url should point to metacat in order to grab the logs maintained there
LogAggregator.cn_base_url=https://cn-sandbox-ucsb-1.test.dataone.org/metacat/d1/cn
LogAggregator.delayStartOffset.minutes=10
LogAggregator.delayRecoveryOffset.minutes=5
# the field name of the period to calculate interval between trigger 
# firings of logAggregation jobs. Valid values are hours, minutes or seconds
LogAggregator.triggerInterval.periodField=minutes
LogAggregator.triggerInterval.period=1440



wipe off metacat:

1. sudo /etc/init.d/tomcat7 stop

2. postgres@mn-sandbox-ucsb-2:~$ dropdb metacat
postgres@mn-sandbox-ucsb-2:~$ createdb metacat

3. delete everything from /var/metacat/data and /var/metacat/documents

4. sudo vim /var/lib/tomcat7/webapps/knb/WEB-INF/metacat.properties
set 
configutil.databaseConfigured=false

5. start tomcat

6. configure tomcat

7. restart tomcat