Ubuntu 16.10
Start Fedora 4.7.1 one-click at port=8081 and context=fcrepo1
java -Dfcrepo.dynamic.jms.port=61616 -Dfcrepo.dynamic.stomp.port=61613 -jar ../fcrepo-webapp-4.7.1-jetty-console.jar --headless --port 8081 --contextPath /fcrepo1 |
Start Fedora 4.7.1 one-click at port=8082 and context=fcrepo2
java -Dfcrepo.dynamic.jms.port=61617 -Dfcrepo.dynamic.stomp.port=61614 -jar ../fcrepo-webapp-4.7.1-jetty-console.jar --headless --port 8082 --contextPath /fcrepo2 |
Load ingest.sh into fcrepo1 context.
Export data from fcrepo1 context.
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.
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:
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:
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:
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:
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. |
Load ingest.sh into fcrepo1 context.
Export data from fcrepo1 context.
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.
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:
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:
2017-01-30 12:16:37,246 Finished import... 0 resources imported |
Debug logging via:
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:
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. |
Load hydra-dataset (from fcrepo-sample-dataset) into fcrepo1 context.
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.
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.
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:
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:
2017-01-30 12:16:37,246 Finished import... 0 resources imported |
Debug logging via:
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:
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. |
This series relates only to attempting to get the initial fcrepo-sample-dataset(s) restored into a fedora instance.
CentOS 7.1611
Install tomcat
yum install tomcat tomcat-webapps tomcat-admin-webapps |
Download fcrepo-webapp-4.7.1.war, place in /usr/share/tomcat/webapps/ directory.
Use maven to build the target.
mvn clean install |
Run the restore for the sample dataset.
mvn -Dfcrepo.url=http://localhost:8080/fcrepo/rest/ exec:java |
Results:
[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.
mvn -Dfcrepo.authUser=blather -Dfcrepo.authPassword=skite -Dfcrepo.url=http://localhost:8080/fcrepo/rest/ exec:java |
Resulted in:
[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:
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.