Azure IoT Edge coexistence

Microsoft Azure IoT Edge is an Internet of Things service built on top of IoT Hub. It enables users to carry out edge computing on a target device. Similarly to ESF, Microsoft Azure IoT Edge uses well-known communication technologies like MQTT, AMQP and HTTPS. Due to this, coexistence problems can arise if the Azure IoT Edge service is running on a device with ESF.

In particular, both ESF and Azure IoT Edge uses the HTTPS (443) and MQTTS (8883) ports for providing Web Consoles and broker access. In the following a details analysis and procedures are presented for solving these coexistence problems.

HTTPS Port

The HTTPS port (443) is used by ESF for the Web Console, while IoT Edge can use the same port if it is running in gateway mode.
To solve this issue, it is possible to change the ESF configuration to use a different port for the web UI or to configure the IoT Edge service to bind to another port.

Modify the ESF Web Console port

The HttpService under the Security tab in the ESF Web Console allows to easily change the port used to show the Gateway Administration Console. Please refer to the documentation for additional information. Be aware that the same port has to be opened in the firewall.

Modify the HTTPS Azure IoT Edge configuration

As briefly presented here, the port binding configuration can be modified from the Azure portal:

  • Navigate to your IoT hub and select IoT Edge.
  • Select the IoT Edge device that you want to update.
  • Select Set Modules.
  • Select Runtime Settings.
  • The configuration is in the Create Options panel of the Edge Hub module settings.

If the gateway mode is not needed, simply delete everything from the Create Options text box. Otherwise, change the port binding for the "443/tcp" entry. Finally save your changes and create the deployment. In the following picture, the port binding is set to 4430:

MQTTS port

As presented here and here, ESF embeds a MQTT broker that uses the 8883 port by default. Since the IoT Edge service uses the same port for its operation, this can cause unpredictable effects. As done for the HTTPS port, it is possible to change the ESF configuration to use a different port for the internal broker or to configure the IoT Edge service to bind to another port.

Modify the ESF internal broker configuration

The MQTT internal broker can be easily configured following the procedure presented in the Simple Artemis MQTT Broker Service and ActiveMQ Artemis Broker Service.

Modify the MQTTS Azure IoT Edge configuration

The MQTTS port can be modified in the IoT Edge service following the same procedure presented in the previous section for the HTTPS port.