Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST Call to Web Service Results in RPC Timeout #3204

Open
sn3kyJ3di opened this issue Jan 22, 2025 · 1 comment
Open

REST Call to Web Service Results in RPC Timeout #3204

sn3kyJ3di opened this issue Jan 22, 2025 · 1 comment
Assignees

Comments

@sn3kyJ3di
Copy link

Describe the bug
I have setup an instance of Volttron on a headless Ubuntu 22.04.5 LTS. I have a platform.driver, platform.historian, listeneragent, and platform.bacnet_proxy running. I have configured a handful of BACnet/IP devices and a single Modbus TCP/IP device. When I observe the volttron.log file I see the point data for them along with the values read during the scraping. I also installed the "RESTful Web Interface" and can access the URL from a browser. I started making a POSTMAN collection and have made various calls successfully including the list of my devices, but when I make a call to a specific point on a device I get a "504 Gateway Timeout" and the body message is :

{
"error": "RPC Timed Out: 5 seconds"
}
From reading this: text

It seems like I should be able to get a successful message back with the value from the last scrape?

This is the partial URL and I am using the bearer token to auth: "/vui/platforms/volttron1/devices/campus/building/shelly3em/PhAVolts"

Is there a way to increase the timeout? Is there some mechanic that I might have not configured or mis-configured?

Here is what I see in the log when I make the API call, I tried setting the device scraping interval to less than the 5 seconds but that didn't make a difference:

2025-01-03 17:55:11,164 () volttron.platform.web.platform_web_service [427] DEBUG: path_info is: /vui/platforms/volttron1/devices/campus/building/shelly3em/PhAVolts
2025-01-03 17:55:11,165 () volttron.platform.web.platform_web_service [431] DEBUG: Peer path_info is associated with: None
2025-01-03 17:55:11,166 () volttron.platform.web.platform_web_service [468] DEBUG: MATCHED:
pattern: ^/vui/platforms/[^/]+/devices/.*/?$, path_info: /vui/platforms/volttron1/devices/campus/building/shelly3em/PhAVolts
v: <bound method VUIEndpoints.handle_platforms_devices of <volttron.platform.web.vui_endpoints.VUIEndpoints object at 0xffff992792d0>>
2025-01-03 17:55:11,166 () volttron.platform.web.platform_web_service [470] DEBUG: registered route t is: callable
2025-01-03 17:55:12,543 (platform_driveragent-4.0 39116 [223]) platform_driver.driver DEBUG: campus/building/shelly3em next scrape scheduled: 2025-01-03 17:55:14.540000+00:00
2025-01-03 17:55:12,543 (platform_driveragent-4.0 39116 [227]) platform_driver.driver DEBUG: scraping device: campus/building/shelly3em
2025-01-03 17:55:12,601 (platform_driveragent-4.0 39116 [288]) platform_driver.driver DEBUG: publishing: devices/campus/building/shelly3em/all
2025-01-03 17:55:12,609 (platform_driveragent-4.0 39116 [294]) platform_driver.driver DEBUG: finish publishing: devices/campus/building/shelly3em/all
2025-01-03 17:55:12,615 (listeneragent-3.3 39115 [99]) main INFO: Peer: pubsub, Sender: platform.driver:, Bus: , Topic: devices/campus/building/shelly3em/all, Headers: {'Date': '2025-01-03T17:55:12.600849+00:00', 'TimeStamp': '2025-01-03T17:55:12.600849+00:00', 'SynchronizedTimeStamp': '2025-01-03T17:55:12.000000+00:00', 'min_compatible_version': '3.0', 'max_compatible_version': ''}, Message:

@craig8 craig8 added bug and removed bug labels Jan 27, 2025
@davidraker
Copy link
Contributor

@sn3kyJ3di , I suspect the issue is that the API assumes it is interacting with an Actuator Agent rather than with the Platform Driver directly. It is likely timing out, therefore, because it is waiting for a response from an agent that is not installed. Installing an actuator agent with default configurations and the VIP Identity "platform.actuator" is likely to fix the error you are seeing. Please let us know whether that resolves the issue.

I do apologize that this was not well documented. I will update the installation instructions to highlight this.

One other detail to mention: The value being returned by this endpoint is actually queried from the device at the time of the request, so it may not match the last value published by the driver if the value has changed between the last poll and the present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants