edgexfoundry / edgex-examples

Apache License 2.0
51 stars 52 forks source link

app Influx export service: custom config is not getting updated through config provider (Consul registry) #242

Closed mohammedimrankasab closed 4 months ago

mohammedimrankasab commented 4 months ago

🐞 Bug Report

Affected Services [REQUIRED]

The issue is located in: app-influx-export https://github.com/edgexfoundry/edgex-examples/tree/main/application-services/custom/influxdb-export ### Is this a regression? No ### Description and Minimal Reproduction [**REQUIRED**] we are currently working on containerizing the influxdb-export [app](https://github.com/edgexfoundry/edgex-examples/tree/main/application-services/custom/influxdb-export) service and run it using the docker-compose. The service is running as expected but there is an observation that whenever we update any custom values like the mqtt broker address using the consul registry it is not reflected and if we restart the application service container then the old value from the configuration.yaml is getting overridden hence not accepting any new values through the consul UI. Below entries are already updated on the docker-compose file EDGEX_ADD_REGISTRY_ACL_ROLES: "app-influxdb-export" EDGEX_ADD_KNOWN_SECRETS: redisdb[app-influxdb-export],message-bus[app-influxdb-export] EDGEX_ADD_SECRETSTORE_TOKENS: "app-influxdb-export" Note: No changes in the code or the configuration.yaml, The only thing is using this code a docker image is built and used as a docker container. Any keys under the path `Key/Values/edgex/v3/app-influxdb-export/MqttConfig` is not getting updated. I tried to change the AuthMode: "usernamepassword" to "none" and change the [BrokerAddress](https://github.com/edgexfoundry/edgex-examples/blob/77e035913dd1d869806c6913e9d730e7d3f78349/application-services/custom/influxdb-export/res/configuration.yaml#L29) I can update the StartupMsg and also can see the new message after restarting the container `level=INFO ts=2024-03-08T06:48:36.014365822Z app=app-influxdb-export source=service.go:244 msg="App service export to InfluxDB has Started **again**"` ## πŸ”₯ Exception or Error



2024-03-08T06:48:02.282Z [ERROR] agent.http: Request error: method=POST url=/v1/internal/acl/authorize?dc=dc1 from=192.168.160.1:35464 error="ACL not found" 2024-03-08T06:48:02.498Z [ERROR] agent.http: Request error: method=POST url=/v1/internal/acl/authorize?dc=dc1 from=192.168.160.1:35464 error="ACL not found" 2024-03-08T06:48:02.662Z [ERROR] agent.http: Request error: method=GET url=/v1/kv/edgex/v3/app-influxdb-export/MqttConfig/BrokerAddress?dc=dc1 from=192.168.160.1:35474 error="ACL not found"

🌍 Your Environment

Deployment Environment: Dev

EdgeX Version [REQUIRED]: 3.1.0

Anything else relevant? image

lenny-goodell commented 4 months ago

The issue is in the example, not the SDK See https://github.com/orgs/edgexfoundry/discussions/256