Collecting data from OPC-UA to SiteWise fails

0

Hi, I have a Greengrass Core v2 running in a Docker container which is successfully collecting measurements from an OPC-UA server however these measurements are not being forwarded to AWS Sitewise. Investigating the local logs on the core I can see swPublisher.log contains many entries saying "Failed to publish messages because an SDK client error occurred. Retrying. Error details: Unable to load AWS credentials from any provider in the chain".
Any suggestions?

Log:
2021-09-27T06:20:41.022Z [INFO] (Copier) aws.iot.SiteWiseEdgePublisher: stdout. [INFO ] 2021-09-27 06:20:41.022 [main] Publisher - {"message":"Initialization Completed."}. {scriptName=services.aws.iot.SiteWiseEdgePublisher.lifecycle.Startup.Script, serviceName=aws.iot.SiteWiseEdgePublisher, currentState=RUNNING}
2021-09-27T06:20:44.787Z [INFO] (Copier) aws.iot.SiteWiseEdgePublisher: stdout. [WARN ] 2021-09-27 06:20:44.770 [PublisherThread-0] BatchMessageUploaderTask - {"message":"Failed to publish messages because an SDK client error occurred. Retrying. Error details: Unable to load AWS credentials from any provider in the chain: [EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey), WebIdentityTokenCredentialsProvider: You must specify a value for roleArn and roleSessionName, com.amazonaws.auth.profile.ProfileCredentialsProvider@41442f3f: profile file cannot be null, com.amazonaws.auth.EC2ContainerCredentialsProviderWrapper@6833fcdc: Failed to connect to service endpoint: ]"}. {scriptName=services.aws.iot.SiteWiseEdgePublisher.lifecycle.Startup.Script, serviceName=aws.iot.SiteWiseEdgePublisher, currentState=RUNNING}

Image version:
amazon/aws-iot-greengrass:2.4.0-0

Edited by: johnDa on Sep 26, 2021 11:32 PM

johnDa
asked 3 years ago528 views
1 Answer
1

Finally, I got data by recreating GreengrassV2TokenExchangeRole and its policy.
I removed the old GreengrassV2TokenExchangeRole and its policy and recreated by Greengrass installer provision mode.
Then check its policy is set as follows:
https://docs.aws.amazon.com/iot-sitewise/latest/userguide/configure-gateway-ggv2.html

johnDa
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions