FAQs/Tips and Howtos
- How do I reset Muradora with the default XACML policies?
- How do I fix a corrupted XACML policy database?
- "Too many open files" exception for Fedoragsearch
- How do I increase the maximum size of uploaded files in Muradora?
- Running out of memory for Tomcat
- Running out of memory while running "ants"
- How do I speed up batch ingestion?
How do I reset Muradora with the default XACML policies ?
This can be done by running the commands below (MELCOEPDP_SRC is where your melcoe-pdp source code is located)
prompt>cd $MELCOEPDP_SRC prompt>ant uninstall prompt>ant install prompt>ant load-policies
How do I fix a corrupted XACML policy database?
Sometimes when Tomcat is not shutdown cleanly (e.g when you send a kill -9 command to kill the Tomcat process), the DB XML database which is used to store the XACML policies become corrupt. To fix this, shutdown Tomcat, go to your $MELCOEPDP_HOME directory and under the "database" directory, run the command "db_recover". Now when Tomcat is restarted, you should have a working XACML policy database running for the melcoe-pdp and melcoe-pdp components.
"Too many open files" exception for Fedoragsearch
You might need to increase the file limit for your OS. For a linux system, you can use:
prompt>ulimit -n <your new number for open file descriptors here>
How do I increase the maximum size of uploaded files in Muradora?
- You first need to raise the limit for upload files in your application server settings. For example, with Tomcat, you can set maxPostSize parameter in its connector configuration:
<Connector port="8080" maxHttpHeaderSize="8192" maxPostSize="5242880" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> - Increase the upload limit for Struts 2, the web application framework used in Muradora. You can set it in struts.properties file locate in /WEB-INF/classes/ folder:
#upload limit in byte struts.multipart.maxSize=5242880
Running out of memory for Tomcat
When running Muradora with Fedora and other related components all under the one Tomcat application server, it is critical that sufficient memory is given to Tomcat. This can be done by setting the JAVA_OPTS environment prior to starting Tomcat:
export JAVA_OPTS="-Xms512m -Xmx1024m -XX:PermSize=256m"
Running out of memory during "ants"
Sometimes when running "ants" to build Muradora and related components (such as melcoe-pdp or melcoe-pep), it fails with an error message saying "java.lang.OutOfMemory heap error".
This error has been observed when building the melcoe-pdp component on a 64-bit system. To overcome it, please set the following environment prior to running the "ant" build.
export ANT_OPTS=-Xmx1024m
How do I speed up batch ingestion?
To ingest a large number of objects efficiently, it's best to do the following:
- Block outside access temporarily to the repository (using tools such as iptables or disconnect your network connection)
- Change back to the default DOManager in fedora.fcfg instead of GSearchDOManager or SolrDOManager (if you use the new Solr-Fedora connector)
<module role="fedora.server.storage.DOManager" class="fedora.server.storage.DefaultDOManager">
- Disable the web services authorization for Fedora by backing the current server-config.wsdd found in $TOMCAT_HOME/webapps/fedora/WEB-INF and replace it with this one
$cp server-config.wsdd server-config.wsdd-authz $cp server-config.wsdd-noauthz server-config.wsdd
- Disable the REST interface authorization for Fedora by commenting the following blocks in web.xml (also found in $TOMCAT_HOME/webapps/fedora/WEB-INF):
<!-- <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>AccessServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>AxisServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>BESecurityServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>ControlServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>DescribeRepositoryServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>FieldSearchServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>GetNextPIDServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>GetObjectHistoryServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>ListDatastreamsServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>ListMethodsServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>MethodParameterResolverServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>OAIProviderServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>ReportServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>RISearchServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <servlet-name>UploadServlet</servlet-name> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <url-pattern>/getDSAuthenticated</url-pattern> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <url-pattern>/index.html</url-pattern> </filter-mapping> <filter-mapping> <filter-name>EnforceAuthnFilter</filter-name> <url-pattern>/services/access</url-pattern> </filter-mapping> --> - Restart Tomcat
- Run your batch ingestion script (eg. $FEDORA_HOME/client/bin/fedora-ingest.sh) and wait till it finishes
- If you are using GSearch module, go to the Gsearch Rest URL and on the Update Index page, click on the "!updateIndex FromFoxmlFiles" button and wait till it finishes. If Solr-Fedora plugin is in used, do the batch ingest via SOLR REST interface:
http://localhost:8080/solr/fedora?foxmlPath=PATH_TO_FOXML_FOLDER&action=fromFoxml * PATH_TO_FOXML_FOLDER is the absolute path to your FOXML object folder which is usually $FEDORA_HOME/data/objects.
- Re-enable the authorization by removing the comment in web.xml and copy back the original server-config.wsdd above.
- Restart Tomcat and re-enable network access from the outside.
Attachments
- server-config.wsdd-noauthz (22.4 kB) - added by chi on 06/03/08 11:54:21.
