Search code examples
apache-nifiazure-iot-hubazure-iot-edge

how to run apache NifiModule on Azure IoT edge device?


I deployed apache nifi module on azure iot edge device with following desired properties:

{
    "certificatefile": "azure-iot-test-only.root.ca.cert.pem",
    "flowversion": "1.1",
    "accountname": "",
    "accountkey": "",
    "containername": ""
}

I got following error while running the module: enter image description here

I placed root ca certificate and flow file on edge device in /config folder.

Can anyone please suggest the solution? It failed to execute following command

[ERROR] Error loading certificate: Command failed: keytool -import -noprompt -alias iot-edge -file /config/azure-iot-test-only.root.ca.cert.pem -keystore /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/cacerts -storepass changeit

Thanks..


Solution

  • You need to make sure that the following service have read permissions for the directories holding the certificates and keys:

    • The private key file should be owned by the aziotks group.
    • The certificate files should be owned by the aziotcs group

    Ref: Configure IoT Edge with the new certificates