MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.31k stars 21.5k forks source link

Azure DevOps Starter - out of box initial installation fails on BUILD IoT Edge step #87271

Open katriendg opened 2 years ago

katriendg commented 2 years ago

When deploying this starter as described in the document, running the default 'edgenestingcicd-iothub - CI' pipeline fails.

Error message, in step 'Azure IoT Edge - Push module images' :

======== BUILDING MODULES ========
==================================

PROCESSING DOCKERFILE: /home/vsts/work/1/s/modules/FilterModule/Dockerfile.amd64
BUILDING DOCKER IMAGE: [myACR URI]/filtermodule:0.0.${MODULE_BUILD_VERSION}-amd64

ERROR: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

##[error]Error: The process '/usr/local/bin/iotedgedev' failed with exit code 1

As you can read from the log above, the MODULE_BUILD_VERSION is not correctly replaced, as it is not defined in any variable groups. Looking at the documentation on this page, there is an example of using a pre-defined variable. Changing the file '/modules/FilterModule/module.json' as follows:

  1. Original: "version": "0.0.${MODULE_BUILD_VERSION}",

  2. Updated:

    "version": "0.0.${BUILD_BUILDID}",

Committing this change and re-running the build pipeline now works.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

SatishBoddu-MSFT commented 2 years ago

@katriendg Thanks for the feedback! We are currently investigating and will update you shortly.

SatishBoddu-MSFT commented 2 years ago

Update:

We are working with our team on this issue!

image

katriendg commented 2 years ago

Thank you! That is exactly the error I got as well. Main objective of logging this was to get it solved for everyone.

katriendg commented 2 years ago

Adding an extra note on an additional issue with 'Create IoT Edge Device' CLI task, within the Deployment pipeline. It's referring to an old CLI extension azure-cli-iot-ext. This extension is now called 'azure-iot'.

So failing at this step too:

2022-02-01T14:34:09.1567085Z [command]/bin/bash /home/vsts/work/_temp/azureclitaskscript1643726037360.sh
2022-02-01T14:34:12.0008974Z ERROR: No matching extensions for 'azure-cli-iot-ext'. Use --debug for more information.
2022-02-01T14:34:13.9648204Z ERROR: The command requires the extension azure-iot. Unable to prompt for extension install confirmation as no tty available. Run 'az config set extension.use_dynamic_install=yes_without_prompt' to allow installing extensions without prompt.
2022-02-01T14:34:14.1340633Z ##[error]Script failed with error: Error: The process '/bin/bash' failed with exit code 2