Error when executing Sync API in CA API Developer Portal 3.5

Document ID : KB000098070
Last Modified Date : 04/06/2018
Show Technical Document Details
Issue:
The API has been published in the gateway and have assertion " Portal Managed Service" However when trying to retrieve the list of APIs in the Portal " Internal Server Error " or " Error connection to Server " is seen.
Environment:
CA API Developer Portal 3.5
Cause:
One of the reason that can result in this is PERMISSION and OWNERSHIP of API files under 
/repository/META/HEAD/sitebuilder/content/groups/APIs

Reason can be determined by running 
tail -f /opt/Deployments/lrs/server/logs/catalina.out

The error seen will be like


	com.thelevel.repository.DocumentNotFound: DOCUMENT_NOT_FOUND:repository/META/HEAD/sitebuilder/content/groups/APIs/7c85e79b-b5fe-404e-8521-a7df4ada98e0.xml
	FileSystemXMLStore: Unable to retrieveDocument -repository/META/HEAD/sitebuilder/content/groups/APIs/7c85e79b-b5fe-404e-8521-a7df4ada98e0.xml
	FileSystemXMLStore: Unable to retrieveDocument -repository/META/HEAD/sitebuilder/content/groups/APIs/7c85e79b-b5fe-404e-8521-a7df4ada98e0.xml
	com.thelevel.repository.DocumentNotFound: DOCUMENT_NOT_FOUND:repository/META/HEAD/sitebuilder/content/groups/APIs/7c85e79b-b5fe-404e-8521-a7df4ada98e0.xml


 
Resolution:

1. Login to root prompt of CA API Developer Portal
2. cd /opt/Deployments/lrs/repository/META/HEAD/sitebuilder/content/groups/APIs
3. Match the permission to following for files which has incorrect permissions using
chmod 640 <file>
chown l7portal:portalusers <file>

example below
-rw-r----- 1 l7portal portalusers 6179 Apr 13 14:58 766269e3-676e-4619-939d-d1aa5e25307a.xml

4. service apiportal restart
5. Go to Dashboard and retrieve the list again.