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

[BUG]: AzureIoTEdge - not working in Ubuntu 20.04 image #18209

Closed
1 of 4 tasks
jdiazfernandez opened this issue Apr 28, 2023 · 5 comments
Closed
1 of 4 tasks

[BUG]: AzureIoTEdge - not working in Ubuntu 20.04 image #18209

jdiazfernandez opened this issue Apr 28, 2023 · 5 comments

Comments

@jdiazfernandez
Copy link

Task name

AzureIoTEdge@2

Task version

2.*

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

ubuntu-20.04

Task log

==============================================================================
/home/vsts/work/1/s/AzureIotEdgeAppTutorialCICD /home/vsts/work/1/s
Building module images...
iotedgedev already installed with version: version 3.3.7

/home/vsts/.local/bin/iotedgedev "build" "--file" "/home/vsts/work/1/s/AzureIotEdgeAppTutorialCICD/deployment.template.json" "--platform" "amd64"


=======================================
======== ENVIRONMENT VARIABLES ========
=======================================


.env file not found on disk. Without a file on disk, you must specify all Environment Variables at the system level. (/home/vsts/work/1/s/AzureIotEdgeAppTutorialCICD/.env)

/home/vsts/.local/lib/python3.8/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (2.0.0) or chardet (3.0.4)/charset_normalizer (3.1.0) doesn't match a supported version!
  warnings.warn(
DeprecationWarning: The command build is deprecated.


Welcome to iotedgedev!
-------------------------
Telemetry
---------
The iotedgedev collects usage data in order to improve your experience.
The data is anonymous and does not include commandline argument values.
The data is collected by Microsoft.

You can change your telemetry settings by updating 'collect_telemetry' to 'no' in /home/vsts/.iotedgedev/setting.ini



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


ERROR: ('Could not connect to Docker daemon. Please make sure Docker daemon is running and accessible', DockerException("Error while fetching server API version: request() got an unexpected keyword argument 'chunked'"))

##[error]Error: The process '/home/vsts/.local/bin/iotedgedev' failed with exit code 1
Finishing: Azure IoT Edge - Build module images

Relevant log output

ERROR: ('Could not connect to Docker daemon. Please make sure Docker daemon is running and accessible', DockerException("Error while fetching server API version: request() got an unexpected keyword argument 'chunked'"))

Aditional info

The same pipeline worked some days ago. When I run today, it doesn't work.  I guess it has something to do with a new version of Docker

The version used by the Microsoft Hosted environment is as follows:

Client:
 Version:           20.10.24+azure-1
 API version:       1.41
 Go version:        go1.19.6
 Git commit:        297e1284d3bd092e9bc96076c3ddc4bb33f8c7ab
 Built:             Fri Mar 31 18:34:38 UTC 2023
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.24+azure-1
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.19.6
  Git commit:       5d6db842238e3c4f5f9fb9ad70ea46b35227d084
  Built:            Tue Apr  4 18:03:51 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.20+azure-1
  GitCommit:        2806fc1057397dbaeefbea0e4e17bddfbd388f38
 runc:
  Version:          1.1.6
  GitCommit:        0f48801a0e21e3f0bc4e74643ead2a502df4818d
 docker-init:
  Version:          0.19.0
  GitCommit:
@emulic
Copy link

emulic commented Apr 28, 2023

We have the same issue.

@smisch
Copy link

smisch commented Apr 28, 2023

We encountered the same issue in our own images. The root cause was the installation of docker or docker-compose via pip. During the installation the urllib3 library was updated to 2.0.0, which is not compatible with the request lib version that came with the OS.

Following this stackoverflow answer, reinstalling the request library via pip successfully downgraded the urllib3.

Again, we had this in our own images on gitlab. Hope that still helps you!

Edit: Found the actual reason. urllib3 just released version 2.0.0, so any package that depends on e.g. >=1.25.0 will now install 2.0.0 and break the request library. See also.

@jdiazfernandez
Copy link
Author

Thank you a lot @smisch! That's worked!

I added a step to manually install that dependency

pip install -U iotedgedev pyOpenSSL==22.0.0 urllib3==1.22 requests

pyOpenSSL==22.0.0 to solve the issue described here
urllib3==1.22 requests to solve this new issue that @smisch describes

@adimarov-bernhard
Copy link

@jdiazfernandez your fix worked, fantastic!

@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
Projects
None yet
Development

No branches or pull requests

4 participants