-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 810549253 (0x30500005) handler script #667
Comments
Update: I'm really confused about what's happening here. Today, I turned on the Azure VM that I'm using for testing, and I noticed that the folder and file were created by ADU during its last initialization. However, in the Azure portal, the deployment showed "Deployment Status: Failed," as you can see: Result code: Extended result code: Description: The install script doesn't create a result file '/var/lib/adu/downloads/aebe0066-67ba-4d78-a247-2656d91dd7c8/action_download_aduc_result.json'. script-handler.20241108-151428.log2024-11-08T15:14:28.4728Z 564[564] [I] Instantiating an Step Handler for 'microsoft/script:1' update type. [CreateUpdateContentHandlerExtension:52] 2024-11-08T15:14:30.0115Z 564[564] [I] [ScriptHandler_PerformAction:655] ==== MULTI-LINE LOG BEGIN ==== du-agent.log2024-11-08T15:14:26.6053Z 564[564] [D] Log file created: /var/log/adu/du-agent.20241108-151426.log [zlog_init:185] 2024-11-08T15:14:27.6081Z 564[564] [D] [OrchestratorUpdateCallback:433] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:27.6082Z 564[564] [D] Processing deployment aebe0066-67ba-4d78-a247-2656d91dd7c8 ... [OrchestratorUpdateCallback:446] 2024-11-08T15:14:27.6082Z 564[564] [D] [ADUC_D2C_Message_SendAsync:526] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:27.6111Z 564[564] [W] rootkey package 'rootkeypackage-1.json' in sandbox. Try deletion... [ADUC_RootKeyPackageUtils_DownloadPackage:97] 2024-11-08T15:14:27.6112Z 564[564] [I] [DownloadRootKeyPkg_DO:22] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:28.3750Z 564[564] [I] Download rc: 1, erc: 0x00000000 [DownloadRootKeyPkg_DO:51] 2024-11-08T15:14:30.0306Z 564[564] [D] [ADUC_D2C_Message_SendAsync:526] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:30.0316Z 564[564] [I] OrchestratorPropertyUpdateCallback ended [OrchestratorUpdateCallback:517] 2024-11-08T15:14:30.0316Z 564[564] [D] [ADUC_D2C_Message_SendAsync:526] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:30.0319Z 564[564] [I] DeviceInformation component is ready - reporting properties [DeviceInfoInterface_Connected:166] 2024-11-08T15:14:30.0406Z 564[564] [D] [ADUC_D2C_Message_SendAsync:526] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:30.0439Z 564[564] [I] DiagnosticsInterface is connected [DiagnosticsInterface_Connected:97] 2024-11-08T15:14:30.0439Z 564[564] [D] [ADUC_D2C_Default_Message_Transport_Function:580] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:30.0442Z 564[564] [D] Sending D2C message (t:1, retries:0). [ProcessMessage:390] 2024-11-08T15:14:30.0442Z 564[564] [D] [ADUC_D2C_Default_Message_Transport_Function:580] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:30.0445Z 564[564] [D] Sending D2C message (t:2, retries:0). [ProcessMessage:390] 2024-11-08T15:14:30.0445Z 564[564] [D] [ADUC_D2C_Default_Message_Transport_Function:580] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:30.0447Z 564[564] [D] Sending D2C message (t:5, retries:0). [ProcessMessage:390] 2024-11-08T15:14:30.0447Z 564[564] [D] [ADUC_D2C_Default_Message_Transport_Function:580] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:30.7083Z 564[794] [I] Action 'Download' complete. Result: 0 (failed), 810549765 (0x30500205) [ADUC_Workflow_WorkCompletionCallback:890] 2024-11-08T15:14:30.7084Z 564[794] [D] [ADUC_D2C_Message_SendAsync:526] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:30.7088Z 564[794] [I] Workflow is Complete. [ADUC_Workflow_AutoTransitionWorkflow:758] 2024-11-08T15:14:30.9243Z 564[564] [D] [ADUC_D2C_Default_Message_Transport_Function:580] ==== MULTI-LINE LOG BEGIN ==== 2024-11-08T15:14:31.3278Z 564[564] [D] context:0x9fbbc5a0 [DefaultIoTHubSendReportedStateCompletedCallback:205] |
Hi, |
@marcelo-luna does your script (script_test.sh) write any output to the expected result file? (/var/lib/adu/downloads/aebe0066-67ba-4d78-a247-2656d91dd7c8/action_download_aduc_result.json). The common cause for this could be an error in the script that caused the script to be terminated or exited without properly report the action result in the result file. |
@Nox-MSFT no, the script doesn't write output to the result file, but the script does produce some outputs script_test.sh
I also tried a new "script_test.sh" version without the final echo statement: echo "Directory and file have been created successfully.", but I got the same error. |
@marcelo-luna , please take a look at the document on how to write a script for the script handler. Especially, this section : https://github.com/Azure/iot-hub-device-update/tree/develop/src/extensions/step_handlers/script_handler#communicating-the-script-execution-result-back-to-the-script-handler The example script is provided here: https://github.com/Azure/iot-hub-device-update/blob/develop/src/extensions/step_handlers/script_handler/examples/example-installscript.sh Note that it's a long script, but meant to demonstrate all the required implementation needed for the communication between the script and the script handler. Please let us know you have any questions |
Thank you, @Nox-MSFT! I used the script you mentioned earlier, and it worked well. I was following the documentation on the Azure page instead of the one on GitHub. It would be helpful to have more information about the script handler, as well as a tutorial, on this page: Azure Documentation. |
I've been trying to run a script for testing purposes that creates a folder and then a file in this folder with ADU, and I'm getting the error: 810549253 (0x30500005).
"ADUC_ERC_SCRIPT_HANDLER_MISSING_SCRIPTFILENAME_PROPERTY MAKE_ADUC_EXTENDEDRESULTCODE_FOR_COMPONENT_ADUC_CONTENT_HANDLER_SCRIPT(5)" from result.h
Files:
script_test.importmanifest.json:
script_test.sh:
Log:
I also tried to add "scriptFileName" inside handlerProperties:
I tried an update with the apt handler and it worked fine.
OS: Ubuntu 22.04 with iot edge
The text was updated successfully, but these errors were encountered: