Assessment failed due to this reason: Execution terminated due to last reported error.

Joel Young 15 Reputation points
2023-01-30T12:49:05.8133333+00:00

I have an Arc-enabled Ubuntu LTS 20.04 server where, in Update management center, manual assessments run fine, but the automated periodic assessments seem to fail.

The summary states:
Assessment failed due to this reason: Execution terminated due to last reported error.

Unexpected return code (2) from command: sudo grep security /etc/apt/sources.list > /tmp/az-update-security.list

2 error/s reported. The latest 2 error/s are shared in detail. To view all errors, review this log file on the machine: /var/lib/GuestConfig/extension_logs/Microsoft.CPlat.Core.LinuxPatchExtension-1.6.42/0.core.log

0.core.log doesn't show any errors, but 0.aa.core.log shows:

Discovering 'security' packages...
WARNING:- SLP:: Return code: 2, Output:  |	/bin/sh: 1: cannot create /tmp/az-update-security.list: Permission denied
ERROR:Error retrieving available patches: Exception('Unexpected return code (2) from command: sudo grep security /etc/apt/sources.list > /tmp/az-update-security.list', '')
	DEBUG: Setting assessment substatus. [Substatus=Error]
ERROR:EXCEPTION during patch operation: Exception('Unexpected return code (2) from command: sudo grep security /etc/apt/sources.list > /tmp/az-update-security.list', '')
ERROR:TO TROUBLESHOOT, please save this file before the next invocation: /var/lib/GuestConfig/extension_logs/Microsoft.CPlat.Core.LinuxPatchExtension-1.6.42/0.aa.core.log

I deleted /tmp/az-update-security.list thinking it was creation/write issue and let the periodic assessment run on its own, but now the only error I see in 0.aa.core.log from the latest run is:
ERROR:Auto-assessment NOT STARTED as arc extension is running. [Attempted=0][ARCSequenceNo=8]<Log file was closed.>

I would like the automated periodic assessments to run successfully.

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
412 questions
Azure Update Manager
Azure Update Manager
An Azure service to centrally manages updates and compliance at scale.
304 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 24,546 Reputation points
    2023-04-02T19:49:24.9466667+00:00

    Hi Joel Young,

    Are you still seeing the issue?
    It looks like the issue is related to permissions. You should check the permissions on the /tmp/az-update-security.list file and make sure that the user running the automated periodic assessment has the correct permissions to create and write to the file. You can also try running the periodic assessment with elevated privileges, such as sudo since the error message indicates that the command sudo grep security /etc/apt/sources.list > /tmp/az-update-security.list returned an unexpected return code (2)<sup>[2]</sup>. The error message also indicates that the file /tmp/az-update-security.list could not be created due to permission denied.

    Please accept as answer and upvote if the above information is helpful for the benefit of the community.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.