Iotedge: Internet connection required in some situation

Created on 28 Jun 2019  路  14Comments  路  Source: Azure/iotedge

Hi folks,
are there any situation in which internet connection is required for the runtime (except during the first initialization)?
My modules are up and running but I discovered that if I change the network setting into config.yaml file and I restart the runtime, I need again an internet connection, otherwise no module run, neither the edgeAgent.
I found the same problem (not always) if I restart the PC without internet connection.

Expected Behavior

Runtime starts modules without internet connection after modules have already setup

Current Behavior

Runtime doesn't start because it needs internet connection in order to start edgeAgent and other modules

Steps to Reproduce

  1. Setup and initialize the runtime
  2. Deploy one or more module
  3. Disconnect internet
  4. Restart PC or change the network in config.yaml
  5. Runtime doesn't start

Device (Host) Operating System

Windows 10 Enterprise 1809

Architecture

AMD64

Container Operating System

Windows containers

Runtime Versions

iotedged

1.0.7.1

Docker

Not installed

customer-reported iotedge question

Most helpful comment

-H npipe:////./pipe/iotedge_moby_engine

All 14 comments

This is most likely expected behavior. If the config.yaml is changed, the runtime goes through the initailize phase, where IoT Hub connectivity is required.

Can you describe your scenario a bit more? What network settings do you change and why does it need to be done when the device is offline?

Ok thanks, now I'm sure that any change to config.yaml requires the Hub connectivity.
I changed the network because I had some problems to try to make connection from a container to an external device.
My pc has three network adapters, with different IP class:

  • one connected (sometimes) to WAN
  • one connected to LAN
  • one connected to a PLC

With the default NAT network I wasn't able to connect to PLC so I tried to change the network to use. Unfortunately I don't know how to say to the container which adapter should connect to. I have to set all adapters to the same IP to make it working.

You should be able to create a macvlan network with a specific adapter as the parent, then set the NetworkingConfig in module create options to use said network. (Specifically the NetworkId corresponds to the ID of the network you created).

Edit: Sorry, I missed you're on Windows. In that case create a transparent network instead.

So I need to install Docker. Any problem if I install Docker Desktop after the IoT Edge runtime?

IoT Edge does not work without a container runtime. You already have Docker (Moby). It's installed as part of installing IoT Edge.

By the way, I'm curious: where did you get the issue template you used to open this issue from? It is not the issue template that we have configured Github to use when you click the "New issue" button. Did you get it from somewhere else?

I see. I can use docker client but every command I type I always get (powershell as admin)
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.40/networks: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

-H npipe:////./pipe/iotedge_moby_engine

Amazing! thank you 馃憤

@Ricciolo I would still like an answer to my question in https://github.com/Azure/iotedge/issues/1395#issuecomment-508369495 (You are not the only one who used the wrong template. I want to find out where it's coming from and fix it.)

@arsing when I press new issue I get that template
image

That is not the template you used in your OP, hence my question.

You should really put this somewhere in the quickstart articles or in manuals. Thank you for the solution!

docker -H npipe:////./pipe/iotedge_moby_engine ps

It's mentioned off-hand in https://docs.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-windows , but yes there should probably be more explanation of what it's for and what it does.

Was this page helpful?
0 / 5 - 0 ratings