Azure / iotedgedev

The Azure IoT Edge Dev Tool greatly simplifies your Azure IoT Edge development process. It has everything you need to get started and helps with your day-to-day Edge development.
https://aka.ms/iotedgedev
Other
160 stars 70 forks source link

How do you run this behind a corporate proxy? #433

Closed JasonCubic closed 3 years ago

JasonCubic commented 4 years ago

I can not figure out how to run this behind our corporate proxy. There must be a solution that I am overlooking. Could you add a section to the documentation explaining how to configure this to run behind a corporate proxy please?

This is the error I am seeing when I try to run iotedgedev start:

==============================================================
======== STARTING IOT EDGE SIMULATOR IN SOLUTION MODE ========
==============================================================

ERROR: HTTPSConnectionPool(host='redacted.azure-devices.net', port=443): Max retries exceeded with url: /devices/iotedgedev-edgedevice/modules/$edgeHub?api-version=2018-06-30 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f08848d21d0>: Failed to establish a new connection: [Errno 111] Connection refused',))
ERROR: Error while executing command: iotedgehubdev start -d config/deployment.amd64.json -v. Command '['iotedgehubdev', 'start', '-d', 'config/deployment.amd64.json', '-v']' returned non-zero exit status 1.
blackchoey commented 4 years ago

iotedgedev follows proxy setting from OS. I don't know which OS are you using, you can try following method which is supported by multiple OS: Set http_proxy and https_proxy environment variables in your operating system, and make sure your shell has loaded these new environment variables. If the OS you're using does not support this, please search how to setup proxy for that OS.

JasonCubic commented 4 years ago

I'm on windows 10. Typically you don't set a proxy on the os you set it in the browser. I can set those environment variables though. Don't you run iotedgedev start inside a docker container though? Maybe I need to set proxy variables in the docker container?

blackchoey commented 4 years ago

On windows 10, you can also go to "settings -> network & internet -> proxy" to set the proxy. If you run it in docker container, please make sure the proxy is accessible inside your container and set proxy in docker container.

JasonCubic commented 4 years ago

okay, but the instructions have you launch it inside the docker container. I tried setting the proxy inside the docker container and it didn't seem to work. Can you put something in the docs about how to set the proxy if you need to?

konichi3 commented 3 years ago

Hi @JasonCubic

Can you provide the link to the instruction you mentioned?

okay, but the instructions have you launch it inside the docker containe

JasonCubic commented 3 years ago

https://github.com/Azure/iotedgedev#quickstart

marianan commented 3 years ago

Thanks @JasonCubic , your question is now on our backlog. We will circle back when we have updates to share.

konichi3 commented 3 years ago

@JasonCubic

How did you configure the proxy inside the docker container? Please let us know if this step was followed. https://docs.docker.com/network/proxy/#configure-the-docker-client

Also, on Docker client running on Windows, you can set the proxy from manually --. Let us know if this works

konichi3 commented 3 years ago

Updated the doc (add a line for configuring the proxy) https://github.com/Azure/iotedgedev/blob/master/README.md

Since there is no activity, we are closing the issue. Feel free to re-activate or open a new item if the issue not resolved