Uploading API Gateway patch fails due to "Could not write attachments".

Document ID : KB000042946
Last Modified Date : 17/10/2018
Show Technical Document Details
Issue:

The upload of a API Gateway patch (Platform or Application) will fail with the following error at console:

Runtime error (check configuration): Could not write attachments

Cause:
  1. The permissions and/or ownership of a patch are not correct
  2. The API Gateway service daemon is not running
  3. There is insufficient space on a partition used by the Gateway patching subsystem
Resolution:

Each cause has its own resolution. It is advisable to make sure of the following with regard to all three. 

Perform the following from the root shell prompt:

  1. Ensure that the Gateway service is running by executing the following command: #service ssg start
  2. Set the necessary ownership on all update files: #chown layer7. /home/ssgconfig/*.L7P
  3. Set the necessary permissions on all update files: #chmod 644 /home/ssgconfig/*.L7P
  4. Verify there is adequate disk space by executing one of the following commands
 7-series and older8-series and newer
Commanddf -h | grep sda2 | awk '{print $6, $5}'df -Ph | egrep "/opt|/tmp" | awk '{print $6, $5}'
If any of the values exceed 75% then disk space should be freed. Please contact CA Support if assistance is required to make storage space available.

Each time a new patch is applied, there are status files created for them. They are found in /opt/SecureSpan/Controller/var/patches/ . To create space, you can remove all the status files but the latest CR and platform patch that you have applied.

You can also remove unnecessary L7P files from the directory where they are stored. By default, this should be /home/ssgconfig .
 
Additional Information:
If any of the values exceed 75% then disk space should be freed. Please contact CA Support if assistance is required to make storage space available.
 
You may also want to review the following two technical articles: TEC1152055 TEC0000001372

Attempt to apply any update files after making these changes. The update should apply without the same error reoccurring. If the error reoccurs then please contact CA Support.