Hello, i have been trying to setup a rpi using the tutorials here and when i run the command
./aws-iot-device-client --config-file ~/dc-configs/dc-testconn-config.json
i am getting errors on the terminal saying that the aws crt sdk is not found with a fatal error like this
2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {template-name} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {csr-file} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {device-key} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {file} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.850Z [WARN] {Config.cpp}: Key {publish-file} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.851Z [WARN] {Config.cpp}: Key {subscribe-file} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.851Z [WARN] {Config.cpp}: Shadow Name {shadow-name} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.851Z [WARN] {Config.cpp}: Input file {shadow-input-file} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.851Z [WARN] {Config.cpp}: Output file {shadow-output-file} was provided in the JSON configuration file with an empty value
2022-04-11T07:38:13.851Z [INFO] {Config.cpp}: Successfully fetched JSON config file: {
"endpoint": "a32vqcn021ykiy-ats.iot.ap-south-1.amazonaws.com",
"cert": "~/certs/testconn/device.pem.crt",
"key": "~/certs/testconn/private.pem.key",
"root-ca": "~/certs/AmazonRootCA1.pem",
"thing-name": "Triton_Dp_Office",
"logging": {
"enable-sdk-logging": true,
"level": "DEBUG",
"type": "STDOUT",
"file": ""
},
"jobs": {
"enabled": false,
"handler-directory": ""
},
"tunneling": {
"enabled": false
},
"device-defender": {
"enabled": false,
"interval": 300
},
"fleet-provisioning": {
"enabled": false,
"template-name": "",
"template-parameters": "",
"csr-file": "",
"device-key": ""
},
"samples": {
"pub-sub": {
"enabled": true,
"publish-topic": "test/dc/pubtopic",
"publish-file": "",
"subscribe-topic": "test/dc/subtopic",
"subscribe-file": ""
}
},
"config-shadow": {
"enabled": false
},
"sample-shadow": {
"enabled": false,
"shadow-name": "",
"shadow-input-file": "",
"shadow-output-file": ""
}
}
2022-04-11T07:38:13.851Z [DEBUG] {Config.cpp}: Did not find a runtime configuration file, assuming Fleet Provisioning has not run for this device
2022-04-11T07:38:13.852Z [DEBUG] {EnvUtils.cpp}: Updated PATH environment variable to: /home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/snap/bin:/home/pi/.aws-iot-device-client:/home/pi/.aws-iot-device-client/jobs:/home/pi/aws-iot-device-client/build:/home/pi/aws-iot-device-client/build/jobs
2022-04-11T07:38:13.852Z [INFO] {Main.cpp}: Now running AWS IoT Device Client version v1.5.19-868465b
2022-04-11T07:38:13.860Z [ERROR] {FileUtils.cpp}: Failed to create empty file: /var/log/aws-iot-device-client/sdk.log errno: 17 msg: File exists
2022-04-11T07:38:13.860Z [ERROR] {Main.cpp}: *** AWS IOT DEVICE CLIENT FATAL ERROR: Failed to initialize AWS CRT SDK.
AWS IoT Device Client must abort execution, reason: Failed to initialize AWS CRT SDK
Please check the AWS IoT Device Client logs for more information
Aborted
I need this setup asap to work on deploying a fleet and test out AWS IOT Jobs. Any help is appreciated.
Hey Greg, the deleting the log worked for me and i can now run the client on the device and publish the jobs. Thanks much for the help