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
gefragt vor 3 Jahren478 Aufrufe
1 Antwort
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
beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen