Device Service does not update cache at first system boot #14
SpAndrea117
started this conversation in
General
Replies: 2 comments 7 replies
-
it's just the host setting issue. core-metadata can't communitcate with device service via REST callback |
Beta Was this translation helpful? Give feedback.
6 replies
-
Looks like
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm trying to reproduce an EdgeX architecture where there are two device services. The first one handeles GPIO resources and the second one handles MODBUS readings. The architecture has been developed to trigger MODBUS readings only if a specific GPIO pin is up. To do so, i've added to device-modbus DS a device command triggered by the GPIO application service, that is responsible to send the device command to device-modbus. The whole flow works correctly, but at the first deployment of the application, both device services register to core metadata but their cache is not updated runtime, so to make the application works correctly i need to manually restart both. From the core metadata i've noticed the following logs:
level=ERROR ts=2022-10-06T10:18:54.323453816Z app=core-metadata source=notify.go:238 msg="fail to invoke device service callback for updating device service Modbus-Device, err: failed to send a http request -> Put \"http://device-modbus:59999/api/v2/callback/service\": dial tcp 10.43.64.87:59999: connect: no route to host" level=WARN ts=2022-10-06T10:18:54.323712223Z app=core-metadata source=notify.go:80 msg="Skipping device validation for device Modbus-Device (device service Modbus-Device unavailable)" level=ERROR ts=2022-10-06T10:18:54.537056091Z app=core-metadata source=notify.go:53 msg="fail to invoke device service callback for adding device Modbus-Device, err: failed to send a http request -> Post \"http://device-modbus:59999/api/v2/callback/device\": dial tcp 10.43.64.87:59999: connect: no route to host" level=WARN ts=2022-10-06T10:18:54.537120091Z app=core-metadata source=notify.go:80 msg="Skipping device validation for device Modbus-Device (device service Modbus-Device unavailable)" level=ERROR ts=2022-10-06T10:18:54.538079069Z app=core-metadata source=device.go:67 X-Correlation-ID=9ac78e17-2e4f-4105-b932-af18d77fe3f7 msg="device name Modbus-Device already exists" level=ERROR ts=2022-10-06T10:18:54.538242957Z app=core-metadata source=encoding.go:31 msg="Error encoding the data: http: Handler timeout" level=WARN ts=2022-10-06T10:19:16.972936249Z app=core-metadata source=notify.go:80 msg="Skipping device validation for device gpiod-Device (device service gpiod-Device unavailable)" level=ERROR ts=2022-10-06T10:19:17.188887542Z app=core-metadata source=notify.go:53 msg="fail to invoke device service callback for adding device gpiod-Device, err: failed to send a http request -> Post \"http://device-gpio:60000/api/v2/callback/device\": dial tcp 10.43.94.225:60000: connect: no route to host " level=ERROR ts=2022-10-06T10:24:52.94103392Z app=core-metadata source=notify.go:238 msg="fail to invoke device service callback for updating device service Modbus-Device, err: failed to send a http request -> Put \"http://device-modbus:59999/api/v2/callback/service\": dial tcp 10.43.64.87:59999: connect: no route to host"
The application deployment has been done with k3s and helm and i've tested all the possible network issues, so there should not be problem about this topic. I'm using the Kamakura version of EdgeX 2.2.0 and i've found the following issues about this problem:
edgexfoundry/device-sdk-go#376
edgexfoundry/device-virtual-go#56
edgexfoundry/device-sdk-go#376
Thanks
Beta Was this translation helpful? Give feedback.
All reactions