Azure-Samples / Custom-vision-service-iot-edge-raspberry-pi

Sample showing how to deploy a AI model from the Custom Vision service to a Raspberry Pi 3 device using Azure IoT Edge
MIT License
186 stars 135 forks source link

<urllib3.connection.HTTPConnection object at 0x6c6b07b0>: Failed to establish a new connection: [Errno -2] Name or service not known' #55

Closed olofensing1 closed 4 years ago

olofensing1 commented 5 years ago

This issue is for a: (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

https://dev.to/azure/creating-an-image-recognition-solution-with-azure-iot-edge-and-azure-cognitive-services-4n5i https://dev.to/azure/azure-iot-edge-on-raspberry-pi-buster-plus-tips-for-raspberry-pi-4-22nn#installing-docker-on-raspbian-buster Push the camera-capture and image-classifier-service to raspberry-pi.

Any log messages given by the failure

sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a2eeea4a7001 kenteken.azurecr.io/imageclassifierservice:0.2.5-arm32v7 "/usr/bin/entry.sh p…" 2 hours ago Up About an hour 80/tcp image-classifier-service f9b9823deb86 kenteken.azurecr.io/cameracapture:0.2.8-arm32v7 "python3 -u ./main.py" 3 hours ago Up About an hour 0.0.0.0:5012->5012/tcp camera-capture 316723a7676f mcr.microsoft.com/azureiotedge-hub:1.0 "/bin/sh -c 'echo \"$…" 36 hours ago Up About an hour 443/tcp, 5671/tcp, 8883/tcp edgeHub 20d6fbb3cd59 mcr.microsoft.com/azureiotedge-agent:1.0 "/bin/sh -c 'echo \"$…" 40 hours ago Up About an hour edgeAgent

sudo docker logs camera-capture __sendFrameForProcessing Excpetion -HTTPConnectionPool(host='image-classifier-service', port=80): Max retries exceeded with url: /image (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x6c6b07f0>: Failed to establish a new connection: [Errno -2] Name or service not known',))

Visual Studio Code : Start monitoring message arrived in built-in endpoint for device IoTHubMonitor] Start monitoring message arrived in built-in endpoint for device [rpi] ... [IoTHubMonitor] Created partition receiver [0] for consumerGroup [$Default] [IoTHubMonitor] Created partition receiver [1] for consumerGroup [$Default] [IoTHubMonitor] [10:38:20 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000009690000297268853, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:20 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000008469999556837138, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:29 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000005110000074637355, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:29 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000004510000053414842, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:37 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.0000071800000114308205, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:37 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000007529999948019395, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:46 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000009389999831910245, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:46 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000009870000212686136, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:54 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.00001024999983201269, "Tag": "banaa" } ] [IoTHubMonitor] [10:38:54 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.0000071200001912075095, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:03 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000008170000000973232, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:03 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000004009999884146964, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:11 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000005689999852620531, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:12 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000005859999873791821, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:20 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.0000057399997785978485, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:21 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000004980000085197389, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:29 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000009530000170343556, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:29 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000009170000339508988, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:38 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000010460000339662656, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:38 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.0000042100000428035855, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:46 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000006509999820991652, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:47 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000008390000402869191, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:55 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.0000052099999265919905, "Tag": "banaa" } ] [IoTHubMonitor] [10:39:56 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.0000061499999901570845, "Tag": "banaa" } ] [IoTHubMonitor] [10:40:04 AM] Message received from [rpi/camera-capture]: [ { "Probability": 0.000006320000011328375, "Tag": "banaa" } ]

Expected/desired behavior

When holding a banana or apple in front of the camera. it should be detected.

OS and Version?

Raspbian Buster on PI with docker and container raspbian stretch. Visual studio code on ubuntu 18

Mention any other details that might be useful

It's my first post. so sorry if not everything is filled in correct. Trying to build an image recognition with a pi and camera. When I enable monitoring endpoint I get a continue tagged images while nothing is in front. The same with the log messages with the failure. No recognition at all. In Azure on IoT hub. Edges are all succesfully deployed.


Thanks! We'll be in touch soon.

emmanuel-bv commented 4 years ago

Fixed with this PR: https://github.com/Azure-Samples/Custom-vision-service-iot-edge-raspberry-pi/pull/61