Unable to register account in /aws-iot-fleetwise-edge/tools/cloud/demo.sh script
eliozepeda98 opened this issue · 12 comments
Describe the bug
When I try to run the demo script updated by @olgaakulinushkina "Update demo script to support S3 destination" with the next parameters:
cd ~/aws-iot-fleetwise-edge/tools/cloud &&
./demo.sh --vehicle-name fwdemo-s32g-dextra
--campaign-file campaign-obd-heartbeat.json
--region eu-central-1
I get the next error:
aws: error: the following arguments are required: --timestream-resources
I understand that AWS IoT FleetWise made an update and now the timestream resources are deprecated, int the update made by @olgaakulinushkina those resources were removed but it seems that aws still asking for those resourses..
------------changes done in script----------------
register_account() {
echo "Registering account..."
aws iotfleetwise register-account
**- ${ENDPOINT_URL_OPTION} --region ${REGION} \
-
--timestream-resources "{\"timestreamDatabaseName\":\"${TIMESTREAM_DB_NAME}\", \
-
\"timestreamTableName\":\"${TIMESTREAM_TABLE_NAME}\"}" | jq -r .registerAccountStatus
-
echo "Waiting for account to be registered..."
${ENDPOINT_URL_OPTION} --region ${REGION} | jq -r .registerAccountStatus**
}
note: with the old demo.sh I get the error:
An error occurred (ValidationException) when calling the RegisterAccount operation: The Amazon Timestream resources parameter was deprecated. You can pass Timestream resources into the data destination configuration in CreateCampaign.
Do I need to update anything else to succesfully run the demo.sh?
To Reproduce
run the demo.sh script with the next commands:
cd ~/aws-iot-fleetwise-edge/tools/cloud &&
./demo.sh --vehicle-name fwdemo-s32g-dextra
--campaign-file campaign-obd-heartbeat.json
--region eu-central-1
Expected behavior
error show: aws: error: the following arguments are required: --timestream-resources
Logs
ubuntu@ip-172-31-20-199:~/aws-iot-fleetwise-edge/tools/cloud$ cd ~/aws-iot-fleetwise-edge/tools/cloud && \
./demo.sh --vehicle-name fwdemo-s32g-dextra
--campaign-file campaign-obd-heartbeat.json
--region eu-central-1
===================================
AWS IoT FleetWise Cloud Demo Script
===================================
Date: 2023-06-14T16:35:48+0000
Timestamp: 1686760547
Vehicle name: fwdemo-s32g-dextra
Fleet Size: 1
Checking AWS CLI version...
aws-cli/2.11.27
Getting AWS account ID...
625632145135
Getting account registration status...
NOT_REGISTERED
Registering account...
usage: aws [options] [ ...] [parameters]
To see help text, you can run:
aws help
aws help
aws help
aws: error: the following arguments are required: --timestream-resources
Environment (please complete the following information):
- OS: Ubuntu running in the EC2 instance
instance zone: us-east-1c
instance type: m6g.8xlarge
Additional context
I was able to run the script demo.sh before with the same configurations mentioned in the EC2 instance and the same parameters when calling the script.
Thanks for reporting this issue.
Can you please check this folder ~/.aws/models
if there is by chance an old model stored? If yes please delete it and retry
Hello, this error is due to usage of old AWS CLI. Could you please update the CLI to the latest version and retry? Let us know if you have further issue.
Hello, How can I update the AWS CLI?
I restarted all again and run the script again, now I get this message:
ubuntu@ip-172-31-29-57:~/goldvip-deploy$ cd ~/aws-iot-fleetwise-edge/tools/cloud &&
ion eu-central-1> ./demo.sh --vehicle-name fwdemo-s32g-dextra \
--campaign-file campaign-obd-heartbeat.json
--force-registration
--region eu-central-1
===================================
AWS IoT FleetWise Cloud Demo Script
===================================
Date: 2023-06-15T00:39:51+0000
Timestamp: 1686789590
Vehicle name: fwdemo-s32g-dextra
Fleet Size: 1
Checking AWS CLI version...
aws-cli/2.12.0
Getting AWS account ID...
625632145135
Getting account registration status...
NOT_REGISTERED
Registering account...
REGISTRATION_PENDING
Waiting for account to be registered...
Creating Timestream database...
arn:aws:timestream:eu-central-1:625632145135:database/IoTFleetWiseDB-1686789590
Creating Timestream table...
Creating service role...
arn:aws:iam::625632145135:role/IoTFleetWiseServiceRole-eu-central-1-1686789590
Waiting for role to be created...
Creating service role policy...
arn:aws:iam::625632145135:policy/IoTFleetWiseServiceRole-eu-central-1-1686789590-policy
Waiting for policy to be created...
Attaching policy to service role...
Deleting vehicle fwdemo-s32g-dextra if it already exists...
Checking for existing signal catalog...
No existing signal catalog
Creating signal catalog with Vehicle node...
arn:aws:iotfleetwise:eu-central-1:625632145135:signal-catalog/fwdemo-s32g-dextra-1686789590-signal-catalog
Adding OBD signals to signal catalog...
arn:aws:iotfleetwise:eu-central-1:625632145135:signal-catalog/fwdemo-s32g-dextra-1686789590-signal-catalog
Adding DBC signals to signal catalog...
arn:aws:iotfleetwise:eu-central-1:625632145135:signal-catalog/fwdemo-s32g-dextra-1686789590-signal-catalog
Add an attribute to signal catalog...
arn:aws:iotfleetwise:eu-central-1:625632145135:signal-catalog/fwdemo-s32g-dextra-1686789590-signal-catalog
Creating model manifest...
arn:aws:iotfleetwise:eu-central-1:625632145135:model-manifest/fwdemo-s32g-dextra-1686789590-model-manifest
Updating attribute in model manifest...
arn:aws:iotfleetwise:eu-central-1:625632145135:model-manifest/fwdemo-s32g-dextra-1686789590-model-manifest
Activating model manifest...
arn:aws:iotfleetwise:eu-central-1:625632145135:model-manifest/fwdemo-s32g-dextra-1686789590-model-manifest
Creating decoder manifest with OBD signals...
arn:aws:iotfleetwise:eu-central-1:625632145135:decoder-manifest/fwdemo-s32g-dextra-1686789590-decoder-manifest
Adding DBC signals to decoder manifest...
arn:aws:iotfleetwise:eu-central-1:625632145135:decoder-manifest/fwdemo-s32g-dextra-1686789590-decoder-manifest
Activating decoder manifest...
arn:aws:iotfleetwise:eu-central-1:625632145135:decoder-manifest/fwdemo-s32g-dextra-1686789590-decoder-manifest
Creating vehicle fwdemo-s32g-dextra...
arn:aws:iotfleetwise:eu-central-1:625632145135:vehicle/fwdemo-s32g-dextra
Creating fleet...
arn:aws:iotfleetwise:eu-central-1:625632145135:fleet/fwdemo-s32g-dextra-1686789590-fleet
Associating vehicle fwdemo-s32g-dextra...
Creating campaign from campaign-obd-heartbeat.json...
arn:aws:iotfleetwise:eu-central-1:625632145135:campaign/fwdemo-s32g-dextra-1686789590-campaign
Waiting for campaign to become ready for approval...
arn:aws:iotfleetwise:eu-central-1:625632145135:campaign/fwdemo-s32g-dextra-1686789590-campaign
Approving campaign...
arn:aws:iotfleetwise:eu-central-1:625632145135:campaign/fwdemo-s32g-dextra-1686789590-campaign
Suspending campaign...
arn:aws:iotfleetwise:eu-central-1:625632145135:campaign/fwdemo-s32g-dextra-1686789590-campaign
Resuming campaign...
arn:aws:iotfleetwise:eu-central-1:625632145135:campaign/fwdemo-s32g-dextra-1686789590-campaign
Waiting until status of vehicle fwdemo-s32g-dextra is healthy...
Waiting 30 seconds for data to be collected...
The DB Name is IoTFleetWiseDB-1686789590
The DB Table is VehicleDataTable
Querying Timestream...
An error occurred (ValidationException) when calling the Query operation: line 1:76: Column 'vehicleName' does not exist
Is this expected? Is this because I need to add manually the data destination into the Create Campaign? if it is expected how do I solve it?
Thanks!
This is most likely due to data not showing up in Timestream. Could you enable the FleetWise logging so that we can check if service emit any error log. To do this, go to FleetWise page -> Settings -> Edit the Logging option to allow log delivery and create a log group. Once logging is enabled, could you run the demo.sh again and check whether there's any error message in the corresponding log group.
Hello I did the steps that you mentioned but I don´t see any information in the corresponding log group,
It looks like edge agent is not uploading data.
If you are
- following the dev guide to setup a simulated vehicle: https://github.com/aws/aws-iot-fleetwise-edge/blob/main/docs/dev-guide/edge-agent-dev-guide.md#deploy-the-aws-iot-fleetwise-edge-agent-software then please login into the EC2 that runs the edge agent (created by the stack) and look at the config file
/etc/aws-iot-fleetwise/config-0.json
to make sure the vehicle is configured asfwdemo-s32g-dextra
and then look at the logssudo journalctl -fu fwe@0
to make sure this edge agent is registered asfwdemo-s32g-dextra
. Also please also record traffic oncandump vcan0
to make sure the simulated can traffic is running and the simulator is on the latest version supporting the needed OBD2 PIDs. - if you are connected to a real vehicle please ssh into the device running the edge agent and look at the config file
/etc/aws-iot-fleetwise/config-0.json
to make sure the vehicle is configured asfwdemo-s32g-dextra
. Also make sure the right can which is connected to the vehicles OBD2 is configured for examplecan0
. Please also look at the logssudo journalctl -fu fwe@0
to make sure this edge agent is registered asfwdemo-s32g-dextra
and running. Also please also record traffic oncandump can0
to make sure the car is switched on and supports ISO 15765-4.
Please post results then we can do a more detailed analysis.
Could be related to #54 (comment)
Hello, this seems to be an issue related to CAN simulator. If the candump vcan0
is not outputting any data, it's an indication of can simulator not running. Could you please also restart the sudo systemctl restart cansim@0
and check whether data showing on candump vcan0
Hello, do you need any further help with checking the CAN simulation or can we close the issue?
I am going to close the issue since the discussion was not active for a while. Please, reopen the issue if there is any help needed for the CAN simulation setup.