Error: "com.vmware.cl.exception.ContentLibraryException: Unable to access URL: <content-library-url>" when attempting to create and sync a subscribed Catalog
search cancel

Error: "com.vmware.cl.exception.ContentLibraryException: Unable to access URL: <content-library-url>" when attempting to create and sync a subscribed Catalog

book

Article ID: 376563

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • After creating a subscribed Catalog in Cloud Director the initial sync to a content subscription endpoint fails along with any further sync attempts.
  • Synchronized Catalog tasks in the Cloud Director UI fail with an error of the form:

com.vmware.cl.exception.ContentLibraryException: Unable to access URL: <content-library-url>

  • The /opt/vmware/vcloud-director/logs/vcloud-container-debug.log files on the Cloud Director Cells show the error:

| DEBUG    | task-service-activity-pool-62 | CJob                           | updateFailedJob(com.vmware.cl.exception.ContentLibraryException) with locale=en_US | requestId=########-####-####-####-############,request=POST https://vcloud.example.com/api/admin/org/########-####-####-####-############/catalogs,requestTime=<time>,remoteAddress=<remote-ip>,userAgent=<user-agent>,accept=application/*+xml;version 39.0 vcd=########-####-####-####-############,task=########-####-####-####-############ activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-####-############) vcd=########-####-####-####-############,task=########-####-####-####-############ activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-####-############)
com.vmware.cl.exception.ContentLibraryException: Unable to access URL: <content-library-url>
        at com.vmware.cl.SyncManager.syncLibraryTask(SyncManager.java:264)

  • Before this error occurs the /opt/vmware/vcloud-director/logs/vcloud-container-debug.log files on the Cloud Director Cells show that the expected JSON could not be retrieved from the URL:

| DEBUG    | pool-jetty-27             | JsonResponse                   | Error in parsing the json or reading from the stream | requestId=########-####-####-####-############,request=POST https://vcloud.example.com/api/admin/org/########-####-####-####-############/catalogs,requestTime=<time>,remoteAddress=<remote-ip>,userAgent=<user-agent>,accept=application/*+xml;version 39.0 vcd=########-####-####-####-############,task=########-####-####-####-############ activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-####-############) vcd=########-####-####-####-############,task=########-####-####-####-############ activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-####-############)

  • Opening the subscription URL of the content subscription endpoint directly in a browser does not show a valid endpoint descriptor in JSON format.

Environment

VMware Cloud Director 10.6

Cause

This issue occurs if the Subscription URL configured in the subscribed Catalog in Cloud Director does not point to a valid content subscription endpoint.

The content subscription endpoint should return a valid endpoint descriptor in JSON format.

Resolution

Create a content subscription endpoint that is compatible with a client using version 1 of the VMware Content Subscription Protocol (VCSP) as outlined in the Cloud Director documentation, Content Subscription Endpoint Specification.

Once a valid content subscription endpoint has been create a subscribed Catalog in Cloud Director to sync with this endpoint.

Additional Information

As an example a Cloud Director Catalog which has Publishing enabled would provide the following subscription URL and example JSON when accessed via a browser.

Subscription URL:
https://vcloud.example.com/vcsp/lib/########-####-####-####-############/

Endpoint Descriptor:
{
"vcspVersion" : "1",
"version" : "2",
"id" : "urn:uuid:########-####-####-####-############",
"name" : "MyPublishedCatalog",
"description" : "",
"created" : "2024-09-05T00:00:00.000Z",
"itemType" : "vcsp.CatalogItem",
"itemsHref" : "items",
"capabilities" : {
    "transferIn" : [ "httpGet" ],
    "transferOut" : [ "httpGet" ],
    "generateIds" : true
},
"metadata" : [ ]
}