Legacy Product

Fusion 5.10
    Fusion 5.10

    Troubleshoot an Alfresco Datasource

    The Alfresco Connector is a crawler for the Alfresco server, which adheres to the Content Management Interoperability Services (CMIS) standard.

    If you are having issues with your Alfresco datasource, try the troubleshooting steps below:

    1. Check the CMIS connection URL

    Use the following command to validate the CMIS connection URL is correct(replace the username, hostname and port):

    curl -v -u <username> "https://<hostname>:<port>/alfresco/api/-default-/public/cmis/versions/1.1/atom"

    The expected response should be a 200 HTTP status response and an XML file describing the CMIS 1.1 AtomPub Service Document. As a first step, the connector will retrieve and load the AtomPub service document and the information there will be useful for future requests.

    2. Validate URI templates

    The CMIS 1.1 AtomPub service document describes the format of the URLs. For example:

    <cmisra:uritemplate>
         <cmisra:template>https://<hostname>:<port>/alfresco/api/-default-/public/cmis/versions/1.1/atom/id?
                          id={id}&amp;filter={filter}&amp;includeAllowableActions={includeAllowableActions}
                          &amp;includeACL={includeACL}&amp;includePolicyIds={includePolicyIds}
                          &amp;includeRelationships={includeRelationships}
                          &amp;renditionFilter={renditionFilter}
         </cmisra:template>
         <cmisra:type>objectbyid</cmisra:type>
         <cmisra:mediatype>application/atom+xml;type=entry</cmisra:mediatype>
    </cmisra:uritemplate>

    Those template URIs will be used to build the requests the connector will require to retrieve data from Alfresco server.

    To test if the URI templates are correct, run any of the URI templates on that document, replace the necessary parameters and IDs. For example, to retrieve the root folder using the path parameter: path=/

    curl -v -u admin "https://<hostname>:<port>/alfresco/api/-default-/public/cmis/versions/1.1/atom/path?path=/&amp;filter=&amp;includeAllowableActions=&amp;includeACL=&amp;includePolicyIds=&amp;includeRelationships=&amp;renditionFilter="

    The expected response should be a 200 HTTP status response and an XML file describing the root folder. It’s possible to use other URI template queries to validate they are correct.

    3. Check Alfresco opencmis properties

    If a request using the URI template returns a non OK HTTP status, probably the Alfresco opencmis properties are incorrect. To check that:

    • Go to the Alfresco admin console:

    http://<your-host-name>:<alfresco-port>/alfresco/service/enterprise/admin
    • Under the Support Tools section, go to the JMX Settings

    • Click the Export button, under the Export System Settings section.

    • That will download a file that is listing all the current Alfresco server properties.

    • Look for the property: opencmis.server.value. The URI templates will be built using the URL set in that property.

      • If the URL set in that property is incorrect change it.

      • It would be necessary to change other properties too:

    opencmis.context.override=true
    opencmis.context.value=
    opencmis.servletpath.override=true
    opencmis.servletpath.value=
    opencmis.server.override=true
    opencmis.server.value=https://<hostname>:<port>/alfresco/api
    • Change those properties in the alfresco-global.properties file.

    It’s important to configure that value with a correct URL, otherwise the requests will fail and documents can not be indexed.

    Configurations taken from a related question in the Alfresco forum.