Hi @Dhanavath Vishnu Thank you for posting this question here.
I believe this behavior you see is expected when you disable all outbound network ports on the VM. The Edge Hub module is responsible for module-to-module communication established using the routes. These communications work on ports 8883 (MQTTS) or 5671 (AMQPS) or 443(TLS) if using API. Hence all the routing and communication would be down when all outbound network ports all closed.
An alternate/ideal way to test the offline capability of the IoT Edge device is by disabling just the network access to the host VM rather than closing all the ports. You can disable the network access to an Azure hosted VM by running the command ifconfig eth0 down
. This will disable the netwokk connectivity to the device and forces it to operate in offline mode. You can later enable network access by connecting to serial console of the VM and use ifconfig eth0 up
command to restore connectivity.
Hope this helps. Please let us know if you have any additional questions or need further clarifications on this.
If the response helped, please do click Accept Answer and Yes. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.