question

PuneetMandyal-8743 avatar image
0 Votes"
PuneetMandyal-8743 asked saldana-msft edited

need help to identify the reason for installation error via SCCM package

Hi Team,

I need help to investigate the issue with batch script installation which I installing on the client machines through SCCM Package.

I tried to execute the script on system using command run as administrator, which executed successfully on the clied machine on the other hand if the script executing via SCCM package it return me this error

Severity Type Site code Date / Time System Component Message ID Description
Error Milestone EDN 3/28/2022 7:20:04 AM EFCTESTCW3 Software Distribution 10006 The program for deployment "EDN202AF" failed ("EDN000E0" - "CloudwatchAgent_start"). A failure exit code of 1 was returned. User context: NT AUTHORITY\SYSTEM Possible cause: Configuration Manager determines status for each program it executes. If Configuration Manager cannot find or correlate any installation status Management Information Format (MIF) files for the program, it uses the program's exit code to determine status. An exit code of 1 is considered a failure. Solution: For more information on the exit code, refer to the documentation for the program you are distributing.


If I ran the script without run as administrator it gives me this error

C:\Windows\ccmcache\2>startcloudwatchAgent-Windows.bat
processing amazon-cloudwatch-agent
Region: us-west-1
credsConfig: map[]
Failed to write the json file C:\ProgramData\Amazon\AmazonCloudWatchAgent\Configs\ssm_AmazonCloudWatch-windows.tmp: open C:\ProgramData\Amazon\AmazonCloudWatchAgent\Configs\ssm_AmazonCloudWatch-windows.tmp: Access is denied.

Fail to fetch the config!


If I have run the batch script using run as administrator it executed successfully:


Microsoft Windows [Version 10.0.17763.1935]
(c) 2018 Microsoft Corporation. All rights reserved.

C:\Windows\system32>cd C:\Windows\ccmcache\2

C:\Windows\ccmcache\2>startcloudwatchAgent-Windows.bat
processing amazon-cloudwatch-agent
Region: us-west-1
credsConfig: map[]
Successfully fetched the config and saved in C:\ProgramData\Amazon\AmazonCloudWatchAgent\Configs\ssm_AmazonCloudWatch-windows.tmp
Start configuration validation...
2022/03/28 19:11:59 Reading json config file path: C:\ProgramData\Amazon\AmazonCloudWatchAgent\Configs\ssm_AmazonCloudWatch-windows.tmp ...
Valid Json input schema.
No csm configuration found.
Configuration validation first phase succeeded
Configuration validation second phase succeeded
Configuration validation succeeded
AmazonCloudWatchAgent has been stopped
AmazonCloudWatchAgent has been started

C:\Windows\ccmcache\2>


I have attached the screenshot for package how I have setup in SCCM 187662-capture.jpg





windows-servermem-cm-general
capture.jpg (42.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hi @PuneetMandyal-8743

Since the issue is related to the file structure and permission of the Amazon Cloud Watch Agent, it would be recommended that you get in touch with an Amazon Cloud forum where the experts would be better experience to guide you.

Initially, from the error message "Failed to write the json file" and "Access is denied" you should check the NTFS permissions on the affected file and folder (these may be assigned by the installed software)

One recommendation would be to chck the configuration of your intallation account used to distribute the packages, ensuring that is included in the right containers for permissions:

https://docs.microsoft.com/en-us/mem/configmgr/core/plan-design/hierarchy/accounts#package-access-account

Hope this helps with your query,


--If the reply is helpful, please Upvote and Accept as answer--

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RahulJindal-2267 avatar image
0 Votes"
RahulJindal-2267 answered PuneetMandyal-8743 commented

Have you tried running the script in user context but with admin rights?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Yes, I have tried the batch script on the machine through admin right , it is working as expected but while tried to push the package it is failing.

0 Votes 0 ·
Garth avatar image
1 Vote"
Garth answered

This blog show you how to test your batch file as cm deploys it. https://www.recastsoftware.com/resources/how-to-access-the-local-system-account/

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SimonRenMSFT-3639 avatar image
2 Votes"
SimonRenMSFT-3639 answered

Hi,

Thanks for posting in Microsoft MECM Q&A forum.

Agree with above replies. This issue may be related to the running context. We can use PsExec.exe to run the package/application under a specified credential to have a try. For more detailed information, please refer to:

How to Access the Local System Account
MDT/SCCM 2010 - Running Applications Installations under different credentials
PsTools

Hope it helps. Have a nice day!

Best regards,
Simon


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.