Skip to content

[core] fix dashboard event agent for reporting events without http scheme#60811

Draft
rueian wants to merge 2 commits intoray-project:masterfrom
rueian:fix-dashboard-event-agent
Draft

[core] fix dashboard event agent for reporting events without http scheme#60811
rueian wants to merge 2 commits intoray-project:masterfrom
rueian:fix-dashboard-event-agent

Conversation

@rueian
Copy link
Contributor

@rueian rueian commented Feb 6, 2026

Description

event_agent.py fails to report events to the dashboard for a long time. It fails with aiohttp.client_exceptions.NonHttpUrlClientError because the address doesn't start with a http:// scheme.

2026-02-06 11:14:08,101 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,101 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,102 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,102 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,102 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,102 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,102 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,102 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,102 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,103 WARNING event_agent.py:98 -- Report event failed, retrying... 10.0.158.13:8265/report_events
2026-02-06 11:14:08,103 ERROR event_agent.py:103 -- Report event failed: ['{"event_id":"2026-02-06 19:14:06.345298544 +0000 UTC m=+39.118057203","source_type":"AUTOSCALER","source_hostname":"...","source_pid":1,"severity":"TRACE","label":"","message":"The following Ray state was observed:  {\\"nodeStates\\":[{\\"instanceId\\":\\"i-022d9225846352e01\\",\\"rayNodeTypeName\\":\\"worker_node\\",\\"availableResources\\":{\\"CPU\\":64,\\"GPU\\":0,\\"memory\\":68719476736,\\"object_store_memory\\":19289486131},\\"totalResources\\":{\\"CPU\\":64,\\"GPU\\":0,\\"memory\\":68719476736,\\"object_store_memory\\":19289486131},\\"status\\":\\"IDLE\\",\\"nodeIpAddress\\":\\"10.0.190.81\\",\\"labels\\":{\\"anyscale.com/instance-type\\":\\"m5.4xlarge\\",\\"ray.io/availability-zone\\":\\"us-west-2c\\",\\"ray.io/market-type\\":\\"on-demand\\",\\"ray.io/node-group\\":\\"worker_node\\",\\"ray.io/node-id\\":\\"3feb50bae0efe29f43559fafb4a4a4cb5a32d2297a1f66caad0b2aad\\",\\"ray.io/region\\":\\"us-west-2\\"}},{\\"instanceId\\":\\"i-05a62ab9bfc5d4400\\",\\"rayNodeT...
Traceback (most recent call last):
  File "/home/ray/anaconda3/lib/python3.10/site-packages/ray/dashboard/modules/event/event_agent.py", line 89, in report_events
    async with self._dashboard_agent.http_session.post(
  File "/home/ray/anaconda3/lib/python3.10/site-packages/aiohttp/client.py", line 1510, in __aenter__
    self._resp: _RetType = await self._coro
  File "/home/ray/anaconda3/lib/python3.10/site-packages/aiohttp/client.py", line 558, in _request
    raise NonHttpUrlClientError(url)
aiohttp.client_exceptions.NonHttpUrlClientError: 10.0.158.13:8265/report_events

This PR adds the http scheme.

Related issues

Link related issues: "Fixes #1234", "Closes #1234", or "Related to #1234".

Additional information

Optional: Add implementation details, API changes, usage examples, screenshots, etc.

…heme

Signed-off-by: Rueian Huang <rueiancsie@gmail.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes a bug in the event agent where it fails to report events to the dashboard due to a missing HTTP scheme in the URL. The change correctly prepends http:// to the dashboard address. I've added a suggestion to make this logic more robust by checking if a scheme already exists before adding it, which will prevent potential issues in the future if the format of the stored address changes.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Rueian <rueiancsie@gmail.com>
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

Successfully merging this pull request may close these issues.

Ray fails to serialize self-reference objects

1 participant