In the aws-export directory, I met "Failed loading x509 data" issue, Could you tell me how to handle it?
1. I change the config like this:
`LogLevel = 'DEBUG'
[Service]
BootTimeout = '30s'
ClientMonitor = '15s'
CheckInterval = '10s'
Host = 'localhost'
Port = 48095
Protocol = 'http'
ReadMaxLimit = 100
StartupMsg = 'AWS IoT Export Service'
Timeout = '5s'
[Registry]
Host = 'localhost'
Port = 8500
Type = 'consul'
[Clients]
[Clients.CoreData]
Protocol = 'http'
Host = 'localhost'
Port = 48080
[Clients.Logging]
Protocol = "http"
Host = "localhost"
Port = 48061
[MessageBus]
Type = 'zero'
[MessageBus.PublishHost]
Host = '*'
Port = 5564
Protocol = 'tcp'
[MessageBus.SubscribeHost]
Host = 'localhost'
Port = 5563
Protocol = 'tcp'
[Logging]
EnableRemote = false
File = ''
[Binding]
Type="messagebus"
SubscribeTopic="events"
PublishTopic=""
[ApplicationSettings]
AwsIoTMQTTHost = "xxxxxxxxxxxxx.iot.eu-west-1.amazonaws.com"
AwsIoTMQTTPort = "8883"
awsIoTThingName = "testThing"
MQTTCert = "./certs/user.client.crt"
MQTTKey = "./certs/user.client.key"
SkipCertVerify = "false"
PersistOnError = "false"
topic = "test"
AwsDeviceNames = ""
`
2. I changed the cert and key content in the cert directory
3. I ran make docker
and generated a docker image
4. I ran aws-export service using make run
command with docker-compose file
Here is my docker logs:
ubuntu@ip-10-0-0-23:~/edgex-compose$ docker logs -f 51dedebb46d5
level=INFO ts=2021-04-01T06:15:40.332197084Z app=AWSExport source=sdk.go:358 msg="Starting AWSExport 0.0.0 "
level=INFO ts=2021-04-01T06:15:40.335575026Z app=AWSExport source=config.go:193 msg="Loaded configuration from /res/configuration.toml"
level=INFO ts=2021-04-01T06:15:40.338651221Z app=AWSExport source=variables.go:394 msg="Variables override of 'MessageBus.SubscribeHost.Host' by environment variable: MESSAGEBUS_SUBSCRIBEHOST_HOST=edgex-core-data"
level=INFO ts=2021-04-01T06:15:40.338794039Z app=AWSExport source=variables.go:394 msg="Variables override of 'Clients.CoreData.Host' by environment variable: CLIENTS_COREDATA_HOST=edgex-core-data"
level=INFO ts=2021-04-01T06:15:40.338890742Z app=AWSExport source=variables.go:394 msg="Variables override of 'Service.Host' by environment variable: SERVICE_HOST=app-service-aws-iot-export"
level=INFO ts=2021-04-01T06:15:40.339096137Z app=AWSExport source=variables.go:394 msg="Variables override of 'Service.Port' by environment variable: SERVICE_PORT=48102"
level=INFO ts=2021-04-01T06:15:40.339235487Z app=AWSExport source=variables.go:394 msg="Variables override of 'Registry.Host' by environment variable: REGISTRY_HOST=edgex-core-consul"
level=INFO ts=2021-04-01T06:15:40.341168831Z app=AWSExport source=config.go:168 msg="Using Configuration provider (consul) from: http://edgex-core-consul:8500 with base path of edgex/appservices/1.0/AWSExport"
level=INFO ts=2021-04-01T06:15:40.815852796Z app=AWSExport source=config.go:304 msg="Configuration has been pushed to into Configuration Provider (5 envVars overrides applied)"
level=ERROR ts=2021-04-01T06:15:40.815917592Z app=AWSExport source=logger.go:74 msg="logTarget cannot be blank, using stdout only"
level=INFO ts=2021-04-01T06:15:40.816078909Z app=AWSExport source=registry.go:80 msg="Using Registry (consul) from http://edgex-core-consul:8500"
level=INFO ts=2021-04-01T06:15:40.884991554Z app=AWSExport source=version.go:81 version=0.0.0 msg="Skipping version compatibility check for SDK Beta version or running in debugger"
level=INFO ts=2021-04-01T06:15:40.885061181Z app=AWSExport source=server.go:284 msg="Registering standard routes..."
level=INFO ts=2021-04-01T06:15:40.885142031Z app=AWSExport source=telemetry.go:79 msg="Starting CPU Usage Average loop"
level=INFO ts=2021-04-01T06:15:40.885227967Z app=AWSExport source=configupdates.go:51 msg="Waiting for App Service configuration updates..."
level=INFO ts=2021-04-01T06:15:40.885381521Z app=AWSExport source=controller.go:63 msg="Registering standard V2 routes..."
level=INFO ts=2021-04-01T06:15:40.885575593Z app=AWSExport source=sdk.go:438 msg="Service started in: 553.490083ms"
level=DEBUG ts=2021-04-01T06:15:40.885597552Z app=AWSExport source=aws-iot-mqtt.go:57 msg=xxxxxxxxxxxxxx.iot.eu-west-1.amazonaws.com
level=DEBUG ts=2021-04-01T06:15:40.8856066Z app=AWSExport source=aws-iot-mqtt.go:57 msg=8883
level=DEBUG ts=2021-04-01T06:15:40.885614616Z app=AWSExport source=aws-iot-mqtt.go:57 msg=testThing
level=DEBUG ts=2021-04-01T06:15:40.885623586Z app=AWSExport source=aws-iot-mqtt.go:57 msg=./certs/user.client.crt
level=DEBUG ts=2021-04-01T06:15:40.88563452Z app=AWSExport source=aws-iot-mqtt.go:57 msg=./certs/user.client.key
level=DEBUG ts=2021-04-01T06:15:40.885648162Z app=AWSExport source=aws-iot-mqtt.go:57 msg=test
level=DEBUG ts=2021-04-01T06:15:40.885656548Z app=AWSExport source=aws-iot-mqtt.go:57 msg=
level=DEBUG ts=2021-04-01T06:15:40.885676788Z app=AWSExport source=aws-iot-mqtt.go:57 msg=false
level=DEBUG ts=2021-04-01T06:15:40.885685195Z app=AWSExport source=aws-iot-mqtt.go:57 msg=false
level=DEBUG ts=2021-04-01T06:15:40.885698131Z app=AWSExport source=aws-iot-mqtt.go:116 msg="Read SkipCertVerify from configuration: false"
level=DEBUG ts=2021-04-01T06:15:40.885710838Z app=AWSExport source=aws-iot-mqtt.go:117 msg="Read PersistOnError from configuration: false"
level=DEBUG ts=2021-04-01T06:15:40.885724714Z app=AWSExport source=main.go:41 msg="Device names read []\n"
level=DEBUG ts=2021-04-01T06:15:40.885733026Z app=AWSExport source=aws-iot-mqtt.go:128 msg=test
level=ERROR ts=2021-04-01T06:15:40.886910545Z app=AWSExport source=mqtt.go:87 msg="Failed loading x509 data"
level=INFO ts=2021-04-01T06:15:40.886965073Z app=AWSExport source=sdk.go:473 msg="EdgeX MessageBus trigger selected"
level=INFO ts=2021-04-01T06:15:40.88697895Z app=AWSExport source=messaging.go:47 msg="Initializing Message Bus Trigger for 'zero'"
level=INFO ts=2021-04-01T06:15:40.886994651Z app=AWSExport source=messaging.go:61 msg="Subscribing to topic: 'events' @ tcp://edgex-core-data:5563"
level=INFO ts=2021-04-01T06:15:40.892294951Z app=AWSExport source=messaging.go:71 msg="Publishing to topic: '' @ tcp://*:5564"
level=INFO ts=2021-04-01T06:15:40.89233695Z app=AWSExport source=sdk.go:186 msg="StoreAndForward disabled. Not running retry loop."
level=INFO ts=2021-04-01T06:15:40.892348657Z app=AWSExport source=sdk.go:189 msg="AWS IoT Export Service"
level=INFO ts=2021-04-01T06:15:40.892377722Z app=AWSExport source=server.go:359 msg="Starting HTTP Web Server on address :48102"
level=DEBUG ts=2021-04-01T06:16:03.0181993Z app=AWSExport source=runtime.go:59 msg="Processing message: 4 Transforms"
level=DEBUG ts=2021-04-01T06:16:03.018658138Z app=AWSExport source=filter.go:44 msg="Filtering by DeviceID"
level=DEBUG ts=2021-04-01T06:16:03.018906727Z app=AWSExport source=conversion.go:27 msg="Transforming to AWS format"
{"Bool":"true"}
level=DEBUG ts=2021-04-01T06:16:03.018959715Z app=AWSExport source=main.go:75 msg="Printed to console"
level=DEBUG ts=2021-04-01T06:16:07.711648795Z app=AWSExport source=runtime.go:59 msg="Processing message: 4 Transforms"
level=DEBUG ts=2021-04-01T06:16:07.711861308Z app=AWSExport source=filter.go:44 msg="Filtering by DeviceID"
level=DEBUG ts=2021-04-01T06:16:07.712361311Z app=AWSExport source=conversion.go:27 msg="Transforming to AWS format"
{"Int8":"-47"}
level=DEBUG ts=2021-04-01T06:16:07.71251767Z app=AWSExport source=main.go:75 msg="Printed to console"
level=DEBUG ts=2021-04-01T06:16:07.721416616Z app=AWSExport source=runtime.go:59 msg="Processing message: 4 Transforms"
level=DEBUG ts=2021-04-01T06:16:07.721914373Z app=AWSExport source=runtime.go:59 msg="Processing message: 4 Transforms"
level=DEBUG ts=2021-04-01T06:16:07.722330669Z app=AWSExport source=filter.go:44 msg="Filtering by DeviceID"
level=DEBUG ts=2021-04-01T06:16:07.722426479Z app=AWSExport source=conversion.go:27 msg="Transforming to AWS format"
{"Int64":"-6918581331442291152"}
level=DEBUG ts=2021-04-01T06:16:07.723091104Z app=AWSExport source=main.go:75 msg="Printed to console"
level=DEBUG ts=2021-04-01T06:16:07.722712633Z app=AWSExport source=filter.go:44 msg="Filtering by DeviceID"
level=DEBUG ts=2021-04-01T06:16:07.725779133Z app=AWSExport source=conversion.go:27 msg="Transforming to AWS format"