I am getting the following errors when running the demo, I believe I have everthing set up correctly. Does anyone know what is causing this error ? I can see from the code that it is not getting back a valid thingName (blank) from the Register request.
[INFO] [PKCS11] [core_pkcs11_mbedtls.c:1403] PKCS #11 successfully initialized. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x3 type object. [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Claim_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Claim Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:532] Establishing MQTT session with claim certificate... [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:544] Established connection with claim credentials. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:252] Received accepted response from Fleet Provisioning CreateCertificateFromCsr API. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:621] Received certificate with Id: 5cf2014cf961f75ad1eb8300d389d5dc70bee7b6712db13df5bfb9faa4521921 [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Device Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:279] Received accepted response from Fleet Provisioning RegisterThing API. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_serializer.c:381] "thingName" not found in RegisterThing response. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:696] Received AWS IoT Thing name: [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:722] Establishing MQTT session with provisioned certificate... [ERROR] [Transport_MbedTLS_PKCS11] [mbedtls_pkcs11_posix.c:915] Failed to read data: mbedTLSError= SSL - The peer notified us that the connection is going to be closed : <No-Low-Level-Code>. [ERROR] [MQTT] [core_mqtt_serializer.c:2400] A single byte was not read from the transport: transportStatus=-30848. [ERROR] [MQTT] [core_mqtt.c:1569] CONNACK recv failed with status = MQTTRecvFailed. [ERROR] [MQTT] [core_mqtt.c:1840] MQTT connection failed with status = MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [mqtt_operations.c:740] Connection with MQTT broker failed with status MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:730] Failed to establish MQTT session with provisioned credentials. Verify on your AWS account that the new certificate is active and has an attached IoT Policy that allows the "iot:Connect" action. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1932] Successfully closed PKCS #11 session. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1446] PKCS #11 was successfully uninitialized. [WARN] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:765] Demo iteration 1 failed. Retrying... [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1403] PKCS #11 successfully initialized. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x3 type object. [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Claim_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Claim Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:532] Establishing MQTT session with claim certificate... [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:544] Established connection with claim credentials. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:252] Received accepted response from Fleet Provisioning CreateCertificateFromCsr API. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:621] Received certificate with Id: b74c85271c8d48cc47d1da9fcf4ef4dbd48ffd682fa0d318efd9db4fdc3e9837 [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Device Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:279] Received accepted response from Fleet Provisioning RegisterThing API. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_serializer.c:381] "thingName" not found in RegisterThing response. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:696] Received AWS IoT Thing name: [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:722] Establishing MQTT session with provisioned certificate... [ERROR] [Transport_MbedTLS_PKCS11] [mbedtls_pkcs11_posix.c:915] Failed to read data: mbedTLSError= SSL - The peer notified us that the connection is going to be closed : <No-Low-Level-Code>. [ERROR] [MQTT] [core_mqtt_serializer.c:2400] A single byte was not read from the transport: transportStatus=-30848. [ERROR] [MQTT] [core_mqtt.c:1569] CONNACK recv failed with status = MQTTRecvFailed. [ERROR] [MQTT] [core_mqtt.c:1840] MQTT connection failed with status = MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [mqtt_operations.c:740] Connection with MQTT broker failed with status MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:730] Failed to establish MQTT session with provisioned credentials. Verify on your AWS account that the new certificate is active and has an attached IoT Policy that allows the "iot:Connect" action. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1932] Successfully closed PKCS #11 session. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1446] PKCS #11 was successfully uninitialized. [WARN] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:765] Demo iteration 2 failed. Retrying... [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1403] PKCS #11 successfully initialized. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x3 type object. [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Claim_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Claim Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:532] Establishing MQTT session with claim certificate... [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:544] Established connection with claim credentials. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:252] Received accepted response from Fleet Provisioning CreateCertificateFromCsr API. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:621] Received certificate with Id: 770c2b3befd821bcbbe06f0932ab4afdc950bc8a3fbcabf4c0333fcae5a1217d [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Device Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:279] Received accepted response from Fleet Provisioning RegisterThing API. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_serializer.c:381] "thingName" not found in RegisterThing response. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:696] Received AWS IoT Thing name: [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:722] Establishing MQTT session with provisioned certificate... [ERROR] [Transport_MbedTLS_PKCS11] [mbedtls_pkcs11_posix.c:915] Failed to read data: mbedTLSError= SSL - The peer notified us that the connection is going to be closed : <No-Low-Level-Code>. [ERROR] [MQTT] [core_mqtt_serializer.c:2400] A single byte was not read from the transport: transportStatus=-30848. [ERROR] [MQTT] [core_mqtt.c:1569] CONNACK recv failed with status = MQTTRecvFailed. [ERROR] [MQTT] [core_mqtt.c:1840] MQTT connection failed with status = MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [mqtt_operations.c:740] Connection with MQTT broker failed with status MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:730] Failed to establish MQTT session with provisioned credentials. Verify on your AWS account that the new certificate is active and has an attached IoT Policy that allows the "iot:Connect" action. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1932] Successfully closed PKCS #11 session. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1446] PKCS #11 was successfully uninitialized. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:771] All 3 demo iterations failed.
Documentation says enable the "Use the AWS IoT registry to manage your device fleet" option --- I can't find this option anywhere, has something changed ?
I am getting the following errors when running the demo, I believe I have everthing set up correctly. Does anyone know what is causing this error ? I can see from the code that it is not getting back a valid thingName (blank) from the Register request.
[INFO] [PKCS11] [core_pkcs11_mbedtls.c:1403] PKCS #11 successfully initialized. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x3 type object. [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Claim_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Claim Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:532] Establishing MQTT session with claim certificate... [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:544] Established connection with claim credentials. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:252] Received accepted response from Fleet Provisioning CreateCertificateFromCsr API. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:621] Received certificate with Id: 5cf2014cf961f75ad1eb8300d389d5dc70bee7b6712db13df5bfb9faa4521921 [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Device Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:279] Received accepted response from Fleet Provisioning RegisterThing API. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_serializer.c:381] "thingName" not found in RegisterThing response. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:696] Received AWS IoT Thing name: [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:722] Establishing MQTT session with provisioned certificate... [ERROR] [Transport_MbedTLS_PKCS11] [mbedtls_pkcs11_posix.c:915] Failed to read data: mbedTLSError= SSL - The peer notified us that the connection is going to be closed : <No-Low-Level-Code>. [ERROR] [MQTT] [core_mqtt_serializer.c:2400] A single byte was not read from the transport: transportStatus=-30848. [ERROR] [MQTT] [core_mqtt.c:1569] CONNACK recv failed with status = MQTTRecvFailed. [ERROR] [MQTT] [core_mqtt.c:1840] MQTT connection failed with status = MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [mqtt_operations.c:740] Connection with MQTT broker failed with status MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:730] Failed to establish MQTT session with provisioned credentials. Verify on your AWS account that the new certificate is active and has an attached IoT Policy that allows the "iot:Connect" action. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1932] Successfully closed PKCS #11 session. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1446] PKCS #11 was successfully uninitialized. [WARN] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:765] Demo iteration 1 failed. Retrying... [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1403] PKCS #11 successfully initialized. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x3 type object. [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Claim_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Claim Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:532] Establishing MQTT session with claim certificate... [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:544] Established connection with claim credentials. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:252] Received accepted response from Fleet Provisioning CreateCertificateFromCsr API. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:621] Received certificate with Id: b74c85271c8d48cc47d1da9fcf4ef4dbd48ffd682fa0d318efd9db4fdc3e9837 [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Device Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:279] Received accepted response from Fleet Provisioning RegisterThing API. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_serializer.c:381] "thingName" not found in RegisterThing response. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:696] Received AWS IoT Thing name: [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:722] Establishing MQTT session with provisioned certificate... [ERROR] [Transport_MbedTLS_PKCS11] [mbedtls_pkcs11_posix.c:915] Failed to read data: mbedTLSError= SSL - The peer notified us that the connection is going to be closed : <No-Low-Level-Code>. [ERROR] [MQTT] [core_mqtt_serializer.c:2400] A single byte was not read from the transport: transportStatus=-30848. [ERROR] [MQTT] [core_mqtt.c:1569] CONNACK recv failed with status = MQTTRecvFailed. [ERROR] [MQTT] [core_mqtt.c:1840] MQTT connection failed with status = MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [mqtt_operations.c:740] Connection with MQTT broker failed with status MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:730] Failed to establish MQTT session with provisioned credentials. Verify on your AWS account that the new certificate is active and has an attached IoT Policy that allows the "iot:Connect" action. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1932] Successfully closed PKCS #11 session. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1446] PKCS #11 was successfully uninitialized. [WARN] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:765] Demo iteration 2 failed. Retrying... [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1403] PKCS #11 successfully initialized. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x3 type object. [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Claim_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Claim Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:532] Establishing MQTT session with claim certificate... [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:544] Established connection with claim credentials. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:252] Received accepted response from Fleet Provisioning CreateCertificateFromCsr API. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:621] Received certificate with Id: 770c2b3befd821bcbbe06f0932ab4afdc950bc8a3fbcabf4c0333fcae5a1217d [INFO] [PKCS11] [core_pkcs11_pal.c:63] Could not open corePKCS11_Certificate.dat for reading. [INFO] [FLEET_PROVISIONING_DEMO] [pkcs11_operations.c:770] Writing certificate into label "Device Cert". [INFO] [PKCS11] [core_pkcs11_mbedtls.c:2823] Creating a 0x1 type object. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:279] Received accepted response from Fleet Provisioning RegisterThing API. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_serializer.c:381] "thingName" not found in RegisterThing response. [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:696] Received AWS IoT Thing name: [INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:722] Establishing MQTT session with provisioned certificate... [ERROR] [Transport_MbedTLS_PKCS11] [mbedtls_pkcs11_posix.c:915] Failed to read data: mbedTLSError= SSL - The peer notified us that the connection is going to be closed : <No-Low-Level-Code>. [ERROR] [MQTT] [core_mqtt_serializer.c:2400] A single byte was not read from the transport: transportStatus=-30848. [ERROR] [MQTT] [core_mqtt.c:1569] CONNACK recv failed with status = MQTTRecvFailed. [ERROR] [MQTT] [core_mqtt.c:1840] MQTT connection failed with status = MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [mqtt_operations.c:740] Connection with MQTT broker failed with status MQTTRecvFailed. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:730] Failed to establish MQTT session with provisioned credentials. Verify on your AWS account that the new certificate is active and has an attached IoT Policy that allows the "iot:Connect" action. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1932] Successfully closed PKCS #11 session. [INFO] [PKCS11] [core_pkcs11_mbedtls.c:1446] PKCS #11 was successfully uninitialized. [ERROR] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:771] All 3 demo iterations failed.