Table of Contents |
---|
Series A:
Test Environment
Operating System
Composition of Resources
- Description of number of resources
- Description of structure of resources
- Description of inter-relationships between resources
- etc...
Initialization
- Description and commands for initializing the test environment
For example:
Ubuntu 16.10
Initialization
Start Fedora 4.7.1 -RC-2 one-click at port=8686 8081 and context=f4fcrepo1
Code Block java -Dfcrepo.dynamic.jms.port=6171761616 -Dfcrepo.dynamic.stomp.port=6171361613 -jar fcrepo-webapp/target/../fcrepo-webapp-4.7.1-SNAPSHOT-jetty-console.jar --port 8686headless --headlessport 8081 --contextPath /f4fcrepo1
Start Fedora Fedora 4.7.1 -RC-2 one-click at at port=8080 8082 and context=fcrepofcrepo2
Code Block java -Dfcrepo.dynamic.jms.port=61617 -Dfcrepo.dynamic.stomp.port=61614 -jar fcrepo-webapp/target/../fcrepo-webapp-4.7.1-SNAPSHOT-jetty-console.jar --headless --port 8080 --headless --contextPath /fcrepo
- Load resources per ingest.sh
- Example RDF of resources
- Download 0.1.0 import/export jar
Test 0 - Something
Description and commands for executing tests
Test 0 Conclusions
- Description of results
Test 1 - Something
8082 --contextPath /fcrepo2
- Clone the import/export tool, checkout branch from appropriate tag and build via maven.
Test 1 - The "ingest.sh" dummy data (with binaries)
Load ingest.sh into fcrepo1 context.
Export data from fcrepo1 context.
Code Block java -jar fcrepo-import-export-0.1.0.jar --mode export --resource http://localhost:8081/fcrepo1/rest/ --dir /home/pke3/Projects/fcrepo1/export --binaries
Import data into fcrepo2 from fcrepo1 export.
Code Block java -jar fcrepo-import-export-0.1.0.jar --mode import --resource http://localhost:8082/fcrepo2/rest/ --dir /home/pke3/Projects/fcrepo1/export --binaries
Received:
Code Block INFO 12:16:36.936 (ArgParser) Configuration file exists, new file will NOT be created: /tmp/importexport.yml INFO 12:16:36.941 (Importer) Running importer...
But http://localhost:8082/fcrepo2/rest/ shows no child resources. Checking the importexport_audit_[datetime].log shows:
Code Block 2017-01-30 12:16:37,246 Finished import... 0 resources imported
After some questioning of my sanity, I found that A. Woods' notes also seemed to show trouble at this stage. I attempted further log details as follows:
Code Block java -Dfcrepo.log.importexport=TRACE -jar target/fcrepo-import-export-0.1.0.jar --mode import --resource http://localhost:8082/fcrepo2/rest/ --dir /home/pke3/Projects/fcrepo1/export --binaries
And received the following in the log:
Code Block DEBUG 11:00:01.877 (ArgParser) Command line argments weren't valid for specifying a config file. INFO 11:00:01.944 (ArgParser) Configuration file exists, new file will NOT be created: /tmp/importexport.yml INFO 11:00:01.947 (Importer) Running importer... DEBUG 11:00:01.948 (Importer) No container exists in the metadata directory home/pke3/Projects/fcrepo1/export/fcrepo2/rest.ttl for the requested resource http://localhost:8082/fcrepo2/rest, importing all contained resources instead.
Test 1 Conclusions
- Was able to export, but unable to import (ingest.sh) dummy data (with binaries).
Test 2 - The "ingest.sh" dummy data (without binaries)
Load ingest.sh into fcrepo1 context.
Export data from fcrepo1 context.
Code Block java -jar target/fcrepo-import-export-0.1.0.jar --mode export --resource http://localhost:8081/fcrepo1/rest/ --dir /home/pke3/Projects/fcrepo1/export
Import data into fcrepo2 from fcrepo1 export.
Code Block java -jar target/fcrepo-import-export-0.1.0.jar --mode import --resource http://localhost:8082/fcrepo2/rest/ --dir /home/pke3/Projects/fcrepo1/export
Received:
Code Block INFO 12:16:36.936 (ArgParser) Configuration file exists, new file will NOT be created: /tmp/importexport.yml INFO 12:16:36.941 (Importer) Running importer...
But http://localhost:8082/fcrepo2/rest/ again shows no child resources. Checking the importexport_audit_[datetime].log shows:
Code Block 2017-01-30 12:16:37,246 Finished import... 0 resources imported
Debug logging via:
Code Block java -Dfcrepo.log.importexport=TRACE -jar target/fcrepo-import-export-0.1.0.jar --mode import --resource http://localhost:8082/fcrepo2/rest/ --dir /home/pke3/Projects/fcrepo1/export
Results in:
Code Block DEBUG 11:17:54.059 (ArgParser) Command line argments weren't valid for specifying a config file. INFO 11:17:54.155 (ArgParser) Configuration file exists, new file will NOT be created: /tmp/importexport.yml INFO 11:17:54.159 (Importer) Running importer... DEBUG 11:17:54.159 (Importer) No container exists in the metadata directory /home/pke3/Projects/fcrepo1/export/fcrepo2/rest.ttl for the requested resource http://localhost:8082/fcrepo2/rest, importing all contained resources instead.
Test 2 Conclusions
- Was able to export, but unable to import (ingest.sh) dummy data (without binaries).
Test 3 - Hydra data (with binaries)
Load hydra-dataset (from fcrepo-sample-dataset) into fcrepo1 context.
Code Block curl -X POST -d "/home/pke3/Projects/fcrepo-sample-dataset/additional_datasets/hydra/hydra-dataset" "http://localhost:8080/rest/fcr:restore"
Export data from fcrepo1 context.
Code Block java -jar target/fcrepo-import-export-0.1.0.jar --mode export --resource http://localhost:8081/fcrepo1/rest/ --dir /home/pke3/Projects/fcrepo1/export --binaries
Import data into fcrepo2 from fcrepo1 export.
Code Block java -jar target/fcrepo-import-export-0.1.0.jar --mode import --resource http://localhost:8082/fcrepo2/rest/ --dir /home/pke3/Projects/fcrepo1/export --binaries
Received:
Code Block INFO 12:16:36.936 (ArgParser) Configuration file exists, new file will NOT be created: /tmp/importexport.yml INFO 12:16:36.941 (Importer) Running importer...
But http://localhost:8082/fcrepo2/rest/ with this set as well shows no child resources. Checking the importexport_audit_[datetime].log shows:
Code Block 2017-01-30 12:16:37,246 Finished import... 0 resources imported
Debug logging via:
Code Block java -Dfcrepo.log.importexport=TRACE -jar target/fcrepo-import-export-0.1.0.jar --mode import --resource http://localhost:8082/fcrepo2/rest/ --dir /home/pke3/Projects/fcrepo1/export
Results in:
Code Block DEBUG 11:17:54.059 (ArgParser) Command line argments weren't valid for specifying a config file. INFO 11:17:54.155 (ArgParser) Configuration file exists, new file will NOT be created: /tmp/importexport.yml INFO 11:17:54.159 (Importer) Running importer... DEBUG 11:17:54.159 (Importer) No container exists in the metadata directory /home/pke3/Projects/fcrepo1/export/fcrepo2/rest.ttl for the requested resource http://localhost:8082/fcrepo2/rest, importing all contained resources instead.
Test 3 Conclusions
- Was able to export, but unable to import hydra data (with binaries).
Test 4 - Hydra data (without binaries)
- Same results as tests 1, 2, and 3.
Series B:
This series relates only to attempting to get the initial fcrepo-sample-dataset(s) restored into a fedora instance.
Test Environment
CentOS 7.1611
Initialization
Install tomcat
Code Block yum install tomcat tomcat-webapps tomcat-admin-webapps
Download fcrepo-webapp-4.7.1.war, place in /usr/share/tomcat/webapps/ directory.
- Clone the import/export tool, checkout branch from appropriate tag and build via maven.
- Clone the fcrepo-sample-dataset repo.
Use maven to build the target.
Code Block mvn clean install
Run the restore for the sample dataset.
Code Block mvn -Dfcrepo.url=http://localhost:8080/fcrepo/rest/ exec:java
Results:
Code Block [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building fcrepo-sample-dataset 4.1.2-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) > validate @ fcrepo-sample-dataset >>> [INFO] [INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) < validate @ fcrepo-sample-dataset <<< [INFO] [INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ fcrepo-sample-dataset --- INFO 12:08:28.803 (FedoraDatasetImport) fcrepoUrl:http://localhost:8081/fcrepo1/rest/ INFO 12:08:28.806 (FedoraDatasetImport) Dataset dir:/home/pke3/Projects/fcrepo-sample-dataset/target/classes/data INFO 12:08:28.807 (FedoraDatasetImport) fcrepo.authUser: null INFO 12:08:28.807 (FedoraDatasetImport) fcrepo.authPassword: null INFO 12:08:29.143 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/theOne-jcr.xml INFO 12:08:29.152 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/cityOfHeavenlyFire-jcr.xml INFO 12:08:29.165 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/cress-jcr.xml INFO 12:08:29.178 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/ff-fcr.xml INFO 12:08:29.184 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/sample-record.xml INFO 12:08:29.205 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/theBloodOfOlympus-jcr.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.460 s [INFO] Finished at: 2017-01-30T12:08:29-05:00 [INFO] Final Memory: 12M/290M [INFO] ------------------------------------------------------------------------
Looking at the FedoraDatasetImport.java file line 76 showed the original source of the error message. The previous boolean was evaluating to false. Guessed (no java debugging environment setup at the moment) that even though no authentication was required for the servlet / servlet container, that perhaps the java class required a username / password anyway. Attempted to run the restore again with dummy username / password.
Code Block mvn -Dfcrepo.authUser=blather -Dfcrepo.authPassword=skite -Dfcrepo.url=http://localhost:8080/fcrepo/rest/ exec:java
Resulted in:
Code Block [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building fcrepo-sample-dataset 4.1.2-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> exec-maven-plugin:1.2.1:java (default-cli) > validate @ fcrepo-sample-dataset >>> [INFO] [INFO] <<< exec-maven-plugin:1.2.1:java (default-cli) < validate @ fcrepo-sample-dataset <<< [INFO] [INFO] --- exec-maven-plugin:1.2.1:java (default-cli) @ fcrepo-sample-dataset --- INFO 12:08:28.803 (FedoraDatasetImport) fcrepoUrl:http://localhost:8081/fcrepo1/rest/ INFO 12:08:28.806 (FedoraDatasetImport) Dataset dir:/home/pke3/Projects/fcrepo-sample-dataset/target/classes/data INFO 12:08:28.807 (FedoraDatasetImport) fcrepo.authUser: blather INFO 12:08:28.807 (FedoraDatasetImport) fcrepo.authPassword: skite INFO 12:08:29.143 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/theOne-jcr.xml INFO 12:08:29.152 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/cityOfHeavenlyFire-jcr.xml INFO 12:08:29.165 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/cress-jcr.xml INFO 12:08:29.178 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/ff-fcr.xml INFO 12:08:29.184 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/sample-record.xml INFO 12:08:29.205 (FedoraDatasetImport) Failed to imported data file: /home/pke3/Projects/fcrepo-sample-dataset/target/classes/data/theBloodOfOlympus-jcr.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.460 s [INFO] Finished at: 2017-01-30T12:08:29-05:00 [INFO] Final Memory: 12M/290M [INFO] ------------------------------------------------------------------------
Worked through the Authentication & Authorization document to enable security, then attempted again with appropriate credentials but resulted in the same behavior. Performing the same setup using jetty, I discovered the following log entries:
Code Block INFO 22:08:28.964 (FedoraLdp) PUT resource '/fedora:system/fedora:transform/fedora:ldpath/default/nt:base' ERROR 22:08:29.141 (FedoraInvalidNamespaceExceptionMapper) NamespaceExceptionMapper caught an exception: Prefix fcr has not been registered ERROR 22:08:29.148 (FedoraInvalidNamespaceExceptionMapper) NamespaceExceptionMapper caught an exception: Prefix fcr has not been registered ERROR 22:08:29.163 (FedoraInvalidNamespaceExceptionMapper) NamespaceExceptionMapper caught an exception: Prefix fcr has not been registered ERROR 22:08:29.177 (FedoraInvalidNamespaceExceptionMapper) NamespaceExceptionMapper caught an exception: Prefix fcr has not been registered ERROR 22:08:29.182 (FedoraInvalidNamespaceExceptionMapper) NamespaceExceptionMapper caught an exception: Prefix fcr has not been registered ERROR 22:08:29.200 (FedoraInvalidNamespaceExceptionMapper) NamespaceExceptionMapper caught an exception: Prefix fcr has not been registered
Search engine results lead me to FCREPO-1788 and related info. It seems related, but I was unable to troubleshoot any further than this
...
.