Skip to content
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

AzureIoTEdge - not working in Ubuntu 20.04 image #16964

Closed
Vic152 opened this issue Sep 28, 2022 · 12 comments
Closed

AzureIoTEdge - not working in Ubuntu 20.04 image #16964

Vic152 opened this issue Sep 28, 2022 · 12 comments
Assignees
Labels
Area: Release bug environment:need-to-triage Issues need to be triage by environment-deployment team stale

Comments

@Vic152
Copy link

Vic152 commented Sep 28, 2022

Question, Bug, or Feature?
Type: Bug

Enter Task Name: AzureIoTEdge@2

list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks

Environment

  • Server - Azure Pipelines

  • Agent - Hosted:

    • If using Hosted agent, provide agent name: Ubuntu 20.04
      Agent name: 'Azure Pipelines 2'
      Current agent version: '2.210.1'
      Operating System
      Ubuntu
      20.04.5
      LTS
      Runner Image
      Runner Image Provisioner
      1.0.0.0-main-20220916-1
      Current image version: '20220922.2'
      Agent running as: 'vsts'
      Prepare build directory.
      Set build variables.
      Download all required tasks.
      Downloading task: CmdLine (2.201.1)
      Downloading task: AzureIoTEdge (2.202.0)
      Checking job knob settings.
      Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
      Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG}

Issue Description

image

Task logs

2022-09-27T14:54:56.7714961Z ##[section]Starting: AzureIoTEdge - Generate deployment manifest
2022-09-27T14:54:56.7721424Z ==============================================================================
2022-09-27T14:54:56.7721657Z Task : Azure IoT Edge
2022-09-27T14:54:56.7721857Z Description : Build and deploy an Azure IoT Edge image
2022-09-27T14:54:56.7722052Z Version : 2.202.0
2022-09-27T14:54:56.7722205Z Author : Microsoft Corporation
2022-09-27T14:54:56.7722452Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/azure-iot-edge
2022-09-27T14:54:56.7722759Z ==============================================================================
2022-09-27T14:54:57.0263452Z Start generating deployment manifest...
2022-09-27T14:54:57.0306101Z /home/vsts/work/1/s/Project /home/vsts/work/1/s
2022-09-27T14:56:25.3081671Z ##[error]/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
deprecated() got an unexpected keyword argument 'name'
/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
/usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
File "/usr/local/bin/iotedgedev", line 5, in
from iotedgedev.cli import main
File "/usr/local/lib/python3.8/dist-packages/iotedgedev/cli.py", line 11, in
from .dockercls import Docker
File "/usr/local/lib/python3.8/dist-packages/iotedgedev/dockercls.py", line 4, in
import docker
File "/usr/local/lib/python3.8/dist-packages/docker/init.py", line 2, in
from .api import APIClient
File "/usr/local/lib/python3.8/dist-packages/docker/api/init.py", line 2, in
from .client import APIClient
File "/usr/local/lib/python3.8/dist-packages/docker/api/client.py", line 6, in
import requests
File "/usr/lib/python3/dist-packages/requests/init.py", line 95, in
from urllib3.contrib import pyopenssl
File "/usr/local/lib/python3.8/dist-packages/urllib3/contrib/pyopenssl.py", line 50, in
import OpenSSL.SSL
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import SSL, crypto
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/SSL.py", line 19, in
from OpenSSL.crypto import (
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/crypto.py", line 3224, in
utils.deprecated(
TypeError: deprecated() got an unexpected keyword argument 'name'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/init.py", line 5, in
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 32, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 12, in
import os, glob, subprocess, os.path, time, pwd, sys, requests_unixsocket
File "/usr/lib/python3/dist-packages/requests_unixsocket/init.py", line 1, in
import requests
File "/usr/lib/python3/dist-packages/requests/init.py", line 95, in
from urllib3.contrib import pyopenssl
File "/usr/local/lib/python3.8/dist-packages/urllib3/contrib/pyopenssl.py", line 50, in
import OpenSSL.SSL
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import SSL, crypto
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/SSL.py", line 19, in
from OpenSSL.crypto import (
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/crypto.py", line 3224, in
utils.deprecated(
TypeError: deprecated() got an unexpected keyword argument 'name'

Original exception was:
Traceback (most recent call last):
File "/usr/local/bin/iotedgedev", line 5, in
from iotedgedev.cli import main
File "/usr/local/lib/python3.8/dist-packages/iotedgedev/cli.py", line 11, in
from .dockercls import Docker
File "/usr/local/lib/python3.8/dist-packages/iotedgedev/dockercls.py", line 4, in
import docker
File "/usr/local/lib/python3.8/dist-packages/docker/init.py", line 2, in
from .api import APIClient
File "/usr/local/lib/python3.8/dist-packages/docker/api/init.py", line 2, in
from .client import APIClient
File "/usr/local/lib/python3.8/dist-packages/docker/api/client.py", line 6, in
import requests
File "/usr/lib/python3/dist-packages/requests/init.py", line 95, in
from urllib3.contrib import pyopenssl
File "/usr/local/lib/python3.8/dist-packages/urllib3/contrib/pyopenssl.py", line 50, in
import OpenSSL.SSL
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import SSL, crypto
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/SSL.py", line 19, in
from OpenSSL.crypto import (
File "/usr/local/lib/python3.8/dist-packages/OpenSSL/crypto.py", line 3224, in
utils.deprecated(
TypeError: deprecated() got an unexpected keyword argument 'name'

2022-09-27T14:56:25.3102481Z ##[error]Error: iotedgedev installation failed, see detailed error in debug mode
2022-09-27T14:57:25.3274572Z ##[error]The operation was canceled.
2022-09-27T14:57:25.3279343Z ##[section]Finishing: AzureIoTEdge - Generate deployment manifest

Troubleshooting

Checkout how to troubleshoot failures and collect debug logs: https://docs.microsoft.com/en-us/vsts/build-release/actions/troubleshooting

Error logs

[Insert error from the logs here for a quick overview]

@github-actions github-actions bot added Area: Release bug environment:need-to-triage Issues need to be triage by environment-deployment team labels Sep 28, 2022
@Vic152
Copy link
Author

Vic152 commented Sep 28, 2022

I just noticed that this happens intermittently. Sometimes it works and sometimes not. 1 in 5 pipelines fail when generating the manifest.

@MattCosturos
Copy link

I've been using this task for 2 weeks, and today it started failing with this issue.

@Dan-Moss
Copy link

Dan-Moss commented Sep 28, 2022

see: pyca/pyopenssl#1151

@michaelmirandi
Copy link

I'm also having this issue when deploying, pipelines have worked for months. Started throwing this error this morning.

@chull434
Copy link

Yeap hit the same issue

Manual install of python packages seem to fix it for me: Azure/iotedgedev#589 (comment)

@marianan
Copy link
Contributor

Thanks @Vic152 for filling the issue and @chull434 for pointing to the solution. We added the issue to our backlog and will share on the main thread when updates are available.

@chull434
Copy link

chull434 commented Oct 3, 2022

I added step to manually install the dependency

 - task: Bash@3
    displayName: 'Azure IoT Edge - Manual Install'
    inputs:
      targetType: 'inline'
      script: 'pip install -U iotedgedev pyOpenSSL==22.0.0'

I still get an error:

image

looks more like a normal syntax error, now your past the previous error, would double check your files just

@Vic152
Copy link
Author

Vic152 commented Oct 3, 2022

I added step to manually install the dependency

 - task: Bash@3
    displayName: 'Azure IoT Edge - Manual Install'
    inputs:
      targetType: 'inline'
      script: 'pip install -U iotedgedev pyOpenSSL==22.0.0'

I still get an error:
image

looks more like a normal syntax error, now your past the previous error, would double check your files just

scrap this, thanks :) You can remove the comment and I will do the same

@Vic152
Copy link
Author

Vic152 commented Oct 5, 2022

@marianan please remove this and two above posts. I made a mistake. They are not relevant to the problem.

@Vic152
Copy link
Author

Vic152 commented Jan 4, 2023

I added step to manually install the dependency

 - task: Bash@3
    displayName: 'Azure IoT Edge - Manual Install'
    inputs:
      targetType: 'inline'
      script: 'pip install -U iotedgedev pyOpenSSL==22.0.0'

I still get an error:
image

looks more like a normal syntax error, now your past the previous error, would double check your files just

This no longer works, unfortunately.

@Vic152
Copy link
Author

Vic152 commented Jan 13, 2023

This is the currently working fix is

- task: Bash@3
  displayName: 'Azure IoT Edge - Manual Install'
  inputs:
    targetType: 'inline'
    script: 'pip install -U iotedgedev'

@github-actions
Copy link

This issue is stale because it has been open for 180 days with no activity. Remove the stale label or comment on the issue otherwise this will be closed in 5 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Release bug environment:need-to-triage Issues need to be triage by environment-deployment team stale
Projects
None yet
Development

No branches or pull requests

7 participants