Troubleshooting

From FezWiki

Jump to: navigation, search

Contents

[edit] General Issues

[edit] Affecting Thumbnail/Web/Preview Image generation and Preservation Metadata generation

The webservices that Fez uses to perform these workflow behaviours run by making the webserver make a webservice call to itself. In some default Apache installations the httpd.conf Apache config rules don't allow the webserver to make http calls to itself, so these webservices will fail. Make sure that your webserver localhost ip (127.0.0.1) is allowed to access the Fez website - eg allow from 127.0.0.1 in your Apache config file and your .htaccess file if you are using one.

[edit] Image Magick

  • For Linux/OSX firstly make sure the path to Image Magick is correct in your Fez config.inc.php file
  • For Windows check that the image magick command directory is in the Windows environment PATH variable (you should be able to run convert from any directory while you are in a command shell

[edit] JHOVE

  • Check that you followed the installation instructions for JHOVE exactly as they are specified -> especially the editing of the jhove.bat / jhove executable to setup paths etc correctly.
  • When jove runs it tries to access http://hul.harvard.edu/ois/xml/xsd/jhove/1.3/jhoveConfig.xsd . The program will block if this is not accessible, waiting for about a minute at a time. If this is a problem, download the jhoveConfig.xsd, make it locally accessible and change the jhove.conf file to read:
<jhoveConfig version="1.0"  ....
  xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/jhove/jhoveConfig
                     http://localhost/jhoveConfig.xsd">

[edit] Fedora

  • If you are getting problems with Fedora it is best to use the Fedora mailing list - after you have looked through the Fedora

documentation and Fedora Wiki.

  • 1) If you are getting error messages like:

ERROR: Array ( [0] => Array ( [faultcode] => soapenv:Server.userException [faultstring] => fedora.server.errors.ResourceIndexException: Error adding triples: org.kowari.query.QueryException: Commit failed [detail] => Array ([hostname] => localhost ) ) [1] =>

Or anything that mentions Kowari or triples then it is likely that the Fedora Kowari Triplestore has become corrupt.

You can fix it by running the Fedora command shells script 'fedora-rebuild'. The Fez team suggests turning Kowari off as it is only used in Fez to reindex Fedora objects - so when you do this it is better to turn it on for just those rare occasions.

So if you can change the Fedora config file fedora.fcfg variable 'resourceIndex' value to 0 (off) and stop and start Fedora that type of error message should go away.

[edit] Strange Redirection Problems

One user reported their Fez installation was redirecting to a random totally unrelated website after logging in. It turned out that the APP_BASE_URL should have been reflecting the full domain name of the server (example.edu.au) and not just the hostname (example). It was trying to resolve to example and when it couldn't find it, the browser performed a Google search, and the random unrelated site was the first hit. They changed the value to the full domain name (example.edu.au) and it redirected correctly fixing the problem.

[edit] Patches

There are patches for some bugs found in the released versions on Sourcforge: Fez Patches on Sourceforge

The following patches are for Fez 1.2:

The batch import patches need to be applied before the XSD patch (they all modify class.misc.php).

There are no patches for Fez 1.3.

[edit] Fez 1.2 Issues

[edit] Problems creating Communities

Fez 1.2 has a known issue where if you are logged in as administrator and create a community and don't "Publish" the community it doesn't show up in the admin user's My Fez page. To work around this problem always click the "Publish" workflow button when creating communities. This has been fixed for Fez 1.3 so administrators can see all unpublished objects in the My Fez submission buffer of unpublished assigned items.

You could also change the workflow in the admin panels so that it always publishes the community.

  • Click Manage Workflow Templates
  • Find the 'Create Community' row and click over on the 'States' column.
  • Check the 'Submit for Approval' state and then click delete.

(When Fez 1.3. comes out, we hope to have a system to allow upgrading workflows without overwriting any changes you've made)

[edit] Fedora using SSL

If you are using fedora with SSL turned on then you need to check the config.inc.php variables APP_FEDORA_SETUP, "APP_FEDORA_SSL_LOCATION", "APP_FEDORA_APIA_PROTOCOL_TYPE" and "APP_FEDORA_APIM_PROTOCOL_TYPE" with the values to match how you setup fedora.

You also need to fix some code. The reason for this is 1.2 uses CURL to connect to Fedora. In the 1.2 code it is missing:

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

This makes CURL not worry that the SSL certificate that the web server is using is not signed by a trusted authority. If this option is not set and the CURL function tries to connect to a non-trusted SSL session it will return an error.

fedora_api.php has a function called getNextPID which needs to be changed to look like this:

function getNextPID() {
              $pid = false;
              $getString = APP_BASE_FEDORA_APIM_DOMAIN."/mgmt/getNextPID?xml=true";
              $ch = curl_init($getString);
              curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
              curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
              curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
              $results = curl_exec($ch);
              $info = curl_getinfo($ch);
              curl_close ($ch);
              $xml = $results;
              $dom = new DomDocument;
              $dom->loadXML($xml);
              $result = $dom->getElementsByTagName("pid");
              foreach($result as $item) {
                      $pid = $item->nodeValue;
                      break;
              }
         return $pid;
      }

You also need to add the line

 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
 curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);

to class.misc.php function processURL similarly to in the above function.

[edit] Reindexing and Indexing Fedora Objects into Fez

Note - backup any files you edit before changing the code.

1. edit include/class.reindex.php:248 - function indexFezFedoraObjects Find the line which reads 'if (@$HTTP_POST_VARS["override"] ...' and change it to read:

if (Misc::checkBox(@$HTTP_POST_VARS["override"]) &&
  !Misc::checkBox(@$HTTP_POST_VARS["recover"])) {

2. In the same file and function change the calls to 'addDatastream' to be 'getUploadLocation' - note you'll need to delete the param "A", as it is not used. There are two of these calls, one for $relsext and one for $fezmd - these are the two most basic datastreams needed by fez. So the one for relsext looks like this:

Fedora_API::getUploadLocation($pid, "RELS-EXT", $relsext,
  "Relationships to other objects", $relsext, "text/xml", "X");

3. Change the form so that 'override' is always set (we are using the same function with different input to do indexing and reindexing and need to support the opposit meanings of the checkboxes). Edit templates/en/manage/fedoraindex.tpl.html:173 add the line

<input type="hidden" name="override" value="on" />

just after the <form.. line. The 'recover' checkbox will now have an effect when indexing new objects!

This also fixes reindexing objects with 'override' set to true.

[edit] Batch Import

There are lots of problems with batchimport in Fez 1.2. To fix them, apply the two batch import patches from sourceforge Fez Patches on Sourceforge. Then make these changes:

[edit] Fix the Ingest Call

Find line 709 in class.batchimport.php (handleStandardFileImport) which looks like this:

 Fedora_API::getUploadLocation($pid, $ncName, $full_name, "", $mimetype, $controlgroup); 

Change it to be this:

 Fedora_API::getUploadLocationByLocalRef($pid, $ncName, $full_name, "", $mimetype, $controlgroup); 

[edit] Fix the Thumbnail Workflow

At the top of workflow/thumbnail.php

delete the line that says

 if (!file_exists(APP_TEMP_DIR.$filename) 

and replace it with

 if (!file_exists($filename)) { 
   $filename = APP_TEMP_DIR.$filename; 
 } 
 if (!file_exists($filename)) { 

[edit] Fix the Windows Specific php call

If you are on Linux/Unix, In class.background_process.php, edit the line that has $command = "php.exe ..." to be $command = "/usr/bin/php ..."

[edit] Fix the Indexing of thumbnails

In the batch import file, the Fez object index is generated before the thumbnails are created. The index is used when displaying the listings.

The offending bit of code is in class.batchimport.php on line 719. You need to move the line that says

 Workflow::processIngestTrigger($pid, $full_name, $mimetype);  

To just above the lines that say:

 Record::removeIndexRecord($pid); // remove any existing index entry for that PID
 Record::setIndexMatchingFields($pid);

[edit] Description for File Upload not being saved

On lines 353 and 359 of class.fedora_api.php change the callCreateDatastream line to use dsLabel instead of dsIDName for the fourth parameter. Our fixed version reads like this:

   $dsID = Fedora_API::callCreateDatastream ($pid, $dsIDName,
                   $uploadLocation, $dsLabel, $mimetype, $controlGroup);

[edit] Apache Crashes

Some installations are able to create new objects (can see them in the DB), but when you try to visualize them, Apache Server is shutdown. In the apache log files there is the following error:

[notice] Parent: child process exited with status 3221225477 -- Restarting.

Solution: The crash is produced by the function convertTZ in Date.php. This function requires having the environment variable "TZ" (TimeZone) set in the system.

You can define the variable or hardwire the function to return your desired timezone.

[edit] Fez 2.0 Issues

[edit] FEDORA

After installing Fez 2.0 the sanity check gives the following message:

  Failed: ConnectHTTP APP_FEDORA_ACCESS_API = 'https://xxx.xxx.xxx.xxx:8443/fedora/services/access' HTTP Result 401  code.

Try changing the Fez config to connect to Fedora with ssl-authenticate-all instead of ssl-authenticate-apim. It seems that with Fedora 2.2 even if it is set to apm it still needs authentication on all.

To change this goto the fez gui admin panel -> configuration -> fedora settings and select ssl-authenticate-all

[edit] Sanity check issue

This is for installation of Fedora 2.1.1 with Fez 1.3. The setup does not pass the sanity check and keeps on complaining like this Connect HTTP APP_BASE_FEDORA_APIM_DOMAIN = 'http://fedoraAdmin:xxxxx@127.0.0.1:8080/fedora' HTTP Result 401 code

This is due to a redirect issue in the Tomcat 5.0.28 that ships with Fedora 2.1.1. The Fez-sanity check will stop complaining when you add a trailing slash in the file class.sanity_checks.php on the line that ends like: ...SanityChecks::checkHTTPConnect('APP_BASE_FEDORA_APIM_DOMAIN',APP_BASE_FEDORA_APIM_DOMAIN)); and change it to: ...'SanityChecks::checkHTTPConnect('APP_BASE_FEDORA_APIM_DOMAIN',APP_BASE_FEDORA_APIM_DOMAIN.'/')); This will stop Tomcat from sending a HTML 302 message. Hope this helps.

SourceForge

University of Queensland